Page 1 of 1

Debugging a boot sequence

Posted: Thu Jun 07, 2018 6:25 pm
by colingd
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

Re: Debugging a boot sequence

Posted: Thu Jun 07, 2018 10:01 pm
by blue_z
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

Re: Debugging a boot sequence

Posted: Fri Jun 08, 2018 3:43 pm
by colingd
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,

Re: Debugging a boot sequence

Posted: Fri Jun 08, 2018 9:24 pm
by blue_z
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