Softpack in ddram on sama5d2 xult using bootstrap

Discussions about all user software around SAM Series.

Moderator: nferre

Posts: 6
Joined: Wed Feb 17, 2016 10:26 pm

Softpack in ddram on sama5d2 xult using bootstrap

Fri Feb 19, 2016 4:41 pm


I'm currently trying to get the softpack examples to load from ddram using a self compiled at91bootstrap.

What worked so far:
- compiling the getting started demo
- flash it as bootimage to the serial flash 0x0 and run it from internal SRAM
- LED is blinking

- flash the demo linux image using samba
- compiling my own bootstrap version from source
- upload both via samba (bootstrap to 0x0, uboot to 0x8000)
- successfully used it to flash uboot to DDRAM and test it via the edbg terminal

I then modified the bootstap using 'make menuconfig' as follows:

Code: Select all

- flash offset: 0x8000
- image size: 0x80000
- external ram addr: 0x20000000
- Load 1 MB into start of SDRAM
then I compiled the getting started example:

Code: Select all

make TARGET=sama5d2-xplained VARIANT=ddram
VARIANT=ddram uses the dram linker file and I verified the start address to be 0x20000000 in the .map file

using samba I flashed my at91bootstrap to 0x0 and the getting started image to 0x8000 in the serial ram.

The problem is after a reset the LED is not blinking. But since the uboot upload with my custom bootstrap is working, I guess the problem is somewhere related to the getting_started.bin

any steps that I'm missing to prepare the binary file for the SDRAM?

Thanks a lot! :)
Posts: 6
Joined: Wed Feb 17, 2016 10:26 pm

Re: Softpack in ddram on sama5d2 xult using bootstrap

Tue Feb 23, 2016 9:37 am

I finally have my jlink up and running to have a closer look at things.
The strange part is running GDB server, both the bootstrap and getting started LED example work :-/

- uploaded at91bootstrap.bin to 0x00
- uploaded getting_started.bin to serial flash 0x08000

with debugger:
- using gdbserver and eclipse I uploaded the bootstrap.bin to sram
- stepping through I see the dram is initialized and the getting_started data is uploaded to memory location 0x20000000
- when the jump address is called the LEDs start blinking as they should. getting started is running.

Without debugger:
- nothing happens

So I modified the at91bootstrap to light up an LED to see if it is running and if the rom bootloader is loading it correctly.
In both cases, with and without the debug probe, the LED is lighting up, so the bootstrap seems to be running fine.

Now I'm not really sure how to proceed further. I should get a matching FTDI cable the next days, since the EDBG com port comes up too slow to show the bootstrap messages. Maybe the uart debug messages will tell me what goes wrong in the standalone version.

Return to “Software”

Who is online

Users browsing this forum: No registered users and 1 guest