|
From: | Tommy Murphy |
Subject: | How to enable Zicsr extension support on qemu-riscv32? |
Date: | Sun, 25 Jun 2023 20:44:33 +0000 |
Hi there
I've tried searching to find an answer to this question but with no success so far unfortunately.
The issue is discussed here: https://github.com/riscv-collab/riscv-gnu-toolchain/issues/1278#issuecomment-1606108826
But the gist is that I can configure, build and use `qemu-riscv32` to run a simple bare metal "hello world" program fine.
But if I add a CSR read instruction to it (e.g. `asm("csrr t0, misa");`) then I get Illegal Instruction.
This is the case even if I use `qemu-riscv32 -cpu rv32,Zicsr=on hello.exe`.
How can I configure/invoke `qemu-riscv32` so that I can emulate CSR instructions?
Thanks a lot
Regards
Tommy
|
[Prev in Thread] | Current Thread | [Next in Thread] |