File tree Expand file tree Collapse file tree 3 files changed +16
-5
lines changed Expand file tree Collapse file tree 3 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ include $(TOP)/extmod/extmod.mk
6060
6161GIT_SUBMODULES += lib/libhydrogen lib/stm32lib
6262
63+ CROSS_COMPILE ?= arm-none-eabi-
6364LD_DIR =boards
6465USBDEV_DIR =usbdev
6566# USBHOST_DIR=usbhost
@@ -101,9 +102,6 @@ GEN_STMCONST_HDR = $(HEADER_BUILD)/modstm_const.h
101102GEN_STMCONST_MPZ = $(HEADER_BUILD ) /modstm_mpz.h
102103CMSIS_MCU_HDR = $(STM32LIB_CMSIS_ABS ) /Include/$(CMSIS_MCU_LOWER ) .h
103104
104- # Select the cross compile prefix
105- CROSS_COMPILE ?= arm-none-eabi-
106-
107105INC += -I.
108106INC += -I$(TOP )
109107INC += -I$(BUILD )
Original file line number Diff line number Diff line change 4848MBOOT_VERSION_ALLOCATED_BYTES ?= 64
4949MBOOT_VERSION_INCLUDE_OPTIONS ?= 1 # if set to 1, this will append build options to version string (see version.c)
5050
51+ CROSS_COMPILE ?= arm-none-eabi-
5152USBDEV_DIR =usbdev
5253DFU =$(TOP ) /tools/dfu.py
5354PYDFU ?= $(TOP ) /tools/pydfu.py
@@ -59,8 +60,6 @@ OPENOCD_CONFIG ?= boards/openocd_stm32f4.cfg
5960
6061include ../stm32.mk
6162
62- CROSS_COMPILE ?= arm-none-eabi-
63-
6463INC += -I.
6564INC += -I..
6665INC += -I$(TOP )
Original file line number Diff line number Diff line change @@ -83,3 +83,17 @@ MPY_CROSS_MCU_ARCH_h7 = armv7m
8383MPY_CROSS_MCU_ARCH_n6 = armv7m # really armv8m
8484MPY_CROSS_MCU_ARCH_wb = armv7m
8585MPY_CROSS_MCU_ARCH_wl = armv7m
86+
87+ # gcc up to 14.2.0 have a known loop-optimisation bug:
88+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116799
89+ # This bug manifests for Cortex M55 targets, so require a newer compiler on such targets.
90+ ifeq ($(MCU_SERIES ) ,n6)
91+ # Check if GCC version is less than 14.3
92+ GCC_VERSION := $(shell $(CROSS_COMPILE ) gcc -dumpversion | cut -d. -f1-2)
93+ GCC_VERSION_MAJOR := $(shell echo $(GCC_VERSION ) | cut -d. -f1)
94+ GCC_VERSION_MINOR := $(shell echo $(GCC_VERSION ) | cut -d. -f2)
95+ GCC_VERSION_NUM := $(shell echo $$(($(GCC_VERSION_MAJOR ) * 100 + $(GCC_VERSION_MINOR ) ) ) )
96+ ifeq ($(shell test $(GCC_VERSION_NUM ) -lt 1403 && echo yes) ,yes)
97+ $(error Error : GCC $(GCC_VERSION ) has known issues with Cortex-M55; upgrade to GCC 14.3+ for proper CM55 support)
98+ endif
99+ endif
You can’t perform that action at this time.
0 commit comments