You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
6 days ago | |
---|---|---|
bad-apple | 2 months ago | |
lwcpu | 3 months ago | |
pong | 3 months ago | |
primes | 3 months ago | |
test | 3 months ago | |
LICENCE | 5 months ago | |
README.md | 6 days ago |
README.md
RISC-V 32-bit CPU - RV32I
Since there is a target in LLVM for rv32i, this CPU is able to run any C or Rust compiled program.
How to program the RISC-V 32bit CPU with one of the provided programs
Only Linux is supported and you need to have cargo, make and other build tools installed with support for the riscv32i-unknown-none-elf target.
- Go to a directory of a program.
- Run
make
- it will put the output to/tmp/text.bin
and/tmp/rodata.bin
. - Select
LOAD .TEXT
in game. - Run the console command
loadram /tmp/text.bin
- Select
LOAD .RODATA
in game (unselectLOAD .TEXT
). - Run the console command
loadram /tmp/rodata.bin
- Hit
RESET
Running
- Toggle the yellow lever to run the cpu continously or hit the button below it to step instructions.
- The gray lever activates stepping instructions using the Enter key (you must look at it)
Debugging
- You can set a breakpoint on the left and the CPU will pause when the program counter reaches the target address