EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Sample code for secondary boot from MMC/SD

Started by Greg Nelson December 18, 2009
I'm surprised that I can't find this out there, but so far nothing has
turned up.

The AT91 bootstrap sample application (Bootstrap-v1.14) covers
NAND/NOR/DATAFlash but does not seem to address booting from MMC/SD
card. I'm working with the AT91SAM9RL64-EK, which is supposed to be
able to do this.

I understand that if I have a secondary bootloader, call it boot.bin,
and put it in the root directory of the card, it will boot. I
understand that it would then need a FAT filesystem or something of
the like in order to do the secondary boot. The latter part can
probably be developed from the samples in the at91sam9rl-ek package.
But I don't see anything like source for 'boot.bin' itself out there.

Am I just missing something because I'm searching for the wrong terms,
or is there really not a set of sample source code to do this? Or
does everyone just roll their own, bugs and all?

Thanks,
Greg Nelson
VP of Research and Development
PGT Instruments, Inc. email: g...@pgt.com
303C College Road East phone: 609-924-7310 x303
Princeton, NJ 08540 fax: 609-924-1729
Guess I should follow up on this one, since someone else might be
looking for the answer:

> The AT91 bootstrap sample application (Bootstrap-v1.14) covers
> NAND/NOR/DATAFlash but does not seem to address booting from MMC/SD
> card. I'm working with the AT91SAM9RL64-EK, which is supposed to be
> able to do this.

If you download the whole AT91SAM9xxx-EK software package, version
1.5, it contains a new version of the bootstrap sources. This version
has support for MMC/SD booting. The 1.14 version mentioned above is
still the current one available on the web site, so don't look for it
there.

Interestingly, they have switched from using Yagarto to using
Codesourcery, even though the online documents still recommend
Yagarto.

I was able to compile the example and get it to boot using Yagarto by
changing
CROSS_COMPILE= arm-none-eabi-
to
CROSS_COMPILE= arm-elf-

On a side note, does anyone know why CodeSourcery calls it 'arm-none'
even though it generates elf files?

Thanks,
Greg Nelson
VP of Research and Development
PGT Instruments, Inc. email: g...@pgt.com
303C College Road East phone: 609-924-7310 x303
Princeton, NJ 08540 fax: 609-924-1729

The 2024 Embedded Online Conference