Skip to content
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

when I run this command , it gets some errors. make clean simulate verify postverify XLEN=32 RISCV_DEVICE=I #26

Open
jundijiujieke opened this issue May 23, 2023 · 4 comments

Comments

@jundijiujieke
Copy link

when I run this command , it gets some errors. make clean simulate verify postverify XLEN=32 RISCV_DEVICE=I
It shows 'src/JALR-01.S:31: Error: unrecognized opcode csrw mepc,t0', extension zicsr' required'
image

@duncangraham-Imperas
Copy link
Contributor

This appears to be a cross compiler toolchain configuration issue. Earlier toolchains included zicsr as default because it was part of RV32I etc. This was later made optional so must be specifically enabled.
What toolchain are you using?
I expect the march argument should be modified to specify that extension zicsr is required, typically by adding _zicsr to the march field.
Try changing riscv-test-suite/rv32i_m/I/Makefile so that -march=rv32i_zicsr .. this syntax may not be exactly right! I hope the toolchain GCC help would provide a clue if not.

@jundijiujieke
Copy link
Author

Thanks for your advice. I am using the riscv64-unknow-elf-gcc, so do these tests have to work on the riscv-32 bit toolchain? Maybe it is the problem about my compiler toolchain.

@duncangraham-Imperas
Copy link
Contributor

Sorry, riscv64-unknown-elf-gcc does not narrow down the toolchain you are using; I have seen many versions that provide this.

Please let me know where you downloaded and the result of executing
riscv64-unknown-elf-gcc --version

@jundijiujieke
Copy link
Author

This is my riscv64-unknown-elf-gcc version 12.2.0
image
and I download the riscv64-unknown-elf-gcc from this link.
https://github.com/riscv-collab/riscv-gnu-toolchain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants