booting up

49 views
Skip to first unread message

Greg Reynolds

unread,
Mar 24, 2012, 3:07:34 PM3/24/12
to linux...@googlegroups.com
Hi Everyone,

I've built a board based around the Linuxstamp 2 design - I have dataflash and NANDflash and SDRAM in a (hopefully) identical setup to the Linuxstamp 2.

My board powers up and I get to the "ROM Boot" part (I'm using the DBGU interface, i.e. not USB or JTAG), but I am having difficulty with the next part. As I understand it I have to load a program into SRAM0 at address 0x00200000 then execute that. That will let me initialise the board properly (including the SDRAM controller) so I can upload a more complex boot loader, including programs to flash the dataflash and NAND.

I tried to use SAM-BA for this, but I couldn't make it work properly, so I wrote a program to send data from the PC to the board. I can now write my chosen binary to the target address and read it back successfully. 

But the question is which binary to write? I have tried the following:
- the AT91 bootloader (as found on the Linuxstamp website) - this appears to crash, i.e. nothing comes out of the serial port and control is not passed back to ROM Boot
- the "extram" applet programs that come with SAM-BA 2.11 - this also appears to crash
- a trivial binary compiled using ARM gcc (does nothing, just returns) - this appears to run, i.e. control returns to the ROM Boot interface

So to summarise, my questions are:
- What do I do for a bootloader?
- Is handcrafting my own bootloader madness or is it a regular thing to do?
- Has anyone else tried to start a board with completely empty chips? I think that Paul has his chips pre-programmed before he assembles the board - a wise chap it seems!

Thanks,

Greg

Paul Thomas

unread,
Mar 24, 2012, 4:24:27 PM3/24/12
to linux...@googlegroups.com
See below.

On the Linuxstamp II at91bootstrap is the primary bootloader and
u-boot is the secondary. You can grab these sources from Atmel &
u-boot respectively or from the ftp site
(http://linuxstamp.budgetdedicated.com/index.php?dir=lnst2_9g20/src/).

> - Is handcrafting my own bootloader madness or is it a regular thing to do?

It's not too awful, but the at91bootstrap is very easy to use and modify

> - Has anyone else tried to start a board with completely empty chips? I
> think that Paul has his chips pre-programmed before he assembles the board -
> a wise chap it seems!

For development I use JTAG with openocd, but others have been
successful with sam-ba

>
> Thanks,
>
> Greg
>
> --
> You received this message because you are subscribed to the Google Groups
> "linuxstamp" group.
> To post to this group, send email to linux...@googlegroups.com.
> To unsubscribe from this group, send email to
> linuxstamp+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/linuxstamp?hl=en.

Greg Reynolds

unread,
Apr 1, 2012, 8:39:41 AM4/1/12
to linux...@googlegroups.com
Hi Paul,

Thanks for the response. I've now got my bootloader working partly, based on the AT91 code. I had to change the clock settings as I am using an external oscillator (rather than a crystal). 

Best wishes,

Greg

--
Greg Reynolds
Technical Director
Pattern Analytics Research Ltd.

Wellington House
Starley Way
Birmingham International Park
Solihull
West Midlands
B37 7HB
+44(0)121 781 7419
Reply all
Reply to author
Forward
0 new messages