|
It depends a lot of what you actually want to achieve by accessing the external SRAM in SAM-BA.
I'm using an earlier version, but there I'd add the bus initialization in with the SDRAM applet(s), I'm using a different SDRAM than the 9G20-EK on a custom board, and modified a couple of applets and scripts to reflect my hardware arrangement. That way you could load and execute the code from either Ext SDRAM or Ext SRAM based on the address you used. Running/debugging code from SAM-BA is rather laborious.
However, that's not how I'm running code in RAM these days. It's far easier to use Keil and some of the SAM-ICE project options. Configuring the initialization scripts to poke the appropriate EBI configuration registers (width, timing, mapping, etc) within the chip, before it downloads the application into the memory address(es) specified in the project. This permits me to load and debug code directly from the SRAM, SDRAM, etc by attaching a JTAG pod, and hitting a few buttons.
If you're doing Linux, you should initialize your SRAM from within the AT91BootStrap, and perhaps load uBoot into the SRAM instead of the SDRAM as it does normally. You'd have to compile for the alternate addresses.
But, it all depends on your goals are, and what tools you have to work with, and how much time you have.
|