logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git
commit: 145a1eca1b8935c300cf567c2b40a7916cd0ba0c
parent 1db7ff7f18b7d6922dec6e8746850e0f41cef984
Author: QMK Bot <hello@qmk.fm>
Date:   Sat,  9 Mar 2024 10:40:47 +0000

Merge remote-tracking branch 'origin/master' into develop

Diffstat:

Mplatforms/chibios/platform.mk11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)

diff --git a/platforms/chibios/platform.mk b/platforms/chibios/platform.mk @@ -402,6 +402,17 @@ ifeq ($(strip $(MCU)), risc-v) -mabi=$(MCU_ABI) \ -mcmodel=$(MCU_CMODEL) \ -mstrict-align + + # Deal with different arch revisions and gcc renaming them + 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) + MCUFLAGS = -march=$(MCU_ARCH)_zicsr \ + -mabi=$(MCU_ABI) \ + -mcmodel=$(MCU_CMODEL) \ + -mstrict-align + 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) + $(call CATASTROPHIC_ERROR,Incompatible toolchain,No compatible RISC-V toolchain found. Can't work out correct architecture.) + endif + endif else # ARM toolchain specific configuration TOOLCHAIN ?= arm-none-eabi-