Mevin Mathew
10/09/2024, 7:18 PMriscvXX-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.Tim Edwards
10/09/2024, 8:45 PMriscv64
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.