-
-
Notifications
You must be signed in to change notification settings - Fork 154
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
Using own ELF results in an infinite loop #4
Comments
Can you attach the ELF and I’ll take a look. |
Sure here is it. I've used the objdump command and I've realized that a difference between your provided binary and mine is the boot vector section at the begging. Yours starts from 0X80000000 and mine doesn't have that section at all. But I don't seem to be able to replicate that with the options that I use in my compile.sh script. Any help (or direction) would be appreciated! |
Ok. Your ELF is compiled and linked against newlib. This means that the entry point and memory layout are different, and it will also take quite a long time to run on simulation. If you want to run a cutdown test elf, you could try starting from this project; It has a makefile, linker script (which starts from 0x80000000) and a tiny libc library which is more simulation friendly. |
Thanks for the response! I tried using the project that you provided, but I've been unsuccessful at using the generated binary in biriscv. For the record, I just cloned the repository, run make and used the generated binary in the biriscv icarus simulation (but still with the same infinite loop result). Here is the generated binary and corresponding make output if that helps. What am I doing wrong? Again thanks for your time! |
Same issue for me also. Working with the given elf and not with my own. |
So as the title suggests, I am trying to simulate the CPU with my own ELF files. When doing so the simulator hangs in an infinite loop. I used riscv32-unknown-elf-gcc to compile the *.c code with no other flags or arguments. I've also tried using the example provided but it had the same result. Any ideas why that is?
The text was updated successfully, but these errors were encountered: