Hacker News new | past | comments | ask | show | jobs | submit login
RISC-V Software Ecosystem Overview (github.com/riscv)
83 points by lelf on Jan 17, 2020 | hide | past | favorite | 5 comments



I wrote a RISC-V simulator library for modern C++ also: https://github.com/fwsGonzo/libriscv

It doesn't use JIT but for small programs it was faster than the other simulators I compared with. It also has page functionality for simulating MMIO without performance drop.

Drawback is that I never finished RV64 support, although it's mostly ready to go. It has full RV32IMAC as well as most floating point instructions. I imagined that for a small device RV32 would be plenty. But I guess we will see, as I want to get my hands on a RISC-V board that is like Raspberry Pi.



Are there c compilers for the smallest subsets of RISC-V (no floating point, system calls, atomics, etc).


Yes, when you build this: https://github.com/riscv/riscv-gnu-toolchain

You can configure it with the extensions your system will support. The minimal is RV32I and RV64I. It will be full-length instructions which are easy to parse and no extras.

./configure --prefix=$HOME/riscv --with-arch=rv32i --with-abi=ilp32

I'm sure you can build a C standard library with these options as well, so you won't be as limited as you think.

System calls are done through the ECALL instruction, and while it's mandatory, you don't really have to implement it.


There's risc-v support in the newlib standard library, so it should not be too hard to use that as a starting point even if you need to rip out stuff.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: