Closed kuoyaoming93 closed 2 years ago
I asked the same question in riscv-collab/riscv-gnu-toolchain#1053. It seems that it is related to RISC-V spec version. In the new ISA spec, the csr instructions are part of the zicsr extension.
It should change from -march=rv32imac
to -march=rv32imac_zicsr
in the Makefile for the latest toolchain versions.
Solutions:
-march=rv32imac
or -march=rv32imac_zicsr
depending on the version. -march=rv32imac_zicsr
in independent .mki files.
Hi all,
I am trying to install the RISC-V GNU toolchain from source in order to test this core.
I followed the guidelines to install the toolchain (2022.03.25 version), opting for the multilib option.
After that, when I execute the following command to see the supported archs:
Then, I cloned the SweRV-EL2 RISC-V core, and try to run the hello_world simulation, the following error appeared when I build hello_world.o:
Did I forget something in the configuration stage?
Thank you in advance!