I have recently designed and built a custom board using the AT91SAM9260 (Rev A) processor. The design consists of one MT48LC16M16A2 memory chip (instead of using two chips in similar fashion to the evaluation kit); the CS of the boot code memory (AT45DB642D) is on CS1 of SPI0; and a number of peripherals have been interfaced (image sensor, I2C, SPI). I intend to boot with BMS = 1 (Boot on embedded ROM).
My goal is to use the AT91 bootloader (available from the Atmel website), and to load this bootloader into the first 4k of flash memory using the SAM-ICE version 6.0 and the SAM-BA software over JTAG. I have modified the SDRAM configuration in the bootloader and in the SAM-BA TCL scripts to ensure 16-bit instead of 32-bit (because I am only using one SDRAM memory chip).
I have been successful in loading the AT91bootloader using SAM-BA. I have also modified the bootloader to turn on two LEDs that have been interfaced with GPIOs. So far, so good.
My next step is to write an application that is placed at some other address in flash, and to have the bootloader download the application into SDRAM.
As part of my first try, I once again used the bootloader code as a "skeleton app" that is placed at some other location in flash memory. However, I cannot get the bootloader to load the "skeleton app" that I have prepared.
Has anyone done something similar? How do I select the:
(as defined in "at91sam9260ek.h").
In addition, the Makefile for the bootloader lists
Do I need to change the link address and top of memory variables to be able to load this "skeleton app"? Where do I load my application using SAM-BA?
Since the AT91 bootloader has configured the processor, do I need to configure it once again in my application? If I do not have to configure it once again (i.e. the assembler startup crt0_gnu.s is not required), then how do I write a program that will be loaded by the bootloader? Do I still need an assembler routine?
Can anyone point me to an example? I think that most of the code posted on the Atmel website relies on startup routines. These routines go through and start up the processor, etc. For my application, the startup routine is probably not necessary (since the bootloader has done the startup). I don't intend to run Linux on the AT91SAM9260, and the code loaded by the bootloader would be my own code.
Thank you so much for your time and assistance.