Skip to content

Commit 19f1080

Browse files
committed
fix make build due to clang changes
1 parent eab42d9 commit 19f1080

File tree

10 files changed

+28
-12
lines changed

10 files changed

+28
-12
lines changed

examples/build_system/make/make.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ ifndef TOOLCHAIN
2020
TOOLCHAIN = gcc
2121
endif
2222

23-
$(info TOOLCHAIN: $(TOOLCHAIN))
24-
2523
#-------------- TOP and CURRENT_PATH ------------
2624

2725
# Set TOP to be the path to get from the current directory (where make was invoked) to the top of the tree.

hw/bsp/imxrt/family.mk

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ MCU_DIR = $(SDK_DIR)/devices/$(MCU_VARIANT)
1111
CFLAGS += \
1212
-D__ARMVFP__=0 \
1313
-D__ARMFPV5__=0 \
14+
-D__STARTUP_CLEAR_BSS \
1415
-DXIP_EXTERNAL_FLASH=1 \
1516
-DXIP_BOOT_HEADER_ENABLE=1 \
1617
-DCFG_TUSB_MCU=OPT_MCU_MIMXRT1XXX
@@ -26,7 +27,9 @@ endif
2627
# mcu driver cause following warnings
2728
CFLAGS += -Wno-error=unused-parameter -Wno-error=implicit-fallthrough -Wno-error=redundant-decls
2829

29-
LDFLAGS_GCC += -specs=nosys.specs -specs=nano.specs
30+
LDFLAGS_GCC += \
31+
-nostartfiles \
32+
--specs=nosys.specs --specs=nano.specs
3033

3134
# All source paths should be relative to the top level.
3235
LD_FILE ?= $(MCU_DIR)/gcc/$(MCU_VARIANT)xxxxx${MCU_CORE}_flexspi_nor.ld

hw/bsp/kinetis_k/family.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@ include $(TOP)/$(BOARD_PATH)/board.mk
66
CPU_CORE ?= cortex-m4
77

88
CFLAGS += \
9+
-D__STARTUP_CLEAR_BSS \
910
-DCFG_TUSB_MCU=OPT_MCU_KINETIS_K \
1011

1112
LDFLAGS += \
13+
-nostartfiles \
14+
--specs=nosys.specs --specs=nano.specs \
1215
-Wl,--defsym,__stack_size__=0x400 \
1316
-Wl,--defsym,__heap_size__=0
1417

hw/bsp/kinetis_kl/family.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ include $(TOP)/$(BOARD_PATH)/board.mk
66
CPU_CORE ?= cortex-m0plus
77

88
CFLAGS += \
9+
-D__STARTUP_CLEAR_BSS \
910
-DCFG_TUSB_MCU=OPT_MCU_KINETIS_KL \
1011

1112
LDFLAGS += \
13+
-nostartfiles \
1214
-specs=nosys.specs -specs=nano.specs \
1315
-Wl,--defsym,__stack_size__=0x400 \
1416
-Wl,--defsym,__heap_size__=0

hw/bsp/lpc17/family.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ CFLAGS += -Wno-error=strict-prototypes -Wno-error=cast-qual
1818
# caused by freeRTOS port !!
1919
CFLAGS += -Wno-error=maybe-uninitialized
2020

21-
LDFLAGS_GCC += -specs=nosys.specs -specs=nano.specs
21+
LDFLAGS_GCC += --specs=nosys.specs --specs=nano.specs
2222

2323
SRC_C += \
2424
src/portable/nxp/lpc17_40/dcd_lpc17_40.c \
@@ -36,3 +36,4 @@ SRC_C += \
3636
INC += \
3737
$(TOP)/$(BOARD_PATH) \
3838
$(TOP)/$(MCU_DIR)/inc \
39+
$(TOP)/lib/CMSIS_5/CMSIS/Core/Include \

hw/bsp/lpc18/family.mk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ CFLAGS += \
1414
# mcu driver cause following warnings
1515
CFLAGS += -Wno-error=unused-parameter -Wno-error=strict-prototypes -Wno-error=cast-qual
1616

17-
LDFLAGS_GCC += -specs=nosys.specs -specs=nano.specs
17+
LDFLAGS_GCC += --specs=nosys.specs --specs=nano.specs
1818

1919
SRC_C += \
2020
src/portable/chipidea/ci_hs/dcd_ci_hs.c \
@@ -30,4 +30,5 @@ SRC_C += \
3030
INC += \
3131
$(TOP)/$(BOARD_PATH) \
3232
$(TOP)/$(MCU_DIR)/inc \
33-
$(TOP)/$(MCU_DIR)/inc/config_18xx
33+
$(TOP)/$(MCU_DIR)/inc/config_18xx \
34+
$(TOP)/lib/CMSIS_5/CMSIS/Core/Include \

hw/bsp/lpc40/family.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ CFLAGS += \
1515
# mcu driver cause following warnings
1616
CFLAGS += -Wno-error=strict-prototypes -Wno-error=unused-parameter -Wno-error=cast-qual
1717

18-
LDFLAGS_GCC += -specs=nosys.specs -specs=nano.specs
18+
LDFLAGS_GCC += --specs=nosys.specs --specs=nano.specs
1919

2020
# All source paths should be relative to the top level.
2121
SRC_C += \
@@ -32,4 +32,5 @@ SRC_C += \
3232

3333
INC += \
3434
$(TOP)/$(MCU_DIR)/inc \
35+
$(TOP)/lib/CMSIS_5/CMSIS/Core/Include \
3536
$(TOP)/$(BOARD_PATH)

hw/bsp/lpc43/family.mk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ CFLAGS += \
1818
-Wno-error=cast-qual \
1919
-Wno-error=incompatible-pointer-types \
2020

21-
LDFLAGS_GCC += -specs=nosys.specs -specs=nano.specs
21+
LDFLAGS_GCC += --specs=nosys.specs --specs=nano.specs
2222

2323
SRC_C += \
2424
src/portable/chipidea/ci_hs/dcd_ci_hs.c \
@@ -36,4 +36,5 @@ SRC_C += \
3636
INC += \
3737
$(TOP)/$(BOARD_PATH) \
3838
${TOP}/${SDK_DIR}/inc \
39-
${TOP}/${SDK_DIR}/inc/config_43xx
39+
${TOP}/${SDK_DIR}/inc/config_43xx \
40+
$(TOP)/lib/CMSIS_5/CMSIS/Core/Include \

hw/bsp/lpc54/family.mk

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ MCU_DIR = $(SDK_DIR)/devices/$(MCU_VARIANT)
77

88
CFLAGS += \
99
-flto \
10+
-D__STARTUP_CLEAR_BSS \
1011
-DCFG_TUSB_MCU=OPT_MCU_LPC54XXX \
1112
-DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))' \
1213

@@ -23,7 +24,9 @@ endif
2324
# mcu driver cause following warnings
2425
CFLAGS += -Wno-error=unused-parameter
2526

26-
LDFLAGS_GCC += -specs=nosys.specs -specs=nano.specs
27+
LDFLAGS_GCC += \
28+
-nostartfiles \
29+
--specs=nosys.specs --specs=nano.specs
2730

2831
SRC_C += \
2932
src/portable/nxp/lpc_ip3511/dcd_lpc_ip3511.c \

hw/bsp/lpc55/family.mk

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ PORT ?= 1
1111

1212
CFLAGS += \
1313
-flto \
14+
-D__STARTUP_CLEAR_BSS \
1415
-DCFG_TUSB_MCU=OPT_MCU_LPC55XX \
1516
-DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))' \
16-
-DBOARD_TUD_RHPORT=$(PORT)
17+
-DBOARD_TUD_RHPORT=$(PORT) \
1718

1819
ifeq ($(PORT), 1)
1920
$(info "PORT1 High Speed")
@@ -28,7 +29,9 @@ endif
2829
# mcu driver cause following warnings
2930
CFLAGS += -Wno-error=unused-parameter -Wno-error=float-equal
3031

31-
LDFLAGS_GCC += -specs=nosys.specs -specs=nano.specs
32+
LDFLAGS_GCC += \
33+
-nostartfiles \
34+
--specs=nosys.specs --specs=nano.specs \
3235

3336
# All source paths should be relative to the top level.
3437
LD_FILE ?= $(MCU_DIR)/gcc/$(MCU_CORE)_flash.ld

0 commit comments

Comments
 (0)