summaryrefslogtreecommitdiff
path: root/platforms
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2024-03-09 10:40:47 +0000
committerQMK Bot <hello@qmk.fm>2024-03-09 10:40:47 +0000
commit145a1eca1b8935c300cf567c2b40a7916cd0ba0c (patch)
tree71c32a6bb94a0646c56eb4447f30cc373a7ce5f8 /platforms
parent1db7ff7f18b7d6922dec6e8746850e0f41cef984 (diff)
parent900e79febebaa6e8c682755442a385dc6f2ed703 (diff)
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'platforms')
-rw-r--r--platforms/chibios/platform.mk11
1 files changed, 11 insertions, 0 deletions
diff --git a/platforms/chibios/platform.mk b/platforms/chibios/platform.mk
index f38a888012..b13eed39be 100644
--- a/platforms/chibios/platform.mk
+++ b/platforms/chibios/platform.mk
@@ -402,6 +402,17 @@ ifeq ($(strip $(MCU)), risc-v)
402 -mabi=$(MCU_ABI) \ 402 -mabi=$(MCU_ABI) \
403 -mcmodel=$(MCU_CMODEL) \ 403 -mcmodel=$(MCU_CMODEL) \
404 -mstrict-align 404 -mstrict-align
405
406 # Deal with different arch revisions and gcc renaming them
407 ifneq ($(shell echo 'int main() { asm("csrc 0x300,8"); return 0; }' | $(TOOLCHAIN)gcc $(MCUFLAGS) $(TOOLCHAIN_CFLAGS) -x c -o /dev/null - 2>/dev/null >/dev/null; echo $$?),0)
408 MCUFLAGS = -march=$(MCU_ARCH)_zicsr \
409 -mabi=$(MCU_ABI) \
410 -mcmodel=$(MCU_CMODEL) \
411 -mstrict-align
412 ifneq ($(shell echo 'int main() { asm("csrc 0x300,8"); return 0; }' | $(TOOLCHAIN)gcc $(MCUFLAGS) $(TOOLCHAIN_CFLAGS) -x c -o /dev/null - 2>/dev/null >/dev/null; echo $$?),0)
413 $(call CATASTROPHIC_ERROR,Incompatible toolchain,No compatible RISC-V toolchain found. Can't work out correct architecture.)
414 endif
415 endif
405else 416else
406 # ARM toolchain specific configuration 417 # ARM toolchain specific configuration
407 TOOLCHAIN ?= arm-none-eabi- 418 TOOLCHAIN ?= arm-none-eabi-