#TOOLCHAIN_PATH=/usr/bin/ #TOOLCHAIN_PATH=/opt/ris...
# caravel
m
#TOOLCHAIN_PATH=/usr/bin/ #TOOLCHAIN_PATH=/opt/riscv64-unknown-elf-gcc-8.3.0-2020.04.1-x86_64-linux-ubuntu14/bin/ TOOLCHAIN_PATH=/opt/riscv32imc/bin/ # TOOLCHAIN_PATH=/ef/apps/bin/ # Set the prefix for
riscvXX-unknown-elf-*
# On installations using
multilib
, this will be
riscv64
even for compiling to 32-bit targets TOOLCHAIN_PREFIX=riscv64-unknown-elf #TOOLCHAIN_PREFIX=riscv32 ARCH=rv32i #ARCH=rv32i_zicsr # ---- Test patterns for project raven ---- .SUFFIXES: PATTERN = demos . This part is from the makefile of blink project. May I know why TOOLCHAIN_PREFIX=riscv64-unknown-elf is set so , while the target is riscv32. Also why we need seperate files which custom functions for print and input while we could have used the standard library.
t
I have seen the RISC-V toolchain compiled as
riscv64
in the executable names, but the
ARCH
argument will select the correct target regardless. On my own desktop, I have a version of the toolchain that is installed into
/opt/riscv32imc
, so you may need to set
TOOLCHAIN_PATH
appropriately for whatever you have for the toolchain installation location. I think that all variables set in a Makefile can be overridden by setting an environment variable of the same name.