Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
Support requests without the output above may be impossible to answer, so please help us to help you
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
Hex file build differences. Why? (Read 1533 times)
abstractjuz
Newbies
*
Offline



Posts: 4
Hex file build differences. Why?
Jun 21st, 2018 at 4:19pm
 
Hello,

I'm having an issue where 1 machine accessing and compiling code from a git repo is building hex files that are different to the files built by 2 other machines accessing and compiling the same code.

All 3 hex files upload to hardware and work as expected, all the machines are now running the same versions of Atmel Studio and the Arduino IDE - but when I do a file comparison via https://www.diffnow.com - this 3rd machine always produces a file that does not match the other 2 (which do match each other).

Seeing if the files matched was intended to test whether all 3 machines were set up properly using this newly created git repo - but now, since the hex files are different but still working - we're not sure.

I'm trying to work out..
a) Is the 'file matching' idea a valid test?
b) What could be causing the mismatches from this one machine?
c) Is it an issue I need to worry about given that the files do work as expected?
and d) either way - can it be resolved?

Can anyone advise on this?

Thanks!


Back to top
« Last Edit: Jun 21st, 2018 at 4:22pm by abstractjuz »  
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10388
United Kingdom
Re: Hex file build differences. Why?
Reply #1 - Jun 21st, 2018 at 4:41pm
 
Hi,

Suggestions ...

1)
Make sure all machines are set to either Release or Debug.

2)
Make sure all machines have same arduino ide version installed

3)

Your have not said which core you are using. If you have downloaded cores via board manager then make sure they are all the same version.

4)

Make sure all libraries used are of the same version.

5)

Switch on vmicro>compiler>verbose to see what is being built

6)

Switch on "vmicro>compiler>show build properties" to see all config settings.


Back to top
 
WWW  
IP Logged
 
abstractjuz
Newbies
*
Offline



Posts: 4
Re: Hex file build differences. Why?
Reply #2 - Jun 21st, 2018 at 5:20pm
 
Thanks for the quick reply - much appreciated.

Working through these points...

Visual Micro wrote on Jun 21st, 2018 at 4:41pm:
1) Make sure all machines are set to either Release or Debug.
2) Make sure all machines have same arduino ide version installed

Both points checked and confirmed.

Visual Micro wrote on Jun 21st, 2018 at 4:41pm:
3) Your have not said which core you are using. If you have downloaded cores via board manager then make sure they are all the same version.

Ah! Using the Manage Boards Tab in Visual Micro - my Arduino AVR board is showing as 1.6.20 and I have a single option to upgrade to 1.6.21.

One of the other two devs (haven't spoken to the 3rd yet) is showing that he's using 1.6.200 - which comes after 1.6.21. He also has options for .205 , .206 and .207.

I don't see any versions after .21

Can you advise on that please?
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10388
United Kingdom
Re: Hex file build differences. Why?
Reply #3 - Jun 21st, 2018 at 5:29pm
 
You are using AVR in which case you should delete the board manager tool chain because AVR is included with the arduino ide. Then you will all use the same arduino ide version.

You can use the board manager in the arduino ide or in visual micro. They install the same.

The "Check for updates" button on the visual micro platform explorer will look for new tool chains but again I recommend removing the board manager avr so that you have less confusion and simpler config.

The board manager stores packages in c:\users\[your name]\appdata\local\arduino15\packages. Removing the Arduino folder from below arduino15\packages is an abrupt way to clear board manager config. Then restart IDE's
Back to top
 
WWW  
IP Logged
 
abstractjuz
Newbies
*
Offline



Posts: 4
Re: Hex file build differences. Why?
Reply #4 - Jun 21st, 2018 at 5:48pm
 
Visual Micro wrote on Jun 21st, 2018 at 5:29pm:
You are using AVR in which case you should delete the board manager tool chain because AVR is included with the arduino ide. Then you will all use the same arduino ide version.

Sorry - I don't understand this answer.
The first screenshot/attachment is what I see after 'Check For Updates'
The second screenshot/attachment is what my other dev sees.
He has a version of the Arduino Core installed that I can't see.

These two different version match what we're each seeing via the Arduino Board Manager as well.

Back to top
« Last Edit: Jun 21st, 2018 at 5:58pm by abstractjuz »  

PS_boards.png (34 KB | )
PS_boards.png
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10388
United Kingdom
Re: Hex file build differences. Why?
Reply #5 - Jun 22nd, 2018 at 12:53pm
 
Hi,

To use the board manager you need to understand how it works.

suggest you use the board manager in the arduino ide which also configures visual micro.

Thanks
Back to top
 
WWW  
IP Logged
 
Martin Boissonneault
Newbies
*
Offline



Posts: 6
near Montreal, Quebec, Canada
Re: Hex file build differences. Why?
Reply #6 - Oct 1st, 2018 at 12:01am
 
Here are my ideas, abstractjuz:
Maybe one machine is set to use beta board releases? I would just uninstall the 1.6.20x and then reinstall 1.6.21.

The important part is ensure all 3 machines have an identical configuration in Arduino IDE, including the advanced settings.

Martin
Edit: formatting
Back to top
« Last Edit: Oct 1st, 2018 at 12:10am by Martin Boissonneault »  
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10388
United Kingdom
Re: Hex file build differences. Why?
Reply #7 - Oct 1st, 2018 at 12:53pm
 
Good points Martin thanks.

Also, when using AVR it's important to note that it is installed with the arduino ide so having it listed in board manager is always confusing but can't be avoided.

If two AVR tool chains are installed, 1) in IDE \hardware folder and 2) in board manager \appdata downloads then things can be confusing. It's best to delete the arduino package from the arduino download folder in \appdata then you only have the AVR that comes with the Arduino IDE. Ensure all machines are using the same arduino ide version and things will work well.

In the 2nd screen shot below we can see some non-release avr tools are installed in board manager. This suggests a .json index file has been added to the "IDE Locations" BSP list. That list should be the same on all machines and where possible avoid non-release or other AVR versions.
Back to top
 
WWW  
IP Logged
 
abstractjuz
Newbies
*
Offline



Posts: 4
Re: Hex file build differences. Why?
Reply #8 - Oct 1st, 2018 at 1:12pm
 
Thanks to everyone who chipped in on this.

FYI - we were able to resolve the issue by making sure all 3x machines were running the same versions of...

Atmel Studio (7.0.1931)
Visual Micro (1806.2.1)
Arduino Core (1.6.20)
Arduino IDE (1.8.5)

...as long as we're all running the same version of all 4x of those variables - the hex file differences go away.

Smiley
Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print