Forum Discussion
Altera_Forum
Honored Contributor
21 years agoUBoot
Hi All, Seems I'm posting every day so apologies and bare with me. Has anyone encountered behaviour with UBoot such that it will boot from SDRAM but not from FLASH? I've downloa...
Altera_Forum
Honored Contributor
21 years agoHi Scott,
Okay i'm using a II/f I'm booting from EPCS (see all the numerous other threads http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/wink.gif !! ) UBoot is in the EPCS, it , as far as I can tell, comes up cleanly. Certainly all the prompts/commands seem to work so I don't think it's corruption there. (Although of interest I did get a couple of times an illegal instruction trap inside uboot but that went away and hasn't returned). UBoot is copied into the high end of SDRAM, My application comes from FLASH at location 0, obviously therefore the flash and sdram ram pins are separate (basically it's a cyclone dev board). It gets copied into the bottom of SDRAM replacing the uboot exception trampoline. I've manually, and correctly, relocated the .entry section of the app from what would have been epcs base to SDRAM base, so that the instruction cache is initialised correctly. Like I say though it is weird in that it sometimes works and othertimes not. When bootm fails it just hangs, sits there and does the knitting! http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/wink.gif , no error messages of any sort. If I do an iminfo on location 0 it checks out fine, CRC is all good etc. Additionally if I remove the final call to kernel() in do_bootm_linux and do a cmp.b between the SDRAM data and my image (+ 0x40 to allow for the image header) it all checks out as correct, i.e. it was copied correctly. I'm wondering if it is a cache problem with the data cache (containing the copied instructions) not being flushed before calling?