|
I don't have a copy of the SAM9X25 ROM so can't pick you any break point locations.
But with a SAM-ICE/J-LINK you should be able to break the device at reset (RomBOOT), step into it, and then set it to break before it jumps into the SRAM code, or trap it as is re-mapped at zero. Then you can step into, or break point the code you have in SRAM.
To get bootable code into NAND you must build it for 0x300000 (or whatever your SRAM address is), it must contain a valid ARM9 vector table with E5/EA instructions, and the vector at 0x14 must contain a length descriptor which fits within the SRAM (32K limit).
While it gets remapped/shadowed at 0, it's probably better to assume it's at the usual SRAM address.
Note that the "Send Boot File" option sets up the size in the vector at 0x14 for you, other writes to zero will not achieve this. RomBOOT will only jump to code that it believes is valid.
To get a good example of booting code, you should look at the AT91BootStrap examples for your board. SAM-BA also permits you to place code in SRAM or SDRAM, and call it. You could also look at the "getting started" application ATMEL typically provides with the EK's.
That said, a much easier approach is to just get Keil to dump code into SRAM or SDRAM and debug it directly from the IDE.
|