Go Down

Topic: Export compiled Binary problems (Read 341 times) previous topic - next topic

establon

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:
0x00000000: 0x20808000
0x00000004: 0x00800625

Now, according to this App Note from Atmel:
http://www.atmel.com/Images/Atmel-42141-SAM-AT02333-Safe-and-Secure-Bootloader-Implementation-for-SAM3-4_Application-Note.pdf

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?

Go Up