Hi,
I understand the the question is not related to Visual Micro extension, but we are experiencing some really nasty bugs because the compiler goes crazy.
A colleague of mine develops with AtmelStudio 6.2 - I understand it's not the latest and greatest, but we prefer not to upgrade for now. Two Arduino IDEs are installed: 1.5.7 and 1.0.6.
Working on a project with 1.5.7, target Atmega 2560, the compiler suddenly acted strangely. First some Serial.Print() would not work. The guy spent a few hours to find what was wrong - nothing's wrong with the code - and at one point the compiler generated badly formed binaries, the program simply hanged.
Then he went to the 1.0.6 IDE and the compiler this time did it right... sort of. The program seems to behave correctly, but the .hex file is, hum, strange. I noticed because I created a small tool that rewrites part of the .hex to write a serial number.
To make a long story short, I first make a bin file from the hex file - works much better with a bin file - search for the position of a specific string and then overwrite the faked serial number. Then I convert that edited bin file to a hex file. Thing is, that specific string is found 10+ times, and that fools the tool. To make sure my colleague searched for that string in the hex file, and found ou that the .hex generated by the compiler - or avrdude ? - hex file was wrong at the beginning.
Sorry for the long story, but that bugs us a lot
.
Any help would be appreciated.
PS I know that first a .elf file is created, and then it's converted in an hex file. Could that be this process that fails ?