mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-22 10:20:55 +00:00
examples: make: specify CROSS_COMPILE for fomu
When BOARD=fomu, use the riscv cross-compiler. Otherwise, use the default arm compiler. This can be overridden by passing CROSS_COMIPLE on the command line. Note that there are now three common risc-v prefixes: - riscv32-unknown-elf- : Common for users who compile their own - riscv64-unknown-elf- : Upstream multiarch toolchain from SiFive - riscv-none-embed- : xPack embedded version of SiFive toolchain Here we assume users are using the `riscv-none-embed-` toolchain from xPack, because it appears to be growing more common. Additionally, there is much confusion surrounding `riscv64-unknown-elf-`, which actually includes both 32- and 64-bit runtimes and can generate software for both. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
737d437ab8
commit
dce070ebe0
@ -2,8 +2,12 @@
|
||||
# Common make definition for all examples
|
||||
#
|
||||
|
||||
# Compiler
|
||||
# Compiler
|
||||
ifeq ($(BOARD), fomu)
|
||||
CROSS_COMPILE = riscv-none-embed-
|
||||
else
|
||||
CROSS_COMPILE = arm-none-eabi-
|
||||
endif
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
CXX = $(CROSS_COMPILE)g++
|
||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
|
Loading…
x
Reference in New Issue
Block a user