help Top(HAL) doesn't start
Pages: 1 2
Michael Grunditz (467) 531 posts |
I am stuck , and I don’t remember how I did it last time. I have built the image with the standard tools , and fired it up with u-boot. It doesn’t reach Top in HAL at all. Is there some special requirements on where the image should be in memory? Hints are most welcome. |
Chris Hall (132) 3554 posts |
What machine do you have? How you did what last time? Which version of u-boot? Hints are all you will get! Start with the recommended SD card image that is known to work. Alter one thing at a time. Monitor what is happening on a serial terminal. Post the results in enough detail so that someone can help with an explicit comment about exactly where the problem lies. |
Michael Grunditz (467) 531 posts |
This is on target IMX53 ,so I guess there are no more details.. I have checked the Top and Debug with GDB and they work (except from calling kernel ofc). So the question is still , is there any particular step that needs to be done when running it. I do fatload image address;go address. Is there some magic offset that it should start from. I have probed the target with openocd ,and it does nothing , just stops. I don’t know if there been any changes to this. Last time I had this work was two years ago , and I can’t remember if I did anything special. |
WPB (1391) 352 posts |
Someone clever will be along shortly to tell you how it really works, but I believe if you’re using the OMAP3 HAL (as I think you suggested in an earlier post), there’s a jump table at the start of the image to determine the board type. If you fatload at ‘address’, you might have to jump in at ‘address + 8’ to make the HAL do various things correctly for your machine type. I also have a feeling there’s a special offset you can jump in at to say the board type is being passed over as a U-boot environment variable, but I’m not sure. As far as I remember, it’s pretty understandable by looking at the source. Anyway, like I said, someone clever will be along shortly! ;) |
Michael Grunditz (467) 531 posts |
OK The odd thing is that it used to just work :) I have tried to put a fake Top that does nothing then printing to the serialport. It doesn’t start so it has to be somehow in a offset that is different from start address. Anyway setting up Beagle now for development replacing VRPC if it works :) |
Jeffrey Lee (213) 6048 posts |
There’s not much that could be going wrong with a simple ‘fatload’ & ‘go’. Have you double checked with a disassembler that your serial port test looks OK? (e.g. no extra headers have appeared at the start of the file and are causing the machine to crash straight away) In fact, one thing which could be causing problems is the way that romlinker pokes the ROM size into a location near the start of the ROM image. This can be disabled by adding a ‘%noimagesize’ line near the start of your components file (see the OMAP3 components file for an example). |
Michael Grunditz (467) 531 posts |
Phew: MX53-LOCO U-Boot > go 0×70800000
:D \o/ BTW: I have tried to build on beagle now ,but the buildtool gives me postmortem errors.. |
Michael Grunditz (467) 531 posts |
Sigh back to GDB , but at least it points out the exact place where the code crashes :) Very useful. Crash in the early copy routine. I don’t know how to perform DMA copy ( or at least not for this) so I based my copy code on the rpi hal. It fails right after the first “copy”. According to the disasably it should branch back to the right address , but PC ends up in 0×0 == crash. The real fun begins now :) |
Michael Grunditz (467) 531 posts |
Quick status: Addram fails or so I believe because the ram test at the beginning of OS_Start fails.. |
Michael Grunditz (467) 531 posts |
I am now past the the status I had when my harddisk fails , I am somewhere in the middle of OS_Start :) |
Michael Grunditz (467) 531 posts |
Stops in this, no clue why :( :
Exactly here : |
Jeffrey Lee (213) 6048 posts |
That’s a bit of an odd place for it to stop. Are you sure it’s not your debugging lying to you? I’d expect it to stop on one of the LDR’s, due to either v5 or v6 being garbage. Double-check that the parameters to OS_Start are correct. Remember that the wiki has plenty of documentation on the HAL if you get stuck. Also you might want to try disabling the copy/relocation code to keep things simple for now – the OS will usually run no matter where the ROM image is located, and OS_AddRAM should be capable of subtracting the ROM image from the RAM list if you haven’t done it yourself. |
Michael Grunditz (467) 531 posts |
Thanks. I missed a entry in HALdescriptor. Now it stops a little bit down .. The documentation talks about a riscos header as a argument to OS_Start. I have followed the other hal’s and passes HAL_Base+ OSROM_Halsize to a2. The crash is now in the mmu activation code .. |
Michael Grunditz (467) 531 posts |
I am still stuck.. :( I have now tried to use the whole boot process of OMAP3 , except from skipping relocation and changing the ram addresses , uart etc.. . Hangs on mmu or so I believe.. |
Michael Grunditz (467) 531 posts |
Now raFS crashed on me :(( , back to square one. I really hope to be able to build on beagle soon. |
Rick Murray (539) 13840 posts |
Do you have the complete data sheets for the device in question? It seems to me that while the genetic ARM MMU is fairly standard (but evolves/changes with ARM family), there can be vast differences between what the processor is connected to. Double-check that the MMU code is actually doing what you think it is doing. |
Michael Grunditz (467) 531 posts |
Oh well , without my custom code that went away with raFS , I don’t even reach mmu code. I have almost managed to build on beagle , just waiting for cmos widget to make timestamps work :) |
Michael Grunditz (467) 531 posts |
Phew ,It builds on beagle now … :) and I am backing up everything to my NAS with !Sunfish. I hope to be able to build it over NFS .. crossing fingers |
Michael Grunditz (467) 531 posts |
I am losing faith!! Before the raFS crash I had OS_Addram working OS_Start , semi working. Now when I have restored some files from lost+found , not even addram returns. Let me see if I got it right.. Parameters for Addram:
|
Michael Grunditz (467) 531 posts |
Back on track a little , addram returns and I get into OS_Start. |
Michael Grunditz (467) 531 posts |
Fails right here:
What does this macro do? |
Rick Murray (539) 13840 posts |
Found it here. Breaking this down: From the original ARM ARM, what’s in R8 would be:
My later ARM ARM is in the other room, however it might pay to look for the exact settings of CP15 for the device you are using, and then look for the value set in R8. Are you using JTAG? It may not be the instruction failing. You might be doing something like asking for the MMU to be switched on while the MMU tables are incorrect (result = bang!). Some side effect action like that. The datasheet I found wasn’t too helpful; however it claims to be a Cortex-A8 so ought to be compatible with OMAP3 code… |
Michael Grunditz (467) 531 posts |
Gah , can’t find it anywhere. Question sent to Freescale. As far as I can see it should follow the standard. |
Michael Grunditz (467) 531 posts |
OK time for a update: I have made a small elf out of the assembler that kicks life in the mmu (from u-boot). I have only to test it with jtag. I have a new shiny ARMini and the XM in it is a lot better than my original beagle. Excelent casing , and a nice collection of software. This gives me no excuses ( apart from demanding job projects) to strugle on with the i.MX port. |
Raik (463) 2061 posts |
Please, I like to develop;-) |
Pages: 1 2