Mini RISC-V toolchain for Linux consisting of compiler, simulator and disassembler.
GPL-3.0 License
Mini RISC-V toolchain for Linux consisting of compiler, simulator and disassembler. Required programs for setting up the toolchain are flex
, bison
, gcc
and make
.
Compiler supports a limited subset of the C language (called Micro-C) and generates RV32I assembly code.
Run make
in the riscv-toolchain/compiler
directory.
./micro_riscv < example-file.mc
Simulator supports RV32I instruction set.
Run make
in the riscv-toolchain/simulator
directory.
Options are:
If no options are given, simulator will run in interactive mode for the maxmimum of 2000 instructions.
./riscvsim < sum_up_to.s
Disassembler supports RV64GC instruction sets and is made for testing wether the given program is compatible for execution on a Linux-compatible processor/microcontroller which supports given instruction sets.
Run make compile
in the riscv-toolchain/disassembler
directory.
Options are:
If no options are given the default instruction set is RV64GC (RV64IFAMDC)
./rv64dis examples/example4.bin
This program is free. You can redistribute it and/or change it under the terms of GNU General Public License version 3.0 (GPLv3). You can find the copy of the license in the repository.