chipsalliance / VeeRwolf

FuseSoC-based SoC for VeeR EH1 and EL2
268 stars 61 forks source link

Error when building Zephyr example #63

Open aleksaj-vtool opened 1 year ago

aleksaj-vtool commented 1 year ago

Hi,

I'm following the steps stated in README.md but can't get zephyr/samples/basic/blinky to build. I get really strange error about unrecognized opcodes.

/home/aleksa/RISCV/swervolf/zephyr/include/arch/riscv/arch.h:124: Error: unrecognized opcode `csrrc a4,mstatus,a4'
/home/aleksa/RISCV/swervolf/zephyr/include/arch/riscv/arch.h:141: Error: unrecognized opcode `csrrs a4,mstatus,a4'
/home/aleksa/RISCV/swervolf/zephyr/include/arch/riscv/arch.h:124: Error: unrecognized opcode `csrrc s0,mstatus,s0'
/home/aleksa/RISCV/swervolf/zephyr/include/arch/riscv/arch.h:141: Error: unrecognized opcode `csrrs s0,mstatus,s0'
/home/aleksa/RISCV/swervolf/zephyr/include/arch/riscv/arch.h:124: Error: unrecognized opcode `csrrc a5,mstatus,a5'
/home/aleksa/RISCV/swervolf/zephyr/include/arch/riscv/arch.h:141: Error: unrecognized opcode `csrrs a5,mstatus,a5'
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /usr/bin/cmake --build /home/aleksa/RISCV/swervolf/zephyr/samples/basic/blinky/build

this is the last couple of lines of output.

The command I'm using is west build -b swervolf_nexys

Any help is appreciated.

olofk commented 1 year ago

I recognize this error but I can't remember where it comes from. My first guess would be that your toolchain is tool old (or too new?). If you can tell me the version of your SDK/toolchain we can start there and see how to fix this.

aleksaj-vtool commented 1 year ago

Yeah, I found the issue. The latest Zephyr SDK (Zephyr SDK 0.15.2) doesn't work. I had to revert all the way to 0.13.1 for it to compile. I'm not sure what is the problem tho.

aleksaj-vtool commented 1 year ago

I would just specify in the readme the exact version of SDK needed to build so other people don't run into the same issue.