File tree 10 files changed +28
-12
lines changed
examples/build_system/make 10 files changed +28
-12
lines changed Original file line number Diff line number Diff line change @@ -20,8 +20,6 @@ ifndef TOOLCHAIN
20
20
TOOLCHAIN = gcc
21
21
endif
22
22
23
- $(info TOOLCHAIN : $(TOOLCHAIN ) )
24
-
25
23
# -------------- TOP and CURRENT_PATH ------------
26
24
27
25
# Set TOP to be the path to get from the current directory (where make was invoked) to the top of the tree.
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ MCU_DIR = $(SDK_DIR)/devices/$(MCU_VARIANT)
11
11
CFLAGS += \
12
12
-D__ARMVFP__=0 \
13
13
-D__ARMFPV5__=0 \
14
+ -D__STARTUP_CLEAR_BSS \
14
15
-DXIP_EXTERNAL_FLASH=1 \
15
16
-DXIP_BOOT_HEADER_ENABLE=1 \
16
17
-DCFG_TUSB_MCU=OPT_MCU_MIMXRT1XXX
26
27
# mcu driver cause following warnings
27
28
CFLAGS += -Wno-error=unused-parameter -Wno-error=implicit-fallthrough -Wno-error=redundant-decls
28
29
29
- LDFLAGS_GCC += -specs=nosys.specs -specs=nano.specs
30
+ LDFLAGS_GCC += \
31
+ -nostartfiles \
32
+ --specs=nosys.specs --specs=nano.specs
30
33
31
34
# All source paths should be relative to the top level.
32
35
LD_FILE ?= $(MCU_DIR ) /gcc/$(MCU_VARIANT ) xxxxx${MCU_CORE}_flexspi_nor.ld
Original file line number Diff line number Diff line change @@ -6,9 +6,12 @@ include $(TOP)/$(BOARD_PATH)/board.mk
6
6
CPU_CORE ?= cortex-m4
7
7
8
8
CFLAGS += \
9
+ -D__STARTUP_CLEAR_BSS \
9
10
-DCFG_TUSB_MCU=OPT_MCU_KINETIS_K \
10
11
11
12
LDFLAGS += \
13
+ -nostartfiles \
14
+ --specs=nosys.specs --specs=nano.specs \
12
15
-Wl,--defsym,__stack_size__=0x400 \
13
16
-Wl,--defsym,__heap_size__=0
14
17
Original file line number Diff line number Diff line change @@ -6,9 +6,11 @@ include $(TOP)/$(BOARD_PATH)/board.mk
6
6
CPU_CORE ?= cortex-m0plus
7
7
8
8
CFLAGS += \
9
+ -D__STARTUP_CLEAR_BSS \
9
10
-DCFG_TUSB_MCU=OPT_MCU_KINETIS_KL \
10
11
11
12
LDFLAGS += \
13
+ -nostartfiles \
12
14
-specs=nosys.specs -specs=nano.specs \
13
15
-Wl,--defsym,__stack_size__=0x400 \
14
16
-Wl,--defsym,__heap_size__=0
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ CFLAGS += -Wno-error=strict-prototypes -Wno-error=cast-qual
18
18
# caused by freeRTOS port !!
19
19
CFLAGS += -Wno-error=maybe-uninitialized
20
20
21
- LDFLAGS_GCC += -specs=nosys.specs -specs=nano.specs
21
+ LDFLAGS_GCC += -- specs=nosys.specs - -specs=nano.specs
22
22
23
23
SRC_C += \
24
24
src/portable/nxp/lpc17_40/dcd_lpc17_40.c \
@@ -36,3 +36,4 @@ SRC_C += \
36
36
INC += \
37
37
$(TOP ) /$(BOARD_PATH ) \
38
38
$(TOP ) /$(MCU_DIR ) /inc \
39
+ $(TOP ) /lib/CMSIS_5/CMSIS/Core/Include \
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ CFLAGS += \
14
14
# mcu driver cause following warnings
15
15
CFLAGS += -Wno-error=unused-parameter -Wno-error=strict-prototypes -Wno-error=cast-qual
16
16
17
- LDFLAGS_GCC += -specs=nosys.specs -specs=nano.specs
17
+ LDFLAGS_GCC += -- specs=nosys.specs - -specs=nano.specs
18
18
19
19
SRC_C += \
20
20
src/portable/chipidea/ci_hs/dcd_ci_hs.c \
@@ -30,4 +30,5 @@ SRC_C += \
30
30
INC += \
31
31
$(TOP ) /$(BOARD_PATH ) \
32
32
$(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 \
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ CFLAGS += \
15
15
# mcu driver cause following warnings
16
16
CFLAGS += -Wno-error=strict-prototypes -Wno-error=unused-parameter -Wno-error=cast-qual
17
17
18
- LDFLAGS_GCC += -specs=nosys.specs -specs=nano.specs
18
+ LDFLAGS_GCC += -- specs=nosys.specs - -specs=nano.specs
19
19
20
20
# All source paths should be relative to the top level.
21
21
SRC_C += \
@@ -32,4 +32,5 @@ SRC_C += \
32
32
33
33
INC += \
34
34
$(TOP ) /$(MCU_DIR ) /inc \
35
+ $(TOP ) /lib/CMSIS_5/CMSIS/Core/Include \
35
36
$(TOP ) /$(BOARD_PATH )
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ CFLAGS += \
18
18
-Wno-error=cast-qual \
19
19
-Wno-error=incompatible-pointer-types \
20
20
21
- LDFLAGS_GCC += -specs=nosys.specs -specs=nano.specs
21
+ LDFLAGS_GCC += -- specs=nosys.specs - -specs=nano.specs
22
22
23
23
SRC_C += \
24
24
src/portable/chipidea/ci_hs/dcd_ci_hs.c \
@@ -36,4 +36,5 @@ SRC_C += \
36
36
INC += \
37
37
$(TOP ) /$(BOARD_PATH ) \
38
38
${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 \
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ MCU_DIR = $(SDK_DIR)/devices/$(MCU_VARIANT)
7
7
8
8
CFLAGS += \
9
9
-flto \
10
+ -D__STARTUP_CLEAR_BSS \
10
11
-DCFG_TUSB_MCU=OPT_MCU_LPC54XXX \
11
12
-DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))' \
12
13
23
24
# mcu driver cause following warnings
24
25
CFLAGS += -Wno-error=unused-parameter
25
26
26
- LDFLAGS_GCC += -specs=nosys.specs -specs=nano.specs
27
+ LDFLAGS_GCC += \
28
+ -nostartfiles \
29
+ --specs=nosys.specs --specs=nano.specs
27
30
28
31
SRC_C += \
29
32
src/portable/nxp/lpc_ip3511/dcd_lpc_ip3511.c \
Original file line number Diff line number Diff line change @@ -11,9 +11,10 @@ PORT ?= 1
11
11
12
12
CFLAGS += \
13
13
-flto \
14
+ -D__STARTUP_CLEAR_BSS \
14
15
-DCFG_TUSB_MCU=OPT_MCU_LPC55XX \
15
16
-DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))' \
16
- -DBOARD_TUD_RHPORT=$(PORT )
17
+ -DBOARD_TUD_RHPORT=$(PORT ) \
17
18
18
19
ifeq ($(PORT ) , 1)
19
20
$(info "PORT1 High Speed")
28
29
# mcu driver cause following warnings
29
30
CFLAGS += -Wno-error=unused-parameter -Wno-error=float-equal
30
31
31
- LDFLAGS_GCC += -specs=nosys.specs -specs=nano.specs
32
+ LDFLAGS_GCC += \
33
+ -nostartfiles \
34
+ --specs=nosys.specs --specs=nano.specs \
32
35
33
36
# All source paths should be relative to the top level.
34
37
LD_FILE ?= $(MCU_DIR ) /gcc/$(MCU_CORE ) _flash.ld
You can’t perform that action at this time.
0 commit comments