Debugging a boot sequence

Discussion around AT91RM9200 and SAM9 Series Products.

Moderator: nferre

colingd
Posts: 5
Joined: Wed May 02, 2018 3:42 pm

Debugging a boot sequence

Thu Jun 07, 2018 6:25 pm

Hi all,

I've come across an issue and I can't seem to figure out how to fix it. I've got a AT91SAM9G20-EK board. I ran the demo project flawlessly on the nand flash. Ported FreeRTOS and debugged it using j-link and gdb. The port doesn't seem to have any bug now and runs fine when loaded over using gdb, ie loading it and entering continue command, makes the board work just fine . However, whenever I boot right from the nand flash using AT91Bootstrapp without any subsequent boot software, i. e. no uboot, I run in the following bug. So the image has been loaded, at91bootstrapp prints a message on the debug port, successfully into sdram and, right after the boot; the program counter will jump to data abort exception and the stack pointer is pointing to prefetch abort. I figured this out while debugging at91bootstrapp using j-link and gdb aswell. Could any one give some sort of advice of what to look for? I've noticed that this happens too when the image is a bit larger, though less than the max size set up in at91bootstrap. Is there some way to verify that the nand flash is healthy as well as for sdram? Also, doesn't work either when loading it directly to SDRAM using SAM-BA.

Cheers,

Colin
blue_z
Location: USA
Posts: 1768
Joined: Thu Apr 19, 2007 10:15 pm

Re: Debugging a boot sequence

Thu Jun 07, 2018 10:01 pm

colingd wrote:So the image has been loaded, at91bootstrapp prints a message on the debug port, successfully into sdram and, right after the boot; the program counter will jump to data abort exception and the stack pointer is pointing to prefetch abort.
This reads a lot like your original problem.
You haven't provided any salient details to prove that this is not the same problem.

colingd wrote:Is there some way to verify that the nand flash is healthy as well as for sdram?
Sure, do a read verify after the write operation. Run a memory diagnostic.

Maybe you would be better served by inserting U-Boot into the boot sequence. With its command line interface, you can easily read and write NAND, and inspect memory.

Regards
colingd
Posts: 5
Joined: Wed May 02, 2018 3:42 pm

Re: Debugging a boot sequence

Fri Jun 08, 2018 3:43 pm

Hello blue_z,
You haven't provided any salient details to prove that this is not the same problem.
I don't understand what you've written. To which problem are you referring to?


I'm not sure of how to interpret the fact, that it's not working when I load it into SDRAM, be it using SAM-BA on a host computer or with at91bootstrapp but it's working fine when loaded and run through gdb, which loads to SDRAM. Am I correct?

I'm trying uboot at the moment.

Cheers,
blue_z
Location: USA
Posts: 1768
Joined: Thu Apr 19, 2007 10:15 pm

Re: Debugging a boot sequence

Fri Jun 08, 2018 9:24 pm

colingd wrote:I don't understand what you've written. To which problem are you referring to?
Why are you confused? You have only posted one previous problem, which involved a discrepancy between the load address of the binary image and the target address used by AT91Bootstrap.

Regards

Return to “SAM9 ARM9 MPU”

Who is online

Users browsing this forum: No registered users and 2 guests