mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
correct gcc version major comparison
This commit is contained in:
parent
e54a2c4f3c
commit
1a98f5389c
@ -10,6 +10,7 @@ OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
SIZE = $(CROSS_COMPILE)size
|
||||
|
||||
CC_VERSION := $(shell $(CC) -dumpversion)
|
||||
CC_VERSION_MAJOR = $(firstword $(subst ., ,$(CC_VERSION)))
|
||||
|
||||
# ---------------------------------------
|
||||
# Compiler Flags
|
||||
@ -73,6 +74,6 @@ LDFLAGS += -Wl,--print-memory-usage
|
||||
endif
|
||||
|
||||
# from version 12
|
||||
ifeq (12,$(firstword $(sort 12 $(CC_VERSION))))
|
||||
ifeq ($(shell expr $(CC_VERSION_MAJOR) \>= 12),1)
|
||||
LDFLAGS += -Wl,--no-warn-rwx-segment
|
||||
endif
|
||||
|
@ -40,6 +40,5 @@ INC += \
|
||||
SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_$(MCU_VARIANT).s
|
||||
SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_$(MCU_VARIANT).s
|
||||
|
||||
# flash target ROM bootloader
|
||||
flash-dfu-util: $(BUILD)/$(PROJECT).bin
|
||||
dfu-util -R -a 0 --dfuse-address 0x08000000 -D $<
|
||||
# flash target ROM bootloader: flash-dfu-util
|
||||
DFU_UTIL_OPTION = -a 0 --dfuse-address 0x08000000
|
||||
|
Loading…
x
Reference in New Issue
Block a user