SAM3X8E ROM "Boot Program" question..

Discussion around product based on ARM Cortex M3 core.

Moderators: nferre, ncollot

k2tom
Posts: 5
Joined: Wed Jan 21, 2015 10:49 pm

SAM3X8E ROM "Boot Program" question..

Thu Jan 22, 2015 10:39 pm

I'm trying to use the SAM3X8E "Boot Program" (on an Arduino Due). I'm able to XMODEM my program to SRAM (with "S<addr>,#"). But when I try to run it (with "G<addr>#"), it just hangs.

I'm compiling my program with YAGARTO.

I've done this sort of thing (with the Atmel ROM boot program) many times in the past: with the Netduino (AT91SAM7X512) and the MiniBox picoSAM9G45 (AT91SAM9G45). And I've built Cortex M-3 bootloaders for the Netduino 2 (STM32F205).

A LONG time ago, I remember (though, for the life of me, I can't remember WHERE) reading some sort of "principles of operation" for the boot program. I seem to remember (?) that the "Go" command does a lot more than just jump to the specified address. (But I may be confusing the 7X's (and 3X's) "boot program" with the 9G's NVM boot program.) I was hoping that my program could "pick up" from where the boot program "left off" (i.e., clocks setup, stack setup, PIO PINs setup, UART setup, ...).

Can anyone comment on what the 3X ROM boot program REALLY does? And are things different for the 3X (than, e.g., the 7X), because of the (old) ARM vs the (newer) Cortex M-3 architectures? For example, do I need to "Go" to "<addr>+1"?

And what're the minimal "setup/initialization" steps my software has to do "out of the gate"?

Thanks,

Tom
k2tom
Posts: 5
Joined: Wed Jan 21, 2015 10:49 pm

Re: SAM3X8E ROM "Boot Program" question..

Mon Jan 26, 2015 3:02 pm

Answering my own question...

The problem is that the "target" (address) of the SAM-BA G(o) command is not a code address.. or a Thumb2/CM3 "address+1." The Go target has to be an SP-PC pair (where the PC is the address+1).
xzmanya
Posts: 1
Joined: Sat Apr 11, 2015 12:06 pm

Re: SAM3X8E ROM "Boot Program" question..

Sat Apr 11, 2015 12:12 pm

I've done this sort of thing (with the Atmel ROM boot program) many times in the past: with the Netduino (AT91SAM7X512) and the MiniBox picoSAM9G45 (AT91SAM9G45). And I've built Cortex M-3 bootloaders for the Netduino 2 (STM32F205).??/
raza
k2tom
Posts: 5
Joined: Wed Jan 21, 2015 10:49 pm

Re: SAM3X8E ROM "Boot Program" question..

Sat Apr 11, 2015 1:53 pm

Sorry.. I guess I don't understand what your question is.

Return to “SAM3 Cortex-M3 MCU”

Who is online

Users browsing this forum: No registered users and 1 guest