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

Error when building Zephyr example #63

Open
aleksaj-vtool opened this issue Jan 30, 2023 · 3 comments
Open

Error when building Zephyr example #63

aleksaj-vtool opened this issue Jan 30, 2023 · 3 comments

Comments

@aleksaj-vtool
Copy link

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
Copy link
Collaborator

olofk commented Jan 31, 2023

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
Copy link
Author

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
Copy link
Author

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.

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