Obijuan / RISC-V-FPGA

RISC-V CPU for OpenFPGAs, in Icestudio
GNU General Public License v3.0
84 stars 14 forks source link

RISC-V Toolchain installation & download #4

Open pedro-javierf opened 2 years ago

pedro-javierf commented 2 years ago

What is the required RISC-V toolchain for this project and where can it be downloaded/Installed? Is this standard riscv-gnu-toolchain or should be something else?

riscv32-unknown-elf-gcc riscv32-unknown-elf-objcopy etc

Thanks,

Obijuan commented 2 years ago

Yes, that is the standard toolchain. You can also use the Rars assembler/simulator if you like, for generating the executable file. I still have not documented how to do it, but I will

pedro-javierf commented 2 years ago

For anyone interested in getting the demo firmware to work as fast as possible, it is possible to use the following pre-built riscv32-gnu toolchain here: https://github.com/stnolting/riscv-gcc-prebuilt (the rv32i-2.0.0 version) to generate compatible binaries that are compatible for the RISC-V core in the Alhambra II. I've only tested in Ubuntu 20 VM.

The build instructions for the 32-bit gnu toolchain are not always up-to-date so this can be handy.