Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 8 Replies) .hex file differences between VM and Arduino 2.3.2 (Read 1962 times)
groz
Junior Member
**
Offline


Posts: 24
Joined: Feb 21st, 2018
.hex file differences between VM and Arduino 2.3.2
Apr 28th, 2024 at 5:06pm
Print Post  
I've attached a .zip file containing the build listings & .hex files for a sample program. The .hex file output from Arduino 1.8.19 matches VM. The Arduino .hex compiled with 2.3.2 does not match VM.

I've changed the VM IDE setting, etc but no luck. From the build listings, they all seem to use:
- Arduino15\packages\Arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++
-AppData\Local\arduino15\packages\arduino\hardware\avr\1.8.6

Why the difference and what setting needs to be changed in VM so my .hex file matches that of Arduino 2.3.2.
Thanks
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Online


Posts: 2505
Joined: Feb 13th, 2019
Re: .hex file differences between VM and Arduino 2.3.2
Reply #1 - Apr 29th, 2024 at 10:29am
Print Post  
Thanks for the report.

Do you see the same differences between the sketch.hex files? (i.e. the ones without the bootloader merged as well)

Could you attach the 3 files listed in the attachment for us to review?
  

Please Register or Login to the Forum to see File Attachments
Back to top
IP Logged
 
groz
Junior Member
**
Offline


Posts: 24
Joined: Feb 21st, 2018
Re: .hex file differences between VM and Arduino 2.3.2
Reply #2 - Apr 29th, 2024 at 10:39pm
Print Post  
Attached are the files you requested. I renamed the one file to prevent overwrite.

The bootloader section starts at address 7E00 which is the same across all .hex files as it should be. Comparing just the non-bootloader .hex files, the same difference is present using the 2.3.2 environment.

You should be able to re-produce the compilation using the 3 environments.

Thanks
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Online


Posts: 2505
Joined: Feb 13th, 2019
Re: .hex file differences between VM and Arduino 2.3.2
Reply #3 - Apr 30th, 2024 at 12:10pm
Print Post  
Thanks for the files and we are looking into the differences between vMicro and the Arduino IDE 2.x.

Do you have any functional difference between the uploaded versions of the code, or is it just to understand why the HEX files differ?

Has the problem of the Arduino IDE compilation changing been reported to Arduino via their forum?
(I can find a similar issue here with no resolution: https://forum.arduino.cc/t/same-sketch-different-hex-than-with-ide-1-8-19/109269...)
  
Back to top
IP Logged
 
groz
Junior Member
**
Offline


Posts: 24
Joined: Feb 21st, 2018
Re: .hex file differences between VM and Arduino 2.3.2
Reply #4 - Apr 30th, 2024 at 10:41pm
Print Post  
Thanks for keeping on this.

There is no difference in functionality that I can tell. This is important when I'm targeting a standalone (non-Arduino) project. For example: using the atmega328p on a board and programming it using the ICSP to upload the .hex file.

Thanks
  
Back to top
 
IP Logged
 
groz
Junior Member
**
Offline


Posts: 24
Joined: Feb 21st, 2018
Re: .hex file differences between VM and Arduino 2.3.2
Reply #5 - Apr 30th, 2024 at 10:46pm
Print Post  
Almost forgot, I re-opened the topic you mentioned.
https://forum.arduino.cc/t/same-sketch-different-hex-than-with-ide-1-8-19/125422...

Now to see how civil the responses are... Wink
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Online


Posts: 2505
Joined: Feb 13th, 2019
Re: .hex file differences between VM and Arduino 2.3.2
Reply #6 - May 16th, 2024 at 12:31pm
Print Post  
Thanks for re-opening the topic.

From further investigation, the root cause is the different order in which the core files are compiled in this specific case, resulting in a different core archive.

We will check all other areas of the compilation (libraries/project/variant files) for ordering changes between Arduino2x and Arduino1.8x and update when a version of Visual Micro is available with the matching changes in for the Arduino 2x IDE selection.
  
Back to top
IP Logged
 
groz
Junior Member
**
Offline


Posts: 24
Joined: Feb 21st, 2018
Re: .hex file differences between VM and Arduino 2.3.2
Reply #7 - May 17th, 2024 at 10:22am
Print Post  
Thanks for continuing to investigate this.

In the end, having them match ensures compatibility. I look forward to your findings.

Update:
I just realized I never compiled & compared the .hex files from 1.8.19 and 2.3.2. After doing so (Blink.ino), both match (Blink.ino.with_bootloader.hex). It looks like VM is generating a difference with that of 2.3.2.
« Last Edit: May 17th, 2024 at 11:19am by groz »  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Online


Posts: 2505
Joined: Feb 13th, 2019
Re: .hex file differences between VM and Arduino 2.3.2
Reply #8 - May 24th, 2024 at 10:12am
Print Post  
Can you try the latest release (24.0510.01) which can be downloaded from the top of the below board:
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES

This should now produce the same HEX file as the Arduino2 IDE, when using the Arduino 2 configuration in Visual Micro.
  
Back to top
IP Logged
 
groz
Junior Member
**
Offline


Posts: 24
Joined: Feb 21st, 2018
Re: .hex file differences between VM and Arduino 2.3.2
Reply #9 - May 25th, 2024 at 4:55pm
Print Post  
Here are my findings which you should be able to reproduce on your side. Note: I did update with Visual.Micro.Arduino.Studio_2024_0510_2201.vsix.

Using the Arduino Sample Program: Blink.ino for both IDE versions (1.8.19, 2.3.2), the .hex files compare perfectly with VM compiled using Arduino 1.6/1.8 OR Arduino 2.

If you use the files I originally posted (see 1st message), all .hex files are different across the board. This also applies to the Arduino IDE's. The only difference is the use of: #include <EEPROM.h>.

Not sure what is going on...

Thanks
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint