I have a Due and using the Blink example sketch. When I upload it using the Programming port, it's not a problem. However, I'm having an issue when exporting the compiled binary. I use the sam-ba utility to program it on the processor, and that works fine (I can check the flash and the binary is indeed programmed).
However, it doesn't boot into the Blink program. I opened the binary in a Hex editor, and see this:
Now, according to this App Note from Atmel:
The first word in the file gets put into the Stack Pointer (SP). That's fine, as the address there is in the SRAM memory space.
The second word gets put into the Program Counter (PC) and then execution proceeds from there. However, as you can see from the binary file, the second word is not even a word-aligned address, so that's not a valid PC value.
Am I missing something, or is the export compiled binary not working correctly?