-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Boot stalls at address 0x80001CBC #5
Comments
Hello and thank you for being intersted in this project! For your question:
Yes, I have experienced it a lot since I move to 8MHz. In some cases when I'm lucky I was able to boot to clocksource or sth, but then it stuck. I have no idea why.
I don't know too. But usually, I would double check the SD connection. Also I will try check the assembly at the PC address, by loading the image into IDA, then check that address (remember to rebase the image in IDA).
I modified mini-rv32ima to dump the RAM image immediately after it loads all the stuff to RAM. Something like this, but newer (the link is the old ver).
I use the same build files as cnlohr's. Nothing changed.
Yes, that would be a surprise if it didn't. Just remember to set RAM amount to 16MB |
Thank you, these points already helped a lot! Afterwards, I was able to figure out that the indefinitely looping traps occur after a kernel panic. So I compared the value of the avr32-opt calculation (0x80FFF93C) with the one mini-rv32ima (0x80FFF940). |
Ok, I am confused again. The wrong value was caused because I adjusted the |
You added a buffer for UART? input_buf = (char*)malloc((INPUT_LEN+1)*sizeof(char));
memset(input_buf, 0, INPUT_LEN+1); Well, since the UART itself also has problem when you type into the prompt (it only take first 2 characters, then finally an enter; probably because AVR's UART register only save only value at a time, and can't get more), I also wanted to implement a FIFO buffer for it (but I was too lazy). Now I will try adding it, and hopefully it will fix the UART problem. Overall I think your changes look good for me. I will merge it if you create a PR. Thank you for contributing! |
Ahh, that's good to know. I'll see how mine behaves. Still booting, just printed |
Wait for it!
Yes I know, that's why I said |
I think the issue can be considered as resolved after reverting the SD commit. After coremark completed I still might try to check what causes the kernel to panic in the fast SD card mode...(therefore, leaving to you whether you want to close it now) |
Congratulation on successfully booting Linux on your Arduino UNO! Btw did you measured the time?
I also want to know it, I don't think I can wait 16 hours again for Linux to boot. P/S: if you have time, please take a look at a branch named |
I think it was around 15h 30min for me. Ohh, I like the restore idea! Was thinking whether I could obtain the register values even from my current boot, write them to the SD manually and restore them after the code is complete. However, I am afraid there is no point were all caches are flushed to the SD, right?! Than at least a way to flush the caches would be needed for the next boot. When do you want to store all the data to the SD card? Each time B1 is pulled low? |
You might use another digital pin for restore button, or you can use the command menu you added to the state dump (the command menu for debugging), and add a command to save state and load state or sth |
I tried to avoid booting by restoring, but not too successfully.
Then I booted the emulator to the command prompt and hit CtrlC. Removing all the code from the emulator which modifies the state and loading this dumped file works great. The system continues were it was before. However, using the same dump on the Arduino did not work.
I confirmed that the core has all registers set properly afterwards. However, on the first attempt a kernel OOPS happened and on the next attempt there was no output at all and it ended up at 0x80001CBC again. |
I made the exact same mistake! The problem is that when you press CTRL+C, the excution loop, wherever it is, will break, and the current state is saved to your file. As you know, there is a macro that define the number of instruction to execute (in the emulator's So what can you do? When you press CTRL+C, the CtrlC handler function will set a flag. In the loop, after calculating the timer value and right before calling to the emulator function, do a if check to see if the break flag is set. If yes, then save the state and exit. This should work. |
I will close this as it's no longer an issue. Feel free to reopen or create a new issue report if you want. |
Thank you very much for this amazing project. Really interesting idea!
Issue
I tried to boot on the Arduino, however even after waiting for a night there is no further output except for
Dumping the state returns this:
Troubleshooting
The text was updated successfully, but these errors were encountered: