|
>>Has anyone loaded their own bare metal code using at91bootstrap? If so what did you do. That will probably get me most of the way through this issue.
Yes, you have 16KB of space, arguably closer to 32KB if you use both SRAM blocks, and you keep the stack in check. You can do a lot of work in 16KB, you can certainly talk to SPI devices. Not sure how you'd pass parameters to uBoot, but I think loading the kernel would be just a matter of pulling the image from NAND, handling ECC, set up the parameter block, and jumping into the kernel image. I'm not convinced uBoot does anything magic, it just has a lot of features and functionality. You'd be hard pushed to boot linux directly on a 4 KB 9260, but a 16 KB 9G20, that's a whole other matter.
AT91 arbitrarily loads 256KB from NAND, or where ever, into the top of SDRAM at 0x23F00000, ie top 1 MB of 64 MB. This could frankly be anywhere within the SDRAM starting at 0x20000000 once you have initialized it, and limited by the SDRAM size, presumably up to 256 MB, but likely 32 or 64MB in most vanilla implementations.
Your dealing with an ARM9, so you can pretty much compile a classic bootable image, at this address, with vectors, copy the vector table into the base of SRAM, and map the SRAM to zero. This way the ARM9 can use interrupts with your code, as you can't rebase the vectors. If you've done much ARM7/9 development work this should be pretty straight forward.
If you don't need to handle interrupts/faults, you can just jump into linear ARM9 code(subroutines), straight out of AT91BootStrap, with little, or no, additional initialization code.
|