How to build RISC-V GCC/newlib-nano toolchain

This short article will show you how to quickly setup cross-toolchain for C/C++ RV32IMAC binaries that runs on x86_64 host Linux PC.

Please note that /opt/riscv32 directory should be writable by the user running make. This command is the last step here, it will also install compilation results in –prefix directory. You might want to add bin directory to your PATH:

As a result we will get tools with riscv32-unknown-elf triplet.

Links:

GCC arch/ABI reference: https://gcc.gnu.org/onlinedocs/gcc/RISC-V-Options.html

Sometimes it is handy to look at others’ compilation outputs: https://travis-ci.org/github/riscv/riscv-gnu-toolchain/

07. December 2020 by resset
Categories: Software | Tags: , , , , | Leave a comment

Leave a Reply

Required fields are marked *