|
Hey all,
Just want to share my experience with getting the bootloader to work on the NAND flash with our AT91SAM9261.
I had to compile the bootloader from source to customize it. I could boot fine from the SD card, but when I transferred the bootloader to 0x0 of the NAND flash it just would not boot.
I checked the output binary with arm-none-eabi-objdump and noticed the 7th exception vector was NOT as required by the datasheet. This vector is supposed to be the size of the bootloader to be copied to sram. Mine was just showing 'b ReservedVector'.
I solved this by modifying the file board_cstartup.s as follows:
reservedVector: // b reservedVector /* Reserved for future use */ .byte 0x00, 0x64, 0x00, 0x00 /* 0x6400 bytes represents size of bootloader */
In my case, the binary was 24,952 bytes = 0x6178, so I used 0x6400 to allow some headroom for possible changes.
Hope this helps someone else out there - took me hours to figure it out!
|