Skip to content
This repository was archived by the owner on Jan 25, 2022. It is now read-only.

Commit 01b975d

Browse files
authored
Update README.txt
Add the method of how to test file
1 parent 66eba98 commit 01b975d

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

README.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff 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

1620
Passed 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

2126
Compiling 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

3131
then
@@ -34,6 +34,13 @@ $ ./emu-rv32i test1
3434
Hello 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+
3744
RV32M and RV32A instructions may be enabled by commenting `#define STRICT_RV32I`.
3845
3946
## How to build RISC-V toolchain from scratch

0 commit comments

Comments
 (0)