VS Arduino
Visual Micro >> Microchip Studio (Atmel Studio 7) >> Hex file build differences. Why?
https://www.visualmicro.com/forums/YaBB.pl?num=1529594395

Message started by abstractjuz on Jun 21st, 2018 at 3:19pm

Title: Hex file build differences. Why?
Post by abstractjuz on Jun 21st, 2018 at 3: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!



Title: Re: Hex file build differences. Why?
Post by Visual Micro on Jun 21st, 2018 at 3: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.



Title: Re: Hex file build differences. Why?
Post by abstractjuz on Jun 21st, 2018 at 4:20pm
Thanks for the quick reply - much appreciated.

Working through these points...


Tim@Visual Micro wrote on Jun 21st, 2018 at 3: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.


Tim@Visual Micro wrote on Jun 21st, 2018 at 3: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?

Title: Re: Hex file build differences. Why?
Post by Visual Micro on Jun 21st, 2018 at 4: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

Title: Re: Hex file build differences. Why?
Post by abstractjuz on Jun 21st, 2018 at 4:48pm

Tim@Visual Micro wrote on Jun 21st, 2018 at 4: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.


JO_boards_001.png ( 42 KB | 2 Downloads )
PS_boards.png ( 34 KB | 21 Downloads )

Title: Re: Hex file build differences. Why?
Post by Visual Micro on Jun 22nd, 2018 at 11:53am
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

Title: Re: Hex file build differences. Why?
Post by Martin Boissonneault on Sep 30th, 2018 at 11:01pm
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

Title: Re: Hex file build differences. Why?
Post by Visual Micro on Oct 1st, 2018 at 11:53am
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.

Title: Re: Hex file build differences. Why?
Post by abstractjuz on Oct 1st, 2018 at 12: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.

:)

VS Arduino » Powered by YaBB 2.6.12!
YaBB Forum Software © 2000-2024. All Rights Reserved.