This repository was archived by the owner on Jan 25, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -12,20 +12,20 @@ How to compile it:
1212``` shell
1313$ gcc -O3 -Wall -lelf emu-rv32i.c -o emu-rv32i
1414```
15+ or
16+ ``` shell
17+ $ make emu-rv32i
18+ ```
1519
1620Passed RV32I compliance tests from https://github.com/riscv/riscv-compliance
21+ - Must install the [ risc-v toolchain] ( https://xpack.github.io/riscv-none-embed-gcc/ )
1722``` shell
1823$ make RISCV_TARGET=spike RISCV_DEVICE=rv32i TARGET_SIM=/full/path/emulator variant
1924```
2025
2126Compiling and running simple code:
2227``` shell
23- $ riscv32-unknown-elf-gcc -O3 -nostdlib test1.c -o test1
24- ```
25-
26- or
27- ``` shell
28- $ riscv64-unknown-elf-gcc -march=rv32i -mabi=ilp32 -O3 -nostdlib test1.c -o test1
28+ $ make test1
2929```
3030
3131then
@@ -34,6 +34,13 @@ $ ./emu-rv32i test1
3434Hello RISC-V!
3535```
3636
37+ Passed RV32C compliance tests from https://github.com/riscv/riscv-compliance
38+ ``shell
39+ make C-ADDI.log
40+ ```
41+ If there is no accident, it will output the `TEST PASSED`
42+
43+
3744RV32M and RV32A instructions may be enabled by commenting `#define STRICT_RV32I`.
3845
3946## How to build RISC-V toolchain from scratch
You can’t perform that action at this time.
0 commit comments