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
60
60
61
61
GIT_SUBMODULES += lib/libhydrogen lib/stm32lib
62
62
63
+ CROSS_COMPILE ?= arm-none-eabi-
63
64
LD_DIR =boards
64
65
USBDEV_DIR =usbdev
65
66
# USBHOST_DIR=usbhost
@@ -101,9 +102,6 @@ GEN_STMCONST_HDR = $(HEADER_BUILD)/modstm_const.h
101
102
GEN_STMCONST_MPZ = $(HEADER_BUILD ) /modstm_mpz.h
102
103
CMSIS_MCU_HDR = $(STM32LIB_CMSIS_ABS ) /Include/$(CMSIS_MCU_LOWER ) .h
103
104
104
- # Select the cross compile prefix
105
- CROSS_COMPILE ?= arm-none-eabi-
106
-
107
105
INC += -I.
108
106
INC += -I$(TOP )
109
107
INC += -I$(BUILD )
Original file line number Diff line number Diff line change 48
48
MBOOT_VERSION_ALLOCATED_BYTES ?= 64
49
49
MBOOT_VERSION_INCLUDE_OPTIONS ?= 1 # if set to 1, this will append build options to version string (see version.c)
50
50
51
+ CROSS_COMPILE ?= arm-none-eabi-
51
52
USBDEV_DIR =usbdev
52
53
DFU =$(TOP ) /tools/dfu.py
53
54
PYDFU ?= $(TOP ) /tools/pydfu.py
@@ -59,8 +60,6 @@ OPENOCD_CONFIG ?= boards/openocd_stm32f4.cfg
59
60
60
61
include ../stm32.mk
61
62
62
- CROSS_COMPILE ?= arm-none-eabi-
63
-
64
63
INC += -I.
65
64
INC += -I..
66
65
INC += -I$(TOP )
Original file line number Diff line number Diff line change @@ -83,3 +83,17 @@ MPY_CROSS_MCU_ARCH_h7 = armv7m
83
83
MPY_CROSS_MCU_ARCH_n6 = armv7m # really armv8m
84
84
MPY_CROSS_MCU_ARCH_wb = armv7m
85
85
MPY_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