AT91Bootstrap doesn't load

Discussion around AT91RM9200 and SAM9 Series Products.

Moderator: nferre

wesperos
Posts: 8
Joined: Sun Jan 15, 2017 3:37 pm

AT91Bootstrap doesn't load

Wed Jan 18, 2017 1:32 pm

Hello folks, a newcommer here!



I've just jumped into the world of ARM, and made my own custom board with AT91SAM9N12, some NAND Flash and DDR2 DRAM on it. I have copied the design from this fantastic guy here(his source code is on Github). I'm trying to load AT91Bootstrap on the flash and see how doesn it work. In the future, I plan to have it load U-boot and Linux.



Anyways, I have followed closely tutorials about AT91Bootstrap from hereand managed to get it configured and compiled with no errors reported. I was using xUbuntu virtual machine to do all that.



Using SAM-BA on Windows I have sent a boot file to the NAND Flash and it also went OK. However, looking at the serial output I don't see AT91Bootstrap loading. It only says "ROMBoot" and nothing more. I was expecting some hw initialization messages but nothing happened.



Any suggestions why is that so? Where to start looking for the failure?



Regards,



W.
blue_z
Location: USA
Posts: 1560
Joined: Thu Apr 19, 2007 10:15 pm

Re: AT91Bootstrap doesn't load

Thu Jan 19, 2017 2:45 am

wesperos wrote:I've just jumped into the world of ARM, and made my own custom board with AT91SAM9N12, some NAND Flash and DDR2 DRAM on it.
So you went from no external RAM nor flash to a populated board.
What did you do to verify assembly other that try to execute AT91Bootstrap?
Did you run a comprehensive memory test?
wesperos wrote:Using SAM-BA on Windows I have sent a boot file to the NAND Flash and it also went OK.
Did you verify the NAND after this step (i.e. read back the contents)?
wesperos wrote:It only says "ROMBoot"
You're not accurately reporting what happens. It's "RomBOOT".
wesperos wrote:Any suggestions why is that so? Where to start looking for the failure?
You can try loading at91bootstrap.bin directly into SRAM using SAM-BA, and see if it actually executes (to validate your build).
Did you bother to study the "Boot Strategies" chapter in the datasheet as previously mentioned?
Does your board have DRAM or NAND component differences with the Atmel EK board?

Regards
wesperos
Posts: 8
Joined: Sun Jan 15, 2017 3:37 pm

Re: AT91Bootstrap doesn't load

Thu Jan 19, 2017 11:49 am

Thanks for the answer Blue_Z
blue_z wrote:So you went from no external RAM nor flash to a populated board.
What did you do to verify assembly other that try to execute AT91Bootstrap?
Did you run a comprehensive memory test?
That is right - I've populated it :)
I tested everything using SAM-BA, like "Enable NAND Flash" or "Enable DDR" applets. You don't think it's enough?
Comprehensive memory test... I don't know how to do it. Any hint on where to start?

blue_z wrote:You can try loading at91bootstrap.bin directly into SRAM using SAM-BA, and see if it actually executes (to validate your build).
That sounds as a good start. Is it enough to "send file" to RAM (when you say SRAM, did you mean DDR2 SDRAM?), or do I need some special procedure to do that?

blue_z wrote:Did you bother to study the "Boot Strategies" chapter in the datasheet as previously mentioned?
Does your board have DRAM or NAND component differences with the Atmel EK board?
Well, yeah, I did everything as explained in Linux4SAM tutorial on AT91Bootstrap and went through a couple of projects that did the same as I do. So, yes, I do have different DDR2 chips (64MB instead of 128) but I patched config files as well as .c and .h files.

However, even if my build wasn't correct, when I put .bin into the NAND Flash, it will fail in initialization but it will at least say something like "Hi, I am AT91Bootstrap program and you did something really bad in my configuration". Right?
blue_z
Location: USA
Posts: 1560
Joined: Thu Apr 19, 2007 10:15 pm

Re: AT91Bootstrap doesn't load

Fri Jan 20, 2017 3:32 am

wesperos wrote:when you say SRAM, did you mean DDR2 SDRAM?
Are my posts so littered with misspellings and typos?
Have you completely forgotten the memories discussed in your prior thread?
wesperos wrote:However, even if my build wasn't correct, when I put .bin into the NAND Flash, it will fail in initialization but it will at least say something like "Hi, I am AT91Bootstrap program and you did something really bad in my configuration". Right?
Wrong, you're not guaranteed anything.
wesperos
Posts: 8
Joined: Sun Jan 15, 2017 3:37 pm

Re: AT91Bootstrap doesn't load

Fri Jan 20, 2017 11:35 am

blue_z wrote:Did you verify the NAND after this step (i.e. read back the contents)?
Something interesting happens with the NAND.
"Send Boot File" works fine. Read out doesn't. Sam-Ba freezes and doesn't finish the read out.

It doesn't let me write or read the file either, when I'm using the "Send file" option.

But, when I change the memory address from 0x0 to something really big, like 0xDF000, everything works fine.

What could be the reason for this?
wesperos
Posts: 8
Joined: Sun Jan 15, 2017 3:37 pm

Re: AT91Bootstrap doesn't load

Sat Jan 21, 2017 12:07 pm

blue_z wrote:You can try loading at91bootstrap.bin directly into SRAM using SAM-BA, and see if it actually executes (to validate your build).

I did it. What should I expect to happen with this? Unfortunately on serial output nothing new was seen..Does this indicate bad build? Wrong compiler?
blue_z
Location: USA
Posts: 1560
Joined: Thu Apr 19, 2007 10:15 pm

Re: AT91Bootstrap doesn't load

Tue Jan 24, 2017 2:43 am

wesperos wrote:"Send Boot File" works fine.
Incorrect, that is your unsubstantiated conclusion.
You have not provided any evidence that any data was written correctly to the NAND flash.
The only thing that you observed and can report is that the SAM-BA operation completed without displaying any error message.

Note that your board's designer knows that a write operation should be verified (i.e. look at the SAM-BA dialog).
wesperos wrote:It doesn't let me write or read the file either, when I'm using the "Send file" option.

But, when I change the memory address from 0x0 to something really big, like 0xDF000, everything works fine.
Now you're conflating the symptoms, and not making any sense.
I don't understand what "memory address" you are referring to.

Return to “SAM9 ARM9 MPU”

Who is online

Users browsing this forum: No registered users and 3 guests