If you're having trouble compiling and installing the 32bit toolchain (riscv32-unknown-elf-gcc
, etc) for RISC-V on your
M1/Apple Silicon Mac, here is a guide to how I installed it.
brew edit riscv-gnu-toolchain
This will open a text editor of your choice. Inside this, you want to edit the args
on line 59 to
include the --with-arch=rv32i
and --with-abi=ilp32
arguments. The end result should look like: