riscv_em_rv32_mmu_linux.sh
Closed this issue · 9 comments
Hi Mong!
Thanks for reporting! Which toolchain did you use?
If you used my toolchain from here https://github.com/franzflasch/gcc-build-tools then I guess this issue comes from the latest GCC 12 and binutils upgrade. It should work with an older toolchain version below GCC 12.
But I'll take a look and try to fix this asap.
Hello Franzflasch:
I use ubuntu 20.04.4 LTS and 22.04 LTS; both have the same build issues.
The GCC in my system for the 22.04 is gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
and in the 20.04.4 is gcc (Ubuntu 9.4.0-1ubuntu1~20.4.1) 9.4.0
And the riscv compiler from here:
https://github.com/franzflasch/linux_for_riscv_em
Is there any issue with what I have?
Thank you,
Your setup looks fine. The problem is that with newer compilers the zicsr/zifencei extension is not automatically included in the risc-v I extension anymore. That's why the build fails.
The problem should be fixed now in https://github.com/franzflasch/linux_for_riscv_em
Please pull the new changes and do a complete rebuild, best would be to remove the output directory and then do the rebuild.
Great! Glad that it works now.
If you want to add other applications you need to modify the buildroot configuration and change it to your needs.
Hello franzflasch:
When you completed the rv64 version with MMU, let me know; I can be your tester, :)
This looks like you are using 8250 uart instead of my own "simple_uart" implementation. 8250 does not work because it is not fully implemented in the emulator.
I don't know how you build the emulator in codelite but in the original CMakeLists.txt there is a check:
OPTION(RISCV_EM_DEBUG "RISC-V Debug Enable" "1")
if(RISCV_EM_DEBUG STREQUAL "1")
add_compile_definitions(RISCV_EM_DEBUG)
else()
add_compile_definitions(USE_SIMPLE_UART)
endif()
which decides if UART8250 or simple_uart is used.
Just make sure that in your build the global define "USE_SIMPLE_UART" is enabled and "RISCV_EM_DEBUG" is disabled.