summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2026-04-06 19:11:33 +0700
committerGitHub <[email protected]>2026-04-06 19:11:33 +0700
commit7c3f5979ff9be05b7938f10dbaa6e55daaf8bdc1 (patch)
treeeef35722aefb347b9761c98cef5848ef26edb60a
parent751f465a39299ba0638c1700d1aa2d53e8d1b877 (diff)
parent4c7a9fed96e0a81cc640333c1c82fee54fa4be34 (diff)
Merge pull request #3563 from hathach/remove-iar-make-support
Remove IAR toolchain support from make build system
-rw-r--r--examples/build_system/make/cpu/arm1176jzf-s.mk4
-rw-r--r--examples/build_system/make/cpu/arm926ej-s.mk4
-rw-r--r--examples/build_system/make/cpu/cortex-a53.mk7
-rw-r--r--examples/build_system/make/cpu/cortex-a72.mk7
-rw-r--r--examples/build_system/make/cpu/cortex-m0.mk5
-rw-r--r--examples/build_system/make/cpu/cortex-m0plus.mk5
-rw-r--r--examples/build_system/make/cpu/cortex-m23.mk5
-rw-r--r--examples/build_system/make/cpu/cortex-m3.mk5
-rw-r--r--examples/build_system/make/cpu/cortex-m33-nodsp-nofp.mk7
-rw-r--r--examples/build_system/make/cpu/cortex-m33.mk9
-rw-r--r--examples/build_system/make/cpu/cortex-m4-nofpu.mk4
-rw-r--r--examples/build_system/make/cpu/cortex-m4.mk4
-rw-r--r--examples/build_system/make/cpu/cortex-m55.mk9
-rw-r--r--examples/build_system/make/cpu/cortex-m7-fpsp.mk9
-rw-r--r--examples/build_system/make/cpu/cortex-m7.mk9
-rw-r--r--examples/build_system/make/cpu/cortex-m85.mk9
-rw-r--r--examples/build_system/make/cpu/msp430.mk2
-rw-r--r--examples/build_system/make/cpu/rv32i-ilp32.mk2
-rw-r--r--examples/build_system/make/cpu/rv32imac-ilp32.mk3
-rw-r--r--examples/build_system/make/toolchain/arm_iar.mk13
-rw-r--r--examples/build_system/make/toolchain/gcc_rules.mk11
-rw-r--r--examples/build_system/make/toolchain/iar_rules.mk44
-rw-r--r--examples/device/net_lwip_webserver/Makefile2
-rw-r--r--examples/dual/host_hid_to_device_cdc/Makefile2
-rw-r--r--examples/dual/host_info_to_device_cdc/Makefile2
-rw-r--r--examples/host/msc_file_explorer/Makefile2
-rw-r--r--examples/host/msc_file_explorer/src/msc_app.c2
-rw-r--r--hw/bsp/at32f402_405/family.mk10
-rw-r--r--hw/bsp/at32f403a_407/family.mk10
-rw-r--r--hw/bsp/at32f413/family.mk10
-rw-r--r--hw/bsp/at32f415/family.mk10
-rw-r--r--hw/bsp/at32f423/family.mk10
-rw-r--r--hw/bsp/at32f425/family.mk10
-rw-r--r--hw/bsp/at32f435_437/family.mk10
-rw-r--r--hw/bsp/at32f45x/family.mk10
-rw-r--r--hw/bsp/broadcom_32bit/family.mk2
-rw-r--r--hw/bsp/broadcom_64bit/family.mk2
-rw-r--r--hw/bsp/ch32v10x/family.mk2
-rw-r--r--hw/bsp/ch32v20x/family.mk2
-rw-r--r--hw/bsp/ch32v30x/family.mk2
-rw-r--r--hw/bsp/cxd56/family.mk2
-rw-r--r--hw/bsp/da1469x/family.mk2
-rw-r--r--hw/bsp/efm32/family.mk2
-rw-r--r--hw/bsp/family_support.mk12
-rw-r--r--hw/bsp/fomu/family.mk2
-rw-r--r--hw/bsp/hpmicro/family.mk2
-rw-r--r--hw/bsp/imxrt/family.mk2
-rw-r--r--hw/bsp/kinetis_k/family.mk2
-rw-r--r--hw/bsp/kinetis_k32l/boards/frdm_k32l2a4s/board.mk2
-rw-r--r--hw/bsp/kinetis_k32l/family.mk2
-rw-r--r--hw/bsp/kinetis_kl/family.mk2
-rw-r--r--hw/bsp/lpc11/family.mk2
-rw-r--r--hw/bsp/lpc13/family.mk2
-rw-r--r--hw/bsp/lpc15/family.mk4
-rw-r--r--hw/bsp/lpc17/family.mk4
-rw-r--r--hw/bsp/lpc18/family.mk4
-rw-r--r--hw/bsp/lpc40/family.mk4
-rw-r--r--hw/bsp/lpc43/family.mk4
-rw-r--r--hw/bsp/lpc51/family.mk2
-rw-r--r--hw/bsp/lpc54/family.mk2
-rw-r--r--hw/bsp/lpc55/family.mk2
-rw-r--r--hw/bsp/maxim/family.mk6
-rw-r--r--hw/bsp/mcx/family.mk2
-rw-r--r--hw/bsp/mm32/family.mk2
-rw-r--r--hw/bsp/msp432e4/family.mk2
-rw-r--r--hw/bsp/nrf/family.mk4
-rw-r--r--hw/bsp/nuc100_120/family.mk2
-rw-r--r--hw/bsp/nuc121_125/family.mk2
-rw-r--r--hw/bsp/nuc126/family.mk2
-rw-r--r--hw/bsp/nuc505/family.mk2
-rw-r--r--hw/bsp/ra/family.mk4
-rw-r--r--hw/bsp/rw61x/family.mk2
-rw-r--r--hw/bsp/rx/family.mk2
-rw-r--r--hw/bsp/samd11/family.mk2
-rw-r--r--hw/bsp/samd2x_l2x/family.mk2
-rw-r--r--hw/bsp/samd5x_e5x/family.mk2
-rw-r--r--hw/bsp/same7x/family.mk2
-rw-r--r--hw/bsp/samg/family.mk2
-rw-r--r--hw/bsp/stm32c0/boards/stm32c071nucleo/board.mk7
-rw-r--r--hw/bsp/stm32c0/family.mk6
-rw-r--r--hw/bsp/stm32f0/boards/stm32f070rbnucleo/board.mk2
-rw-r--r--hw/bsp/stm32f0/boards/stm32f072disco/board.mk2
-rw-r--r--hw/bsp/stm32f0/boards/stm32f072eval/board.mk2
-rw-r--r--hw/bsp/stm32f0/family.mk10
-rw-r--r--hw/bsp/stm32f1/boards/stm32f103_bluepill/board.mk3
-rw-r--r--hw/bsp/stm32f1/boards/stm32f103_mini_2/board.mk3
-rw-r--r--hw/bsp/stm32f1/boards/stm32f103ze_iar/board.mk3
-rw-r--r--hw/bsp/stm32f1/family.mk9
-rw-r--r--hw/bsp/stm32f2/family.mk8
-rw-r--r--hw/bsp/stm32f3/family.mk8
-rw-r--r--hw/bsp/stm32f4/boards/feather_stm32f405/board.mk7
-rw-r--r--hw/bsp/stm32f4/boards/pyboardv11/board.mk7
-rw-r--r--hw/bsp/stm32f4/boards/stm32f401blackpill/board.mk7
-rw-r--r--hw/bsp/stm32f4/boards/stm32f407blackvet/board.mk7
-rw-r--r--hw/bsp/stm32f4/boards/stm32f407disco/board.mk7
-rw-r--r--hw/bsp/stm32f4/boards/stm32f411blackpill/board.mk7
-rw-r--r--hw/bsp/stm32f4/boards/stm32f411disco/board.mk7
-rw-r--r--hw/bsp/stm32f4/boards/stm32f412disco/board.mk7
-rw-r--r--hw/bsp/stm32f4/boards/stm32f412nucleo/board.mk7
-rw-r--r--hw/bsp/stm32f4/boards/stm32f439nucleo/board.mk7
-rw-r--r--hw/bsp/stm32f4/family.mk6
-rw-r--r--hw/bsp/stm32f7/boards/stlinkv3mini/board.mk2
-rw-r--r--hw/bsp/stm32f7/boards/stm32f723disco/board.mk2
-rw-r--r--hw/bsp/stm32f7/boards/stm32f746disco/board.mk2
-rw-r--r--hw/bsp/stm32f7/boards/stm32f746nucleo/board.mk2
-rw-r--r--hw/bsp/stm32f7/boards/stm32f767nucleo/board.mk2
-rw-r--r--hw/bsp/stm32f7/boards/stm32f769disco/board.mk2
-rw-r--r--hw/bsp/stm32f7/family.mk10
-rw-r--r--hw/bsp/stm32g0/boards/stm32g0b1nucleo/board.mk7
-rw-r--r--hw/bsp/stm32g0/family.mk6
-rw-r--r--hw/bsp/stm32g4/boards/b_g474e_dpow1/board.mk2
-rw-r--r--hw/bsp/stm32g4/boards/stm32g474nucleo/board.mk2
-rw-r--r--hw/bsp/stm32g4/boards/stm32g491nucleo/board.mk2
-rw-r--r--hw/bsp/stm32g4/family.mk10
-rw-r--r--hw/bsp/stm32h5/family.mk12
-rw-r--r--hw/bsp/stm32h7/boards/daisyseed/board.mk2
-rw-r--r--hw/bsp/stm32h7/boards/stm32h723nucleo/board.mk2
-rw-r--r--hw/bsp/stm32h7/boards/stm32h743eval/board.mk2
-rw-r--r--hw/bsp/stm32h7/boards/stm32h743nucleo/board.mk2
-rw-r--r--hw/bsp/stm32h7/boards/stm32h745disco/board.mk3
-rw-r--r--hw/bsp/stm32h7/boards/stm32h747disco/board.mk3
-rw-r--r--hw/bsp/stm32h7/boards/stm32h750_weact/board.mk2
-rw-r--r--hw/bsp/stm32h7/boards/stm32h750bdk/board.mk2
-rw-r--r--hw/bsp/stm32h7/boards/waveshare_openh743i/board.mk2
-rw-r--r--hw/bsp/stm32h7/family.mk8
-rw-r--r--hw/bsp/stm32h7rs/family.mk12
-rw-r--r--hw/bsp/stm32l0/family.mk8
-rw-r--r--hw/bsp/stm32l4/boards/stm32l412nucleo/board.mk7
-rw-r--r--hw/bsp/stm32l4/boards/stm32l476disco/board.mk7
-rw-r--r--hw/bsp/stm32l4/boards/stm32l496nucleo/board.mk7
-rw-r--r--hw/bsp/stm32l4/boards/stm32l4p5nucleo/board.mk7
-rw-r--r--hw/bsp/stm32l4/boards/stm32l4r5nucleo/board.mk7
-rw-r--r--hw/bsp/stm32l4/family.mk6
-rw-r--r--hw/bsp/stm32n6/boards/stm32n6570dk/board.mk2
-rw-r--r--hw/bsp/stm32n6/boards/stm32n657nucleo/board.mk2
-rw-r--r--hw/bsp/stm32n6/family.mk12
-rw-r--r--hw/bsp/stm32u0/family.mk8
-rw-r--r--hw/bsp/stm32u5/family.mk10
-rw-r--r--hw/bsp/stm32wb/family.mk10
-rw-r--r--hw/bsp/stm32wba/family.mk10
-rw-r--r--hw/bsp/tm4c/boards/ek_tm4c1294xl/board.mk3
-rw-r--r--hw/bsp/tm4c/family.mk2
142 files changed, 227 insertions, 504 deletions
diff --git a/examples/build_system/make/cpu/arm1176jzf-s.mk b/examples/build_system/make/cpu/arm1176jzf-s.mk
index 022ccf7ad..c0cef8784 100644
--- a/examples/build_system/make/cpu/arm1176jzf-s.mk
+++ b/examples/build_system/make/cpu/arm1176jzf-s.mk
@@ -2,8 +2,4 @@ ifeq ($(TOOLCHAIN),gcc)
CFLAGS += \
-mcpu=arm1176jzf-s \
-else ifeq ($(TOOLCHAIN),iar)
- #CFLAGS += --cpu cortex-a53
- #ASFLAGS += --cpu cortex-a53
-
endif
diff --git a/examples/build_system/make/cpu/arm926ej-s.mk b/examples/build_system/make/cpu/arm926ej-s.mk
index 5b84f514f..e0558eca7 100644
--- a/examples/build_system/make/cpu/arm926ej-s.mk
+++ b/examples/build_system/make/cpu/arm926ej-s.mk
@@ -2,8 +2,4 @@ ifeq ($(TOOLCHAIN),gcc)
CFLAGS += \
-mcpu=arm926ej-s \
-else ifeq ($(TOOLCHAIN),iar)
- #CFLAGS += --cpu cortex-a53
- #ASFLAGS += --cpu cortex-a53
-
endif
diff --git a/examples/build_system/make/cpu/cortex-a53.mk b/examples/build_system/make/cpu/cortex-a53.mk
index 42e522ecf..20ed8f0cc 100644
--- a/examples/build_system/make/cpu/cortex-a53.mk
+++ b/examples/build_system/make/cpu/cortex-a53.mk
@@ -2,11 +2,4 @@ ifeq ($(TOOLCHAIN),gcc)
CFLAGS += \
-mcpu=cortex-a53 \
-else ifeq ($(TOOLCHAIN),iar)
- CFLAGS += \
- --cpu cortex-a53 \
-
- ASFLAGS += \
- --cpu cortex-a53 \
-
endif
diff --git a/examples/build_system/make/cpu/cortex-a72.mk b/examples/build_system/make/cpu/cortex-a72.mk
index 1b3d8da4a..b2b3d9181 100644
--- a/examples/build_system/make/cpu/cortex-a72.mk
+++ b/examples/build_system/make/cpu/cortex-a72.mk
@@ -2,11 +2,4 @@ ifeq ($(TOOLCHAIN),gcc)
CFLAGS += \
-mcpu=cortex-a72 \
-else ifeq ($(TOOLCHAIN),iar)
- CFLAGS += \
- --cpu cortex-a72 \
-
- ASFLAGS += \
- --cpu cortex-a72 \
-
endif
diff --git a/examples/build_system/make/cpu/cortex-m0.mk b/examples/build_system/make/cpu/cortex-m0.mk
index c2c33a2ee..1d618982e 100644
--- a/examples/build_system/make/cpu/cortex-m0.mk
+++ b/examples/build_system/make/cpu/cortex-m0.mk
@@ -9,11 +9,6 @@ else ifeq ($(TOOLCHAIN),clang)
--target=arm-none-eabi \
-mcpu=cortex-m0 \
-else ifeq ($(TOOLCHAIN),iar)
- # IAR Flags
- CFLAGS += --cpu cortex-m0
- ASFLAGS += --cpu cortex-m0
-
else
$(error "TOOLCHAIN is not supported")
endif
diff --git a/examples/build_system/make/cpu/cortex-m0plus.mk b/examples/build_system/make/cpu/cortex-m0plus.mk
index fe8feb227..029ce09d1 100644
--- a/examples/build_system/make/cpu/cortex-m0plus.mk
+++ b/examples/build_system/make/cpu/cortex-m0plus.mk
@@ -9,11 +9,6 @@ else ifeq ($(TOOLCHAIN),clang)
--target=arm-none-eabi \
-mcpu=cortex-m0plus \
-else ifeq ($(TOOLCHAIN),iar)
- # IAR Flags
- CFLAGS += --cpu cortex-m0+
- ASFLAGS += --cpu cortex-m0+
-
else
$(error "TOOLCHAIN is not supported")
endif
diff --git a/examples/build_system/make/cpu/cortex-m23.mk b/examples/build_system/make/cpu/cortex-m23.mk
index 7ab758352..b92e24401 100644
--- a/examples/build_system/make/cpu/cortex-m23.mk
+++ b/examples/build_system/make/cpu/cortex-m23.mk
@@ -9,11 +9,6 @@ else ifeq ($(TOOLCHAIN),clang)
--target=arm-none-eabi \
-mcpu=cortex-m23 \
-else ifeq ($(TOOLCHAIN),iar)
- # IAR Flags
- CFLAGS += --cpu cortex-m23
- ASFLAGS += --cpu cortex-m23
-
else
$(error "TOOLCHAIN is not supported")
endif
diff --git a/examples/build_system/make/cpu/cortex-m3.mk b/examples/build_system/make/cpu/cortex-m3.mk
index b6325313f..b58f0203b 100644
--- a/examples/build_system/make/cpu/cortex-m3.mk
+++ b/examples/build_system/make/cpu/cortex-m3.mk
@@ -9,11 +9,6 @@ else ifeq ($(TOOLCHAIN),clang)
--target=arm-none-eabi \
-mcpu=cortex-m3 \
-else ifeq ($(TOOLCHAIN),iar)
- # IAR Flags
- CFLAGS += --cpu cortex-m3
- ASFLAGS += --cpu cortex-m3
-
else
$(error "TOOLCHAIN is not supported")
endif
diff --git a/examples/build_system/make/cpu/cortex-m33-nodsp-nofp.mk b/examples/build_system/make/cpu/cortex-m33-nodsp-nofp.mk
index 405053dd0..858a721fd 100644
--- a/examples/build_system/make/cpu/cortex-m33-nodsp-nofp.mk
+++ b/examples/build_system/make/cpu/cortex-m33-nodsp-nofp.mk
@@ -10,13 +10,6 @@ else ifeq ($(TOOLCHAIN),clang)
-mcpu=cortex-m33 \
-mfpu=softvp \
-else ifeq ($(TOOLCHAIN),iar)
- CFLAGS += \
- --cpu cortex-m33+nodsp \
-
- ASFLAGS += \
- --cpu cortex-m33+nodsp \
-
else
$(error "TOOLCHAIN is not supported")
endif
diff --git a/examples/build_system/make/cpu/cortex-m33.mk b/examples/build_system/make/cpu/cortex-m33.mk
index 47b0eaecd..5699fef7b 100644
--- a/examples/build_system/make/cpu/cortex-m33.mk
+++ b/examples/build_system/make/cpu/cortex-m33.mk
@@ -11,15 +11,6 @@ else ifeq ($(TOOLCHAIN),clang)
-mcpu=cortex-m33 \
-mfpu=fpv5-sp-d16 \
-else ifeq ($(TOOLCHAIN),iar)
- CFLAGS += \
- --cpu cortex-m33 \
- --fpu VFPv5-SP \
-
- ASFLAGS += \
- --cpu cortex-m33 \
- --fpu VFPv5-SP \
-
else
$(error "TOOLCHAIN is not supported")
endif
diff --git a/examples/build_system/make/cpu/cortex-m4-nofpu.mk b/examples/build_system/make/cpu/cortex-m4-nofpu.mk
index ac2916005..62ab21e31 100644
--- a/examples/build_system/make/cpu/cortex-m4-nofpu.mk
+++ b/examples/build_system/make/cpu/cortex-m4-nofpu.mk
@@ -9,10 +9,6 @@ else ifeq ($(TOOLCHAIN),clang)
--target=arm-none-eabi \
-mcpu=cortex-m4
-else ifeq ($(TOOLCHAIN),iar)
- CFLAGS += --cpu cortex-m4 --fpu none
- ASFLAGS += --cpu cortex-m4 --fpu none
-
else
$(error "TOOLCHAIN is not supported")
endif
diff --git a/examples/build_system/make/cpu/cortex-m4.mk b/examples/build_system/make/cpu/cortex-m4.mk
index 57d6e126d..e50fe00ef 100644
--- a/examples/build_system/make/cpu/cortex-m4.mk
+++ b/examples/build_system/make/cpu/cortex-m4.mk
@@ -11,10 +11,6 @@ else ifeq ($(TOOLCHAIN),clang)
-mcpu=cortex-m4 \
-mfpu=fpv4-sp-d16 \
-else ifeq ($(TOOLCHAIN),iar)
- CFLAGS += --cpu cortex-m4 --fpu VFPv4-SP
- ASFLAGS += --cpu cortex-m4 --fpu VFPv4-SP
-
else
$(error "TOOLCHAIN is not supported")
endif
diff --git a/examples/build_system/make/cpu/cortex-m55.mk b/examples/build_system/make/cpu/cortex-m55.mk
index de627caed..94cca1a5e 100644
--- a/examples/build_system/make/cpu/cortex-m55.mk
+++ b/examples/build_system/make/cpu/cortex-m55.mk
@@ -12,15 +12,6 @@ else ifeq ($(TOOLCHAIN),clang)
-mcpu=cortex-m55 \
-mfpu=fpv5-d16 \
-else ifeq ($(TOOLCHAIN),iar)
- CFLAGS += \
- --cpu cortex-m55 \
- --fpu VFPv5_D16 \
-
- ASFLAGS += \
- --cpu cortex-m55 \
- --fpu VFPv5_D16 \
-
else
$(error "TOOLCHAIN is not supported")
endif
diff --git a/examples/build_system/make/cpu/cortex-m7-fpsp.mk b/examples/build_system/make/cpu/cortex-m7-fpsp.mk
index cd42c6fb8..e79ff6d73 100644
--- a/examples/build_system/make/cpu/cortex-m7-fpsp.mk
+++ b/examples/build_system/make/cpu/cortex-m7-fpsp.mk
@@ -11,15 +11,6 @@ else ifeq ($(TOOLCHAIN),clang)
-mcpu=cortex-m7 \
-mfpu=fpv5-sp-d16 \
-else ifeq ($(TOOLCHAIN),iar)
- CFLAGS += \
- --cpu cortex-m7 \
- --fpu VFPv5_sp \
-
- ASFLAGS += \
- --cpu cortex-m7 \
- --fpu VFPv5_sp \
-
else
$(error "TOOLCHAIN is not supported")
endif
diff --git a/examples/build_system/make/cpu/cortex-m7.mk b/examples/build_system/make/cpu/cortex-m7.mk
index 3e6116179..3bd5c1155 100644
--- a/examples/build_system/make/cpu/cortex-m7.mk
+++ b/examples/build_system/make/cpu/cortex-m7.mk
@@ -11,15 +11,6 @@ else ifeq ($(TOOLCHAIN),clang)
-mcpu=cortex-m7 \
-mfpu=fpv5-d16 \
-else ifeq ($(TOOLCHAIN),iar)
- CFLAGS += \
- --cpu cortex-m7 \
- --fpu VFPv5_D16 \
-
- ASFLAGS += \
- --cpu cortex-m7 \
- --fpu VFPv5_D16 \
-
else
$(error "TOOLCHAIN is not supported")
endif
diff --git a/examples/build_system/make/cpu/cortex-m85.mk b/examples/build_system/make/cpu/cortex-m85.mk
index 75e8f3aaf..d66e26418 100644
--- a/examples/build_system/make/cpu/cortex-m85.mk
+++ b/examples/build_system/make/cpu/cortex-m85.mk
@@ -11,15 +11,6 @@ else ifeq ($(TOOLCHAIN),clang)
-mcpu=cortex-m85 \
-mfpu=fpv5-d16 \
-else ifeq ($(TOOLCHAIN),iar)
- CFLAGS += \
- --cpu cortex-m85 \
- --fpu VFPv5_D16 \
-
- ASFLAGS += \
- --cpu cortex-m85 \
- --fpu VFPv5_D16 \
-
else
$(error "TOOLCHAIN is not supported")
endif
diff --git a/examples/build_system/make/cpu/msp430.mk b/examples/build_system/make/cpu/msp430.mk
index 6daa2c38d..83a35140f 100644
--- a/examples/build_system/make/cpu/msp430.mk
+++ b/examples/build_system/make/cpu/msp430.mk
@@ -2,8 +2,6 @@ ifeq ($(TOOLCHAIN),gcc)
# nothing to add
else ifeq ($(TOOLCHAIN),clang)
# nothing to add
-else ifeq ($(TOOLCHAIN),iar)
- # nothing to add
else
$(error "TOOLCHAIN is not supported")
endif
diff --git a/examples/build_system/make/cpu/rv32i-ilp32.mk b/examples/build_system/make/cpu/rv32i-ilp32.mk
index af764afc5..6b2306008 100644
--- a/examples/build_system/make/cpu/rv32i-ilp32.mk
+++ b/examples/build_system/make/cpu/rv32i-ilp32.mk
@@ -8,8 +8,6 @@ else ifeq ($(TOOLCHAIN),clang)
-march=rv32i_zicsr \
-mabi=ilp32 \
-else ifeq ($(TOOLCHAIN),iar)
- $(error not support)
endif
# For freeRTOS port source
diff --git a/examples/build_system/make/cpu/rv32imac-ilp32.mk b/examples/build_system/make/cpu/rv32imac-ilp32.mk
index a7b2258d7..e4a3ad24f 100644
--- a/examples/build_system/make/cpu/rv32imac-ilp32.mk
+++ b/examples/build_system/make/cpu/rv32imac-ilp32.mk
@@ -8,9 +8,6 @@ else ifeq ($(TOOLCHAIN),clang)
-march=rv32imac_zicsr_zifencei \
-mabi=ilp32 \
-else ifeq ($(TOOLCHAIN),iar)
- $(error not support)
-
endif
# For freeRTOS port source
diff --git a/examples/build_system/make/toolchain/arm_iar.mk b/examples/build_system/make/toolchain/arm_iar.mk
deleted file mode 100644
index 17967b41a..000000000
--- a/examples/build_system/make/toolchain/arm_iar.mk
+++ /dev/null
@@ -1,13 +0,0 @@
-# makefile for arm iar toolchain
-
-CC = iccarm
-AS = iasmarm
-LD = ilinkarm
-OBJCOPY = ielftool --silent
-SIZE = size
-
-# Enable extension mode (gcc compatible)
-CFLAGS += -e --debug --silent
-
-# silent mode
-ASFLAGS += -S $(addprefix -I,$(INC))
diff --git a/examples/build_system/make/toolchain/gcc_rules.mk b/examples/build_system/make/toolchain/gcc_rules.mk
index fc5225503..3463cad48 100644
--- a/examples/build_system/make/toolchain/gcc_rules.mk
+++ b/examples/build_system/make/toolchain/gcc_rules.mk
@@ -1,5 +1,3 @@
-SRC_S += $(SRC_S_GCC)
-
# Assembly files can be name with upper case .S, convert it to .s
SRC_S := $(SRC_S:.S=.s)
@@ -9,7 +7,7 @@ SRC_S := $(SRC_S:.S=.s)
OBJ += $(addprefix $(BUILD)/obj/, $(SRC_S:.s=_asm.o))
OBJ += $(addprefix $(BUILD)/obj/, $(SRC_C:.c=.o))
-CFLAGS += $(CFLAGS_GCC) -MD
+CFLAGS += -MD
# LTO makes it difficult to analyze map file for optimizing size purpose
# We will run this option in ci
@@ -25,18 +23,13 @@ ifeq ($(TOOLCHAIN),clang)
CFLAGS += $(CFLAGS_CLANG)
LDFLAGS += $(CFLAGS) $(LDFLAGS_CLANG)
else
-LDFLAGS += $(CFLAGS) $(LDFLAGS_GCC)
+LDFLAGS += $(CFLAGS)
endif
-# TODO should be removed after all examples are updated
ifdef LD_FILE
LDFLAGS += -Wl,-T,$(TOP)/$(LD_FILE)
endif
-ifdef LD_FILE_GCC
-LDFLAGS += -Wl,-T,$(TOP)/$(LD_FILE_GCC)
-endif
-
ASFLAGS += $(CFLAGS)
# libc
diff --git a/examples/build_system/make/toolchain/iar_rules.mk b/examples/build_system/make/toolchain/iar_rules.mk
deleted file mode 100644
index 2c066f6da..000000000
--- a/examples/build_system/make/toolchain/iar_rules.mk
+++ /dev/null
@@ -1,44 +0,0 @@
-SRC_S += $(SRC_S_IAR)
-
-# Assembly files can be name with upper case .S, convert it to .s
-SRC_S := $(SRC_S:.S=.s)
-
-# Due to GCC LTO bug https://bugs.launchpad.net/gcc-arm-embedded/+bug/1747966
-# assembly file should be placed first in linking order
-# '_asm' suffix is added to object of assembly file
-OBJ += $(addprefix $(BUILD)/obj/, $(SRC_S:.s=_asm.o))
-OBJ += $(addprefix $(BUILD)/obj/, $(SRC_C:.c=.o))
-
-# Linker script
-LDFLAGS += --config $(TOP)/$(LD_FILE_IAR)
-
-# ---------------------------------------
-# Rules
-# ---------------------------------------
-
-# Compile .c file
-$(BUILD)/obj/%.o: %.c
- @echo CC $(notdir $@)
- @$(CC) $(CFLAGS) -c -o $@ $<
-
-# ASM sources lower case .s
-$(BUILD)/obj/%_asm.o: %.s
- @echo AS $(notdir $@)
- @$(AS) $(ASFLAGS) -c -o $@ $<
-
-# ASM sources upper case .S
-$(BUILD)/obj/%_asm.o: %.S
- @echo AS $(notdir $@)
- @$(AS) $(ASFLAGS) -c -o $@ $<
-
-$(BUILD)/$(PROJECT).bin: $(BUILD)/$(PROJECT).elf
- @echo CREATE $@
- @$(OBJCOPY) --bin $^ $@
-
-$(BUILD)/$(PROJECT).hex: $(BUILD)/$(PROJECT).elf
- @echo CREATE $@
- @$(OBJCOPY) --ihex $^ $@
-
-$(BUILD)/$(PROJECT).elf: $(OBJ)
- @echo LINK $@
- @$(LD) -o $@ $(LDFLAGS) $^
diff --git a/examples/device/net_lwip_webserver/Makefile b/examples/device/net_lwip_webserver/Makefile
index 9d8e8ec77..6002039b3 100644
--- a/examples/device/net_lwip_webserver/Makefile
+++ b/examples/device/net_lwip_webserver/Makefile
@@ -1,7 +1,7 @@
include ../../../hw/bsp/family_support.mk
# suppress warning caused by lwip
-CFLAGS_GCC += \
+CFLAGS += \
-Wno-error=null-dereference \
-Wno-error=unused-parameter \
-Wno-error=unused-variable
diff --git a/examples/dual/host_hid_to_device_cdc/Makefile b/examples/dual/host_hid_to_device_cdc/Makefile
index a51251bf9..595cd7dec 100644
--- a/examples/dual/host_hid_to_device_cdc/Makefile
+++ b/examples/dual/host_hid_to_device_cdc/Makefile
@@ -8,7 +8,7 @@ INC += \
EXAMPLE_SOURCE += $(wildcard src/*.c)
SRC_C += $(addprefix $(EXAMPLE_PATH)/, $(EXAMPLE_SOURCE))
-CFLAGS_GCC += -Wno-error=cast-align -Wno-error=null-dereference
+CFLAGS += -Wno-error=cast-align -Wno-error=null-dereference
SRC_C += \
src/class/hid/hid_host.c \
diff --git a/examples/dual/host_info_to_device_cdc/Makefile b/examples/dual/host_info_to_device_cdc/Makefile
index 659cf6ff9..3a1d87f57 100644
--- a/examples/dual/host_info_to_device_cdc/Makefile
+++ b/examples/dual/host_info_to_device_cdc/Makefile
@@ -8,7 +8,7 @@ INC += \
EXAMPLE_SOURCE += $(wildcard src/*.c)
SRC_C += $(addprefix $(EXAMPLE_PATH)/, $(EXAMPLE_SOURCE))
-CFLAGS_GCC += -Wno-error=cast-align -Wno-error=null-dereference
+CFLAGS += -Wno-error=cast-align -Wno-error=null-dereference
SRC_C += \
src/host/hub.c \
diff --git a/examples/host/msc_file_explorer/Makefile b/examples/host/msc_file_explorer/Makefile
index 39d00d982..8c0b012ad 100644
--- a/examples/host/msc_file_explorer/Makefile
+++ b/examples/host/msc_file_explorer/Makefile
@@ -21,6 +21,6 @@ SRC_C += \
$(FATFS_PATH)/ffunicode.c \
# suppress warning caused by fatfs
-CFLAGS_GCC += -Wno-error=cast-qual
+CFLAGS += -Wno-error=cast-qual
include ../../../hw/bsp/family_rules.mk
diff --git a/examples/host/msc_file_explorer/src/msc_app.c b/examples/host/msc_file_explorer/src/msc_app.c
index c7cc366b5..3f15bb84f 100644
--- a/examples/host/msc_file_explorer/src/msc_app.c
+++ b/examples/host/msc_file_explorer/src/msc_app.c
@@ -260,7 +260,7 @@ DRESULT disk_ioctl(BYTE pdrv, /* Physical drive nmuber (0..) */
return RES_OK;
case GET_SECTOR_COUNT:
- *((DWORD *)buff) = (WORD)tuh_msc_get_block_count(dev_addr, lun);
+ *((DWORD *)buff) = (DWORD)tuh_msc_get_block_count(dev_addr, lun);
return RES_OK;
case GET_SECTOR_SIZE:
diff --git a/hw/bsp/at32f402_405/family.mk b/hw/bsp/at32f402_405/family.mk
index 09b2f1139..5f9f3ccbb 100644
--- a/hw/bsp/at32f402_405/family.mk
+++ b/hw/bsp/at32f402_405/family.mk
@@ -5,7 +5,7 @@ include $(TOP)/$(BOARD_PATH)/board.mk
CPU_CORE ?= cortex-m4
-CFLAGS_GCC += \
+CFLAGS += \
-flto
RHPORT_SPEED ?= OPT_MODE_FULL_SPEED OPT_MODE_FULL_SPEED
@@ -35,7 +35,7 @@ CFLAGS += \
-DBOARD_TUH_RHPORT=${RHPORT_HOST} \
-DBOARD_TUH_MAX_SPEED=${RHPORT_HOST_SPEED} \
-LDFLAGS_GCC += \
+LDFLAGS += \
-flto --specs=nosys.specs -nostdlib -nostartfiles
SRC_C += \
@@ -55,11 +55,9 @@ INC += \
$(TOP)/$(AT32_SDK_LIB)/cmsis/cm4/core_support \
$(TOP)/$(AT32_SDK_LIB)/cmsis/cm4/device_support
-SRC_S_GCC += ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/gcc/startup_${AT32_FAMILY}.s
-SRC_S_IAR += ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/iar/startup_${AT32_FAMILY}.s
+SRC_S += ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/gcc/startup_${AT32_FAMILY}.s
-LD_FILE_GCC ?= ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/gcc/linker/${MCU_LINKER_NAME}_FLASH.ld
-LD_FILE_IAR ?= ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/iar/linker/${MCU_LINKER_NAME}.icf
+LD_FILE ?= ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/gcc/linker/${MCU_LINKER_NAME}_FLASH.ld
# For freeRTOS port source
FREERTOS_PORTABLE_SRC = $(FREERTOS_PORTABLE_PATH)/ARM_CM4F
diff --git a/hw/bsp/at32f403a_407/family.mk b/hw/bsp/at32f403a_407/family.mk
index f458881a3..f7dde7d90 100644
--- a/hw/bsp/at32f403a_407/family.mk
+++ b/hw/bsp/at32f403a_407/family.mk
@@ -5,13 +5,13 @@ include $(TOP)/$(BOARD_PATH)/board.mk
CPU_CORE ?= cortex-m4
-CFLAGS_GCC += \
+CFLAGS += \
-flto
CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_AT32F403A_407
-LDFLAGS_GCC += \
+LDFLAGS += \
-flto --specs=nosys.specs -nostdlib -nostartfiles
SRC_C += \
@@ -30,11 +30,9 @@ INC += \
$(TOP)/$(AT32_SDK_LIB)/cmsis/cm4/core_support \
$(TOP)/$(AT32_SDK_LIB)/cmsis/cm4/device_support
-SRC_S_GCC += ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/gcc/startup_${AT32_FAMILY}.s
-SRC_S_IAR += ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/iar/startup_${AT32_FAMILY}.s
+SRC_S += ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/gcc/startup_${AT32_FAMILY}.s
-LD_FILE_GCC ?= ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/gcc/linker/${MCU_LINKER_NAME}_FLASH.ld
-LD_FILE_IAR ?= ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/iar/linker/${MCU_LINKER_NAME}.icf
+LD_FILE ?= ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/gcc/linker/${MCU_LINKER_NAME}_FLASH.ld
# For freeRTOS port source
FREERTOS_PORTABLE_SRC = $(FREERTOS_PORTABLE_PATH)/ARM_CM4F
diff --git a/hw/bsp/at32f413/family.mk b/hw/bsp/at32f413/family.mk
index abcd15d11..86744e1dc 100644
--- a/hw/bsp/at32f413/family.mk
+++ b/hw/bsp/at32f413/family.mk
@@ -5,13 +5,13 @@ include $(TOP)/$(BOARD_PATH)/board.mk
CPU_CORE ?= cortex-m4
-CFLAGS_GCC += \
+CFLAGS += \
-flto
CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_AT32F413
-LDFLAGS_GCC += \
+LDFLAGS += \
-flto --specs=nosys.specs -nostdlib -nostartfiles
SRC_C += \
@@ -30,11 +30,9 @@ INC += \
$(TOP)/$(AT32_SDK_LIB)/cmsis/cm4/core_support \
$(TOP)/$(AT32_SDK_LIB)/cmsis/cm4/device_support
-SRC_S_GCC += ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/gcc/startup_${AT32_FAMILY}.s
-SRC_S_IAR += ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/iar/startup_${AT32_FAMILY}.s
+SRC_S += ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/gcc/startup_${AT32_FAMILY}.s
-LD_FILE_GCC ?= ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/gcc/linker/${MCU_LINKER_NAME}_FLASH.ld
-LD_FILE_IAR ?= ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/iar/linker/${MCU_LINKER_NAME}.icf
+LD_FILE ?= ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/gcc/linker/${MCU_LINKER_NAME}_FLASH.ld
# For freeRTOS port source
FREERTOS_PORTABLE_SRC = $(FREERTOS_PORTABLE_PATH)/ARM_CM4F
diff --git a/hw/bsp/at32f415/family.mk b/hw/bsp/at32f415/family.mk
index 73a89c543..72339b782 100644
--- a/hw/bsp/at32f415/family.mk
+++ b/hw/bsp/at32f415/family.mk
@@ -5,13 +5,13 @@ include $(TOP)/$(BOARD_PATH)/board.mk
CPU_CORE ?= cortex-m4-nofpu
-CFLAGS_GCC += \
+CFLAGS += \
-flto
CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_AT32F415 \
-LDFLAGS_GCC += \
+LDFLAGS += \
-flto --specs=nosys.specs -nostdlib -nostartfiles
SRC_C += \
@@ -30,10 +30,8 @@ INC += \
$(TOP)/$(AT32_SDK_LIB)/cmsis/cm4/core_support \
$(TOP)/$(AT32_SDK_LIB)/cmsis/cm4/device_support
-SRC_S_GCC += ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/gcc/startup_${AT32_FAMILY}.s
-SRC_S_IAR += ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/iar/startup_${AT32_FAMILY}.s
+SRC_S += ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/gcc/startup_${AT32_FAMILY}.s
-LD_FILE_GCC ?= ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/gcc/linker/${MCU_LINKER_NAME}_FLASH.ld
-LD_FILE_IAR ?= ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/iar/linker/${MCU_LINKER_NAME}.icf
+LD_FILE ?= ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/gcc/linker/${MCU_LINKER_NAME}_FLASH.ld
flash: flash-atlink
diff --git a/hw/bsp/at32f423/family.mk b/hw/bsp/at32f423/family.mk
index 960f4a9a1..df531460a 100644
--- a/hw/bsp/at32f423/family.mk
+++ b/hw/bsp/at32f423/family.mk
@@ -5,13 +5,13 @@ include $(TOP)/$(BOARD_PATH)/board.mk
CPU_CORE ?= cortex-m4
-CFLAGS_GCC += \
+CFLAGS += \
-flto
CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_AT32F423 \
-LDFLAGS_GCC += \
+LDFLAGS += \
-flto --specs=nosys.specs -nostdlib -nostartfiles
SRC_C += \
@@ -31,10 +31,8 @@ INC += \
$(TOP)/$(AT32_SDK_LIB)/cmsis/cm4/core_support \
$(TOP)/$(AT32_SDK_LIB)/cmsis/cm4/device_support
-SRC_S_GCC += ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/gcc/startup_${AT32_FAMILY}.s
-SRC_S_IAR += ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/iar/startup_${AT32_FAMILY}.s
+SRC_S += ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/gcc/startup_${AT32_FAMILY}.s
-LD_FILE_GCC ?= ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/gcc/linker/${MCU_LINKER_NAME}_FLASH.ld
-LD_FILE_IAR ?= ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/iar/linker/${MCU_LINKER_NAME}.icf
+LD_FILE ?= ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/gcc/linker/${MCU_LINKER_NAME}_FLASH.ld
flash: flash-atlink
diff --git a/hw/bsp/at32f425/family.mk b/hw/bsp/at32f425/family.mk
index 0a0a74414..b659608a3 100644
--- a/hw/bsp/at32f425/family.mk
+++ b/hw/bsp/at32f425/family.mk
@@ -5,13 +5,13 @@ include $(TOP)/$(BOARD_PATH)/board.mk
CPU_CORE ?= cortex-m4-nofpu
-CFLAGS_GCC += \
+CFLAGS += \
-flto
CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_AT32F425 \
-LDFLAGS_GCC += \
+LDFLAGS += \
-flto --specs=nosys.specs -nostdlib -nostartfiles
SRC_C += \
@@ -30,10 +30,8 @@ INC += \
$(TOP)/$(AT32_SDK_LIB)/cmsis/cm4/core_support \
$(TOP)/$(AT32_SDK_LIB)/cmsis/cm4/device_support
-SRC_S_GCC += ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/gcc/startup_${AT32_FAMILY}.s
-SRC_S_IAR += ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/iar/startup_${AT32_FAMILY}.s
+SRC_S += ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/gcc/startup_${AT32_FAMILY}.s
-LD_FILE_GCC ?= ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/gcc/linker/${MCU_LINKER_NAME}_FLASH.ld
-LD_FILE_IAR ?= ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/iar/linker/${MCU_LINKER_NAME}.icf
+LD_FILE ?= ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/gcc/linker/${MCU_LINKER_NAME}_FLASH.ld
flash: flash-atlink
diff --git a/hw/bsp/at32f435_437/family.mk b/hw/bsp/at32f435_437/family.mk
index ba22f5420..73777400b 100644
--- a/hw/bsp/at32f435_437/family.mk
+++ b/hw/bsp/at32f435_437/family.mk
@@ -5,7 +5,7 @@ include $(TOP)/$(BOARD_PATH)/board.mk
CPU_CORE ?= cortex-m4
-CFLAGS_GCC += \
+CFLAGS += \
-flto
CFLAGS += \
@@ -15,7 +15,7 @@ CFLAGS += \
-DBOARD_TUD_MAX_SPEED=OPT_MODE_FULL_SPEED \
-DBOARD_TUH_MAX_SPEED=OPT_MODE_FULL_SPEED \
-LDFLAGS_GCC += \
+LDFLAGS += \
-flto --specs=nosys.specs -nostdlib -nostartfiles
SRC_C += \
@@ -36,10 +36,8 @@ INC += \
$(TOP)/$(AT32_SDK_LIB)/cmsis/cm4/core_support \
$(TOP)/$(AT32_SDK_LIB)/cmsis/cm4/device_support
-SRC_S_GCC += ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/gcc/startup_${AT32_FAMILY}.s
-SRC_S_IAR += ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/iar/startup_${AT32_FAMILY}.s
+SRC_S += ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/gcc/startup_${AT32_FAMILY}.s
-LD_FILE_GCC ?= ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/gcc/linker/${MCU_LINKER_NAME}_FLASH.ld
-LD_FILE_IAR ?= ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/iar/linker/${MCU_LINKER_NAME}.icf
+LD_FILE ?= ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/gcc/linker/${MCU_LINKER_NAME}_FLASH.ld
flash: flash-atlink
diff --git a/hw/bsp/at32f45x/family.mk b/hw/bsp/at32f45x/family.mk
index e42f27557..a9fb1a078 100644
--- a/hw/bsp/at32f45x/family.mk
+++ b/hw/bsp/at32f45x/family.mk
@@ -5,13 +5,13 @@ include $(TOP)/$(BOARD_PATH)/board.mk
CPU_CORE ?= cortex-m4
-CFLAGS_GCC += \
+CFLAGS += \
-flto
CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_AT32F45X \
-LDFLAGS_GCC += \
+LDFLAGS += \
-flto --specs=nosys.specs -nostdlib -nostartfiles
SRC_C += \
@@ -31,10 +31,8 @@ INC += \
$(TOP)/$(AT32_SDK_LIB)/cmsis/cm4/core_support \
$(TOP)/$(AT32_SDK_LIB)/cmsis/cm4/device_support
-SRC_S_GCC += ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/gcc/startup_${AT32_FAMILY}.s
-SRC_S_IAR += ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/iar/startup_${AT32_FAMILY}.s
+SRC_S += ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/gcc/startup_${AT32_FAMILY}.s
-LD_FILE_GCC ?= ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/gcc/linker/${MCU_LINKER_NAME}_FLASH.ld
-LD_FILE_IAR ?= ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/iar/linker/${MCU_LINKER_NAME}.icf
+LD_FILE ?= ${AT32_SDK_LIB}/cmsis/cm4/device_support/startup/gcc/linker/${MCU_LINKER_NAME}_FLASH.ld
flash: flash-atlink
diff --git a/hw/bsp/broadcom_32bit/family.mk b/hw/bsp/broadcom_32bit/family.mk
index 9d4a3b76c..a282e9961 100644
--- a/hw/bsp/broadcom_32bit/family.mk
+++ b/hw/bsp/broadcom_32bit/family.mk
@@ -15,7 +15,7 @@ CFLAGS += \
CROSS_COMPILE = arm-none-eabi-
# mcu driver cause following warnings
-CFLAGS_GCC += -Wno-error=cast-qual -Wno-error=redundant-decls
+CFLAGS += -Wno-error=cast-qual -Wno-error=redundant-decls
SRC_C += \
src/portable/synopsys/dwc2/dcd_dwc2.c \
diff --git a/hw/bsp/broadcom_64bit/family.mk b/hw/bsp/broadcom_64bit/family.mk
index 1ce80e22b..37d381f9f 100644
--- a/hw/bsp/broadcom_64bit/family.mk
+++ b/hw/bsp/broadcom_64bit/family.mk
@@ -14,7 +14,7 @@ CFLAGS += \
CROSS_COMPILE = aarch64-none-elf-
# mcu driver cause following warnings
-CFLAGS_GCC += -Wno-error=cast-qual -Wno-error=redundant-decls
+CFLAGS += -Wno-error=cast-qual -Wno-error=redundant-decls
SRC_C += \
src/portable/synopsys/dwc2/dcd_dwc2.c \
diff --git a/hw/bsp/ch32v10x/family.mk b/hw/bsp/ch32v10x/family.mk
index d96d5012e..fb699b0bb 100644
--- a/hw/bsp/ch32v10x/family.mk
+++ b/hw/bsp/ch32v10x/family.mk
@@ -26,7 +26,7 @@ CFLAGS += \
# https://github.com/openwch/ch32v20x/pull/12
CFLAGS += -Wno-error=strict-prototypes
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostdlib -nostartfiles \
--specs=nosys.specs --specs=nano.specs \
diff --git a/hw/bsp/ch32v20x/family.mk b/hw/bsp/ch32v20x/family.mk
index 7042ecbb7..1d059bcba 100644
--- a/hw/bsp/ch32v20x/family.mk
+++ b/hw/bsp/ch32v20x/family.mk
@@ -37,7 +37,7 @@ else
CFLAGS += -DCFG_TUD_WCH_USBIP_USBFS=1
endif
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostdlib -nostartfiles \
--specs=nosys.specs --specs=nano.specs \
diff --git a/hw/bsp/ch32v30x/family.mk b/hw/bsp/ch32v30x/family.mk
index be6813914..5ccdea8ae 100644
--- a/hw/bsp/ch32v30x/family.mk
+++ b/hw/bsp/ch32v30x/family.mk
@@ -36,7 +36,7 @@ else
CFLAGS += -DCFG_TUD_WCH_USBIP_USBFS=1
endif
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostdlib -nostartfiles \
--specs=nosys.specs --specs=nano.specs \
diff --git a/hw/bsp/cxd56/family.mk b/hw/bsp/cxd56/family.mk
index adfe9ee82..627dc6ec2 100644
--- a/hw/bsp/cxd56/family.mk
+++ b/hw/bsp/cxd56/family.mk
@@ -32,7 +32,7 @@ CPU_CORE ?= cortex-m4
# lwip/src/core/raw.c:334:43: error: declaration of 'recv' shadows a global declaration
CFLAGS += -Wno-error=shadow -Wno-error=redundant-decls
-LDFLAGS_GCC += -specs=nosys.specs -specs=nano.specs
+LDFLAGS += -specs=nosys.specs -specs=nano.specs
SPRESENSE_SDK = $(TOP)/hw/mcu/sony/cxd56/spresense-exported-sdk
diff --git a/hw/bsp/da1469x/family.mk b/hw/bsp/da1469x/family.mk
index f35fe2cb5..878442e8e 100644
--- a/hw/bsp/da1469x/family.mk
+++ b/hw/bsp/da1469x/family.mk
@@ -14,7 +14,7 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_DA1469X \
-DCFG_TUD_ENDPOINT0_SIZE=8\
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostdlib \
--specs=nosys.specs --specs=nano.specs
diff --git a/hw/bsp/efm32/family.mk b/hw/bsp/efm32/family.mk
index f115b6bd4..f8db0cc38 100644
--- a/hw/bsp/efm32/family.mk
+++ b/hw/bsp/efm32/family.mk
@@ -16,7 +16,7 @@ CPU_CORE ?= cortex-m4
# EFM32_FAMILY should be set by board.mk (e.g. efm32gg12b)
SILABS_CMSIS = hw/mcu/silabs/cmsis-dfp-$(EFM32_FAMILY)/Device/SiliconLabs/$(shell echo $(EFM32_FAMILY) | tr a-z A-Z)
-LDFLAGS_GCC += -specs=nosys.specs -specs=nano.specs
+LDFLAGS += -specs=nosys.specs -specs=nano.specs
# All source paths should be relative to the top level.
LD_FILE = $(SILABS_CMSIS)/Source/GCC/$(EFM32_FAMILY).ld
diff --git a/hw/bsp/family_support.mk b/hw/bsp/family_support.mk
index 7122a7764..69aa08922 100644
--- a/hw/bsp/family_support.mk
+++ b/hw/bsp/family_support.mk
@@ -7,12 +7,10 @@ to_upper = $(subst a,A,$(subst b,B,$(subst c,C,$(subst d,D,$(subst e,E,$(subst f
#-------------------------------------------------------------
# Toolchain
-# Can be changed via TOOLCHAIN=gcc|iar or CC=arm-none-eabi-gcc|iccarm|clang
+# Can be changed via TOOLCHAIN=gcc|clang or CC=arm-none-eabi-gcc|clang
#-------------------------------------------------------------
ifneq (,$(findstring clang,$(CC)))
TOOLCHAIN = clang
-else ifneq (,$(findstring iccarm,$(CC)))
- TOOLCHAIN = iar
else ifneq (,$(findstring gcc,$(CC)))
TOOLCHAIN = gcc
endif
@@ -149,7 +147,7 @@ endif
#---------------------- FreeRTOS -----------------------
FREERTOS_SRC = lib/FreeRTOS-Kernel
-FREERTOS_PORTABLE_PATH = $(FREERTOS_SRC)/portable/$(if $(findstring iar,$(TOOLCHAIN)),IAR,GCC)
+FREERTOS_PORTABLE_PATH = $(FREERTOS_SRC)/portable/GCC
ifeq ($(RTOS),freertos)
SRC_C += \
@@ -168,13 +166,13 @@ ifeq ($(RTOS),freertos)
CFLAGS += -DCFG_TUSB_OS=OPT_OS_FREERTOS
# Suppress FreeRTOSConfig.h warnings
- CFLAGS_GCC += -Wno-error=redundant-decls
+ CFLAGS += -Wno-error=redundant-decls
# Suppress FreeRTOS source warnings
- CFLAGS_GCC += -Wno-error=cast-qual
+ CFLAGS += -Wno-error=cast-qual
# FreeRTOS (lto + Os) linker issue
- LDFLAGS_GCC += -Wl,--undefined=vTaskSwitchContext
+ LDFLAGS += -Wl,--undefined=vTaskSwitchContext
endif
#---------------- Helper ----------------
diff --git a/hw/bsp/fomu/family.mk b/hw/bsp/fomu/family.mk
index c29b1c70f..27404efb5 100644
--- a/hw/bsp/fomu/family.mk
+++ b/hw/bsp/fomu/family.mk
@@ -7,7 +7,7 @@ CFLAGS += \
-flto \
-DCFG_TUSB_MCU=OPT_MCU_VALENTYUSB_EPTRI
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostdlib \
--specs=nosys.specs --specs=nano.specs \
diff --git a/hw/bsp/hpmicro/family.mk b/hw/bsp/hpmicro/family.mk
index f8cde55eb..ea4f0c003 100644
--- a/hw/bsp/hpmicro/family.mk
+++ b/hw/bsp/hpmicro/family.mk
@@ -27,7 +27,7 @@ endif
CFLAGS += -Wno-error=cast-align -Wno-error=double-promotion -Wno-error=discarded-qualifiers \
-Wno-error=undef -Wno-error=unused-parameter -Wno-error=redundant-decls
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostartfiles \
--specs=nosys.specs --specs=nano.specs
diff --git a/hw/bsp/imxrt/family.mk b/hw/bsp/imxrt/family.mk
index 59735670a..59c3aa158 100644
--- a/hw/bsp/imxrt/family.mk
+++ b/hw/bsp/imxrt/family.mk
@@ -41,7 +41,7 @@ endif
# mcu driver cause following warnings
CFLAGS += -Wno-error=unused-parameter -Wno-error=implicit-fallthrough -Wno-error=redundant-decls
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostartfiles \
--specs=nosys.specs --specs=nano.specs
diff --git a/hw/bsp/kinetis_k/family.mk b/hw/bsp/kinetis_k/family.mk
index 7a51a77d8..b1e1fb3aa 100644
--- a/hw/bsp/kinetis_k/family.mk
+++ b/hw/bsp/kinetis_k/family.mk
@@ -12,7 +12,7 @@ LDFLAGS += \
-Wl,--defsym,__stack_size__=0x400 \
-Wl,--defsym,__heap_size__=0
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostartfiles \
--specs=nosys.specs --specs=nano.specs \
diff --git a/hw/bsp/kinetis_k32l/boards/frdm_k32l2a4s/board.mk b/hw/bsp/kinetis_k32l/boards/frdm_k32l2a4s/board.mk
index 513b78d66..bc6a4a1ba 100644
--- a/hw/bsp/kinetis_k32l/boards/frdm_k32l2a4s/board.mk
+++ b/hw/bsp/kinetis_k32l/boards/frdm_k32l2a4s/board.mk
@@ -3,7 +3,7 @@ MCU_VARIANT = K32L2A41A
CFLAGS += -DCPU_K32L2A41VLH1A
# mcu driver cause following warnings
-CFLAGS_GCC += -Wno-error=unused-parameter -Wno-error=redundant-decls -Wno-error=cast-qual
+CFLAGS += -Wno-error=unused-parameter -Wno-error=redundant-decls -Wno-error=cast-qual
# All source paths should be relative to the top level.
LD_FILE = $(MCUX_DEVICES)/K32L/$(MCU_VARIANT)/gcc/K32L2A41xxxxA_flash.ld
diff --git a/hw/bsp/kinetis_k32l/family.mk b/hw/bsp/kinetis_k32l/family.mk
index 2802337d3..a99fb5dbe 100644
--- a/hw/bsp/kinetis_k32l/family.mk
+++ b/hw/bsp/kinetis_k32l/family.mk
@@ -8,7 +8,7 @@ MCUX_DEVICES = hw/mcu/nxp/mcux-devices-kinetis
CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_KINETIS_K32L
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostartfiles \
-specs=nosys.specs -specs=nano.specs
diff --git a/hw/bsp/kinetis_kl/family.mk b/hw/bsp/kinetis_kl/family.mk
index aec53d486..201ab99dc 100644
--- a/hw/bsp/kinetis_kl/family.mk
+++ b/hw/bsp/kinetis_kl/family.mk
@@ -12,7 +12,7 @@ LDFLAGS += \
-Wl,--defsym,__stack_size__=0x400 \
-Wl,--defsym,__heap_size__=0
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostartfiles \
-specs=nosys.specs -specs=nano.specs \
diff --git a/hw/bsp/lpc11/family.mk b/hw/bsp/lpc11/family.mk
index a3ec33768..8ac3ecb6a 100644
--- a/hw/bsp/lpc11/family.mk
+++ b/hw/bsp/lpc11/family.mk
@@ -13,7 +13,7 @@ CFLAGS += \
CFLAGS += \
-Wno-error=incompatible-pointer-types \
-LDFLAGS_GCC += --specs=nosys.specs --specs=nano.specs
+LDFLAGS += --specs=nosys.specs --specs=nano.specs
SRC_C += \
src/portable/nxp/lpc_ip3511/dcd_lpc_ip3511.c \
diff --git a/hw/bsp/lpc13/family.mk b/hw/bsp/lpc13/family.mk
index 7ff2c058a..0fed67ebc 100644
--- a/hw/bsp/lpc13/family.mk
+++ b/hw/bsp/lpc13/family.mk
@@ -12,7 +12,7 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_LPC13XX \
-DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))'
-LDFLAGS_GCC += -specs=nosys.specs -specs=nano.specs
+LDFLAGS += -specs=nosys.specs -specs=nano.specs
# startup.c and lpc_types.h cause following errors
CFLAGS += -Wno-error=strict-prototypes -Wno-error=redundant-decls
diff --git a/hw/bsp/lpc15/family.mk b/hw/bsp/lpc15/family.mk
index 3267e973a..a42b2d9e4 100644
--- a/hw/bsp/lpc15/family.mk
+++ b/hw/bsp/lpc15/family.mk
@@ -10,10 +10,10 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_LPC15XX \
-DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))'
-LDFLAGS_GCC += -specs=nosys.specs -specs=nano.specs
+LDFLAGS += -specs=nosys.specs -specs=nano.specs
# mcu driver cause following warnings
-CFLAGS_GCC += -Wno-error=strict-prototypes -Wno-error=unused-parameter -Wno-error=unused-variable -Wno-error=cast-qual
+CFLAGS += -Wno-error=strict-prototypes -Wno-error=unused-parameter -Wno-error=unused-variable -Wno-error=cast-qual
MCU_DIR = hw/mcu/nxp/lpcopen/lpc15xx/lpc_chip_15xx
diff --git a/hw/bsp/lpc17/family.mk b/hw/bsp/lpc17/family.mk
index f1ed1a7d0..5d4ff54a6 100644
--- a/hw/bsp/lpc17/family.mk
+++ b/hw/bsp/lpc17/family.mk
@@ -11,12 +11,12 @@ CFLAGS += \
-DRTC_EV_SUPPORT=0
# lpc_types.h cause following errors
-CFLAGS_GCC += -Wno-error=strict-prototypes -Wno-error=cast-qual
+CFLAGS += -Wno-error=strict-prototypes -Wno-error=cast-qual
# caused by freeRTOS port !!
CFLAGS += -Wno-error=maybe-uninitialized
-LDFLAGS_GCC += --specs=nosys.specs --specs=nano.specs
+LDFLAGS += --specs=nosys.specs --specs=nano.specs
SRC_C += \
src/portable/nxp/lpc17_40/dcd_lpc17_40.c \
diff --git a/hw/bsp/lpc18/family.mk b/hw/bsp/lpc18/family.mk
index 3bbafed11..5c46881e2 100644
--- a/hw/bsp/lpc18/family.mk
+++ b/hw/bsp/lpc18/family.mk
@@ -11,9 +11,9 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_LPC18XX
# mcu driver cause following warnings
-CFLAGS_GCC += -Wno-error=unused-parameter -Wno-error=cast-qual
+CFLAGS += -Wno-error=unused-parameter -Wno-error=cast-qual
-LDFLAGS_GCC += --specs=nosys.specs --specs=nano.specs
+LDFLAGS += --specs=nosys.specs --specs=nano.specs
SRC_C += \
src/portable/chipidea/ci_hs/dcd_ci_hs.c \
diff --git a/hw/bsp/lpc40/family.mk b/hw/bsp/lpc40/family.mk
index c21923000..af8864335 100644
--- a/hw/bsp/lpc40/family.mk
+++ b/hw/bsp/lpc40/family.mk
@@ -11,9 +11,9 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_LPC40XX
# mcu driver cause following warnings
-CFLAGS_GCC += -Wno-error=strict-prototypes -Wno-error=unused-parameter -Wno-error=cast-qual
+CFLAGS += -Wno-error=strict-prototypes -Wno-error=unused-parameter -Wno-error=cast-qual
-LDFLAGS_GCC += --specs=nosys.specs --specs=nano.specs
+LDFLAGS += --specs=nosys.specs --specs=nano.specs
# All source paths should be relative to the top level.
SRC_C += \
diff --git a/hw/bsp/lpc43/family.mk b/hw/bsp/lpc43/family.mk
index 39be867d1..5813dfdcc 100644
--- a/hw/bsp/lpc43/family.mk
+++ b/hw/bsp/lpc43/family.mk
@@ -9,14 +9,14 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_LPC43XX
# mcu driver cause following warnings
-CFLAGS_GCC += \
+CFLAGS += \
-flto \
-nostdlib \
-Wno-error=unused-parameter \
-Wno-error=cast-qual \
-Wno-error=incompatible-pointer-types \
-LDFLAGS_GCC += --specs=nosys.specs --specs=nano.specs
+LDFLAGS += --specs=nosys.specs --specs=nano.specs
SRC_C += \
src/portable/chipidea/ci_hs/dcd_ci_hs.c \
diff --git a/hw/bsp/lpc51/family.mk b/hw/bsp/lpc51/family.mk
index 34987d183..e295d0587 100644
--- a/hw/bsp/lpc51/family.mk
+++ b/hw/bsp/lpc51/family.mk
@@ -12,7 +12,7 @@ CFLAGS += \
# mcu driver cause following warnings
CFLAGS += -Wno-error=unused-parameter
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostartfiles \
--specs=nosys.specs --specs=nano.specs \
diff --git a/hw/bsp/lpc54/family.mk b/hw/bsp/lpc54/family.mk
index 94168f6b2..324b3b6f1 100644
--- a/hw/bsp/lpc54/family.mk
+++ b/hw/bsp/lpc54/family.mk
@@ -23,7 +23,7 @@ endif
# mcu driver cause following warnings
CFLAGS += -Wno-error=unused-parameter
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostartfiles \
--specs=nosys.specs --specs=nano.specs
diff --git a/hw/bsp/lpc55/family.mk b/hw/bsp/lpc55/family.mk
index 2fc76ed50..a9b6f6af1 100644
--- a/hw/bsp/lpc55/family.mk
+++ b/hw/bsp/lpc55/family.mk
@@ -41,7 +41,7 @@ endif
# mcu driver cause following warnings
CFLAGS += -Wno-error=unused-parameter -Wno-error=float-equal
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostartfiles \
--specs=nosys.specs --specs=nano.specs \
-Wl,--defsym=__stack_size__=0x1000 \
diff --git a/hw/bsp/maxim/family.mk b/hw/bsp/maxim/family.mk
index 3ddf8cf39..9d66553fc 100644
--- a/hw/bsp/maxim/family.mk
+++ b/hw/bsp/maxim/family.mk
@@ -60,8 +60,8 @@ CFLAGS += \
-Wno-error=sign-compare \
-Wno-error=enum-conversion \
-LDFLAGS_GCC += -nostartfiles --specs=nosys.specs --specs=nano.specs
-LD_FILE_GCC ?= $(FAMILY_PATH)/linker/${MAX_DEVICE}.ld
+LDFLAGS += -nostartfiles --specs=nosys.specs --specs=nano.specs
+LD_FILE ?= $(FAMILY_PATH)/linker/${MAX_DEVICE}.ld
# If the applications needs to be signed (for the MAX32651), sign it first and
# then need to use MSDK's OpenOCD to flash it
@@ -99,7 +99,7 @@ SRC_C += \
${MSDK_LIB}/PeriphDrivers/Source/UART/uart_common.c \
${MSDK_LIB}/PeriphDrivers/Source/UART/uart_${PERIPH_SUFFIX}${PERIPH_ID}.c \
-SRC_S_GCC += ${MSDK_LIB}/CMSIS/Device/Maxim/${MAX_DEVICE_UPPER}/Source/GCC/startup_${MAX_DEVICE}.S
+SRC_S += ${MSDK_LIB}/CMSIS/Device/Maxim/${MAX_DEVICE_UPPER}/Source/GCC/startup_${MAX_DEVICE}.S
INC += \
$(TOP)/$(BOARD_PATH) \
diff --git a/hw/bsp/mcx/family.mk b/hw/bsp/mcx/family.mk
index 3d63eb238..c5dd945b9 100644
--- a/hw/bsp/mcx/family.mk
+++ b/hw/bsp/mcx/family.mk
@@ -15,7 +15,7 @@ CFLAGS += \
# mcu driver cause following warnings
CFLAGS += -Wno-error=unused-parameter -Wno-error=old-style-declaration -Wno-error=redundant-decls
-LDFLAGS_GCC += \
+LDFLAGS += \
--specs=nosys.specs --specs=nano.specs \
-Wl,--defsym=__stack_size__=0x1000 \
-Wl,--defsym=__heap_size__=0 \
diff --git a/hw/bsp/mm32/family.mk b/hw/bsp/mm32/family.mk
index a790663ab..5e40fd09e 100644
--- a/hw/bsp/mm32/family.mk
+++ b/hw/bsp/mm32/family.mk
@@ -13,7 +13,7 @@ CFLAGS += \
# suppress warning caused by vendor mcu driver
CFLAGS += -Wno-error=unused-parameter -Wno-error=maybe-uninitialized -Wno-error=cast-qual
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostdlib -nostartfiles \
-specs=nosys.specs -specs=nano.specs \
diff --git a/hw/bsp/msp432e4/family.mk b/hw/bsp/msp432e4/family.mk
index d837f9351..7a7a17b61 100644
--- a/hw/bsp/msp432e4/family.mk
+++ b/hw/bsp/msp432e4/family.mk
@@ -11,7 +11,7 @@ CFLAGS += \
# mcu driver cause following warnings
CFLAGS += -Wno-error=cast-qual -Wno-error=format=
-LDFLAGS_GCC += --specs=nosys.specs --specs=nano.specs
+LDFLAGS += --specs=nosys.specs --specs=nano.specs
LD_FILE = hw/mcu/ti/msp432e4/Source/${MCU_VARIANT}.ld
diff --git a/hw/bsp/nrf/family.mk b/hw/bsp/nrf/family.mk
index 2cead99db..e7e9e7d0a 100644
--- a/hw/bsp/nrf/family.mk
+++ b/hw/bsp/nrf/family.mk
@@ -42,7 +42,7 @@ CFLAGS += \
#CFLAGS += -D__START=main
# suppress warning caused by vendor mcu driver
-CFLAGS_GCC += \
+CFLAGS += \
-flto \
-Wno-error=undef \
-Wno-error=unused-parameter \
@@ -51,7 +51,7 @@ CFLAGS_GCC += \
-Wno-error=cast-qual \
-Wno-error=redundant-decls \
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostartfiles \
--specs=nosys.specs --specs=nano.specs \
-L$(TOP)/${NRFX_PATH}/mdk
diff --git a/hw/bsp/nuc100_120/family.mk b/hw/bsp/nuc100_120/family.mk
index f9afb4f72..e915e3e33 100644
--- a/hw/bsp/nuc100_120/family.mk
+++ b/hw/bsp/nuc100_120/family.mk
@@ -8,7 +8,7 @@ CFLAGS += \
CPU_CORE ?= cortex-m0
-LDFLAGS_GCC += -specs=nosys.specs -specs=nano.specs
+LDFLAGS += -specs=nosys.specs -specs=nano.specs
# LD_FILE is defined in board.mk
diff --git a/hw/bsp/nuc121_125/family.mk b/hw/bsp/nuc121_125/family.mk
index f46dac6e4..979e8ac9f 100644
--- a/hw/bsp/nuc121_125/family.mk
+++ b/hw/bsp/nuc121_125/family.mk
@@ -12,7 +12,7 @@ CPU_CORE ?= cortex-m0
# mcu driver cause following warnings
CFLAGS += -Wno-error=redundant-decls
-LDFLAGS_GCC += \
+LDFLAGS += \
--specs=nosys.specs --specs=nano.specs
# All source paths should be relative to the top level.
diff --git a/hw/bsp/nuc126/family.mk b/hw/bsp/nuc126/family.mk
index 37df7aaab..f2f02b621 100644
--- a/hw/bsp/nuc126/family.mk
+++ b/hw/bsp/nuc126/family.mk
@@ -13,7 +13,7 @@ CPU_CORE ?= cortex-m0
# mcu driver cause following warnings
CFLAGS += -Wno-error=redundant-decls
-LDFLAGS_GCC += -specs=nosys.specs -specs=nano.specs
+LDFLAGS += -specs=nosys.specs -specs=nano.specs
# All source paths should be relative to the top level.
# LD_FILE is defined in board.mk
diff --git a/hw/bsp/nuc505/family.mk b/hw/bsp/nuc505/family.mk
index e1f25e2db..d776defde 100644
--- a/hw/bsp/nuc505/family.mk
+++ b/hw/bsp/nuc505/family.mk
@@ -9,7 +9,7 @@ CPU_CORE ?= cortex-m4
# mcu driver cause following warnings
CFLAGS += -Wno-error=redundant-decls
-LDFLAGS_GCC += -specs=nosys.specs -specs=nano.specs
+LDFLAGS += -specs=nosys.specs -specs=nano.specs
# LD_FILE is defined in board.mk
diff --git a/hw/bsp/ra/family.mk b/hw/bsp/ra/family.mk
index 6ac7c262f..64a707ed6 100644
--- a/hw/bsp/ra/family.mk
+++ b/hw/bsp/ra/family.mk
@@ -39,7 +39,7 @@ CFLAGS += \
-DBOARD_TUH_RHPORT=${RHPORT_HOST} \
-DBOARD_TUH_MAX_SPEED=${RHPORT_HOST_SPEED}
-CFLAGS_GCC += \
+CFLAGS += \
-flto \
-Wno-error=undef \
-Wno-error=strict-prototypes \
@@ -49,7 +49,7 @@ CFLAGS_GCC += \
-Wno-error=unused-variable \
-ffreestanding
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostartfiles -nostdlib \
-specs=nosys.specs -specs=nano.specs
diff --git a/hw/bsp/rw61x/family.mk b/hw/bsp/rw61x/family.mk
index 08eafddbc..4893f717f 100644
--- a/hw/bsp/rw61x/family.mk
+++ b/hw/bsp/rw61x/family.mk
@@ -17,7 +17,7 @@ CFLAGS += \
# mcu driver cause following warnings
CFLAGS += -Wno-error=unused-parameter -Wno-error=old-style-declaration -Wno-error=redundant-decls
-LDFLAGS_GCC += -specs=nosys.specs -specs=nano.specs
+LDFLAGS += -specs=nosys.specs -specs=nano.specs
# All source paths should be relative to the top level.
LD_FILE ?= $(SDK_DIR)/devices/$(MCU_VARIANT)/gcc/$(MCU_CORE)_flash.ld
diff --git a/hw/bsp/rx/family.mk b/hw/bsp/rx/family.mk
index 8b23b6c46..a357460e8 100644
--- a/hw/bsp/rx/family.mk
+++ b/hw/bsp/rx/family.mk
@@ -14,7 +14,7 @@ CFLAGS += \
# suppress warning caused by vendor mcu driver
CFLAGS += -Wno-error=redundant-decls
-LDFLAGS_GCC += -specs=nosys.specs -specs=nano.specs
+LDFLAGS += -specs=nosys.specs -specs=nano.specs
SRC_C += \
src/portable/renesas/rusb2/dcd_rusb2.c \
diff --git a/hw/bsp/samd11/family.mk b/hw/bsp/samd11/family.mk
index 6f89a2d66..327ec44c2 100644
--- a/hw/bsp/samd11/family.mk
+++ b/hw/bsp/samd11/family.mk
@@ -17,7 +17,7 @@ CFLAGS += -Wno-error=redundant-decls
# SAM driver is flooded with -Wcast-qual which slow down complication significantly
CFLAGS_SKIP += -Wcast-qual
-LDFLAGS_GCC += -specs=nosys.specs -specs=nano.specs
+LDFLAGS += -specs=nosys.specs -specs=nano.specs
SRC_C += \
src/portable/microchip/samd/dcd_samd.c \
diff --git a/hw/bsp/samd2x_l2x/family.mk b/hw/bsp/samd2x_l2x/family.mk
index dca440ddd..2ff01e8b7 100644
--- a/hw/bsp/samd2x_l2x/family.mk
+++ b/hw/bsp/samd2x_l2x/family.mk
@@ -39,7 +39,7 @@ CFLAGS += -Wno-error=redundant-decls
# SAM driver is flooded with -Wcast-qual which slow down complication significantly
CFLAGS_SKIP += -Wcast-qual
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostdlib -nostartfiles \
--specs=nosys.specs --specs=nano.specs \
diff --git a/hw/bsp/samd5x_e5x/family.mk b/hw/bsp/samd5x_e5x/family.mk
index f0a4a3f00..c544508dc 100644
--- a/hw/bsp/samd5x_e5x/family.mk
+++ b/hw/bsp/samd5x_e5x/family.mk
@@ -12,7 +12,7 @@ CFLAGS += \
# SAM driver is flooded with -Wcast-qual which slow down complication significantly
CFLAGS_SKIP += -Wcast-qual
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostdlib -nostartfiles \
--specs=nosys.specs --specs=nano.specs
diff --git a/hw/bsp/same7x/family.mk b/hw/bsp/same7x/family.mk
index 19e119625..02e940c5a 100644
--- a/hw/bsp/same7x/family.mk
+++ b/hw/bsp/same7x/family.mk
@@ -18,7 +18,7 @@ CFLAGS += -Wno-error=unused-parameter -Wno-error=cast-align -Wno-error=redundant
# SAM driver is flooded with -Wcast-qual which slows down compilation significantly
CFLAGS_SKIP += -Wcast-qual
-LDFLAGS_GCC += -specs=nosys.specs -specs=nano.specs
+LDFLAGS += -specs=nosys.specs -specs=nano.specs
# All source paths should be relative to the top level.
SRC_C += \
diff --git a/hw/bsp/samg/family.mk b/hw/bsp/samg/family.mk
index d5d2e6122..037ac4709 100644
--- a/hw/bsp/samg/family.mk
+++ b/hw/bsp/samg/family.mk
@@ -13,7 +13,7 @@ CFLAGS += -Wno-error=undef -Wno-error=null-dereference -Wno-error=redundant-decl
# SAM driver is flooded with -Wcast-qual which slow down complication significantly
CFLAGS_SKIP += -Wcast-qual
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostdlib -nostartfiles \
--specs=nosys.specs --specs=nano.specs \
diff --git a/hw/bsp/stm32c0/boards/stm32c071nucleo/board.mk b/hw/bsp/stm32c0/boards/stm32c071nucleo/board.mk
index fd22fc8d4..f2657e8c5 100644
--- a/hw/bsp/stm32c0/boards/stm32c071nucleo/board.mk
+++ b/hw/bsp/stm32c0/boards/stm32c071nucleo/board.mk
@@ -2,12 +2,9 @@ CFLAGS += \
-DSTM32C071xx
# GCC
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32c071xx.s
-LD_FILE_GCC = $(BOARD_PATH)/STM32C071RBTx_FLASH.ld
+SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32c071xx.s
+LD_FILE = $(BOARD_PATH)/STM32C071RBTx_FLASH.ld
-# IAR
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_stm32c071xx.s
-LD_FILE_IAR = $(BOARD_PATH)/stm32c071xx_flash.icf
# For flash-jlink target
JLINK_DEVICE = stm32c071rb
diff --git a/hw/bsp/stm32c0/family.mk b/hw/bsp/stm32c0/family.mk
index 71209bf2e..44ec2531e 100644
--- a/hw/bsp/stm32c0/family.mk
+++ b/hw/bsp/stm32c0/family.mk
@@ -13,13 +13,13 @@ CFLAGS += \
-DCFG_EXAMPLE_VIDEO_READONLY \
# GCC Flags
-CFLAGS_GCC += \
+CFLAGS += \
-flto \
# suppress warning caused by vendor mcu driver
-CFLAGS_GCC += -Wno-error=cast-align -Wno-error=unused-parameter
+CFLAGS += -Wno-error=cast-align -Wno-error=unused-parameter
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostdlib -nostartfiles \
--specs=nosys.specs --specs=nano.specs
diff --git a/hw/bsp/stm32f0/boards/stm32f070rbnucleo/board.mk b/hw/bsp/stm32f0/boards/stm32f070rbnucleo/board.mk
index 63f6a31c2..ea3cf34b4 100644
--- a/hw/bsp/stm32f0/boards/stm32f070rbnucleo/board.mk
+++ b/hw/bsp/stm32f0/boards/stm32f070rbnucleo/board.mk
@@ -3,7 +3,7 @@ MCU_VARIANT = stm32f070xb
CFLAGS += -DSTM32F070xB -DCFG_EXAMPLE_VIDEO_READONLY
# Linker
-LD_FILE_GCC = $(BOARD_PATH)/stm32F070rbtx_flash.ld
+LD_FILE = $(BOARD_PATH)/stm32F070rbtx_flash.ld
# For flash-jlink target
JLINK_DEVICE = stm32f070rb
diff --git a/hw/bsp/stm32f0/boards/stm32f072disco/board.mk b/hw/bsp/stm32f0/boards/stm32f072disco/board.mk
index 57c658629..e23af42e1 100644
--- a/hw/bsp/stm32f0/boards/stm32f072disco/board.mk
+++ b/hw/bsp/stm32f0/boards/stm32f072disco/board.mk
@@ -3,7 +3,7 @@ MCU_VARIANT = stm32f072xb
CFLAGS += -DSTM32F072xB -DCFG_EXAMPLE_VIDEO_READONLY
# Linker
-LD_FILE_GCC = $(BOARD_PATH)/STM32F072RBTx_FLASH.ld
+LD_FILE = $(BOARD_PATH)/STM32F072RBTx_FLASH.ld
# For flash-jlink target
JLINK_DEVICE = stm32f072rb
diff --git a/hw/bsp/stm32f0/boards/stm32f072eval/board.mk b/hw/bsp/stm32f0/boards/stm32f072eval/board.mk
index bab889524..fec26c7cc 100644
--- a/hw/bsp/stm32f0/boards/stm32f072eval/board.mk
+++ b/hw/bsp/stm32f0/boards/stm32f072eval/board.mk
@@ -3,7 +3,7 @@ MCU_VARIANT = stm32f072xb
CFLAGS += -DSTM32F072xB -DLSI_VALUE=40000 -DCFG_EXAMPLE_VIDEO_READONLY
# Linker
-LD_FILE_GCC = $(BOARD_PATH)/STM32F072VBTx_FLASH.ld
+LD_FILE = $(BOARD_PATH)/STM32F072VBTx_FLASH.ld
# For flash-jlink target
JLINK_DEVICE = stm32f072vb
diff --git a/hw/bsp/stm32f0/family.mk b/hw/bsp/stm32f0/family.mk
index b5efdcb8d..ac0c4fa14 100644
--- a/hw/bsp/stm32f0/family.mk
+++ b/hw/bsp/stm32f0/family.mk
@@ -14,13 +14,13 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_STM32F0
# GCC Flags
-CFLAGS_GCC += \
+CFLAGS += \
-flto \
# suppress warning caused by vendor mcu driver
-CFLAGS_GCC += -Wno-error=unused-parameter -Wno-error=cast-align
+CFLAGS += -Wno-error=unused-parameter -Wno-error=cast-align
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostdlib -nostartfiles \
--specs=nosys.specs --specs=nano.specs
@@ -48,8 +48,6 @@ INC += \
$(TOP)/$(ST_HAL_DRIVER)/Inc
# Startup
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_$(MCU_VARIANT).s
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_$(MCU_VARIANT).s
+SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_$(MCU_VARIANT).s
# Linker
-LD_FILE_IAR = $(ST_CMSIS)/Source/Templates/iar/linker/$(MCU_VARIANT)_flash.icf
diff --git a/hw/bsp/stm32f1/boards/stm32f103_bluepill/board.mk b/hw/bsp/stm32f1/boards/stm32f103_bluepill/board.mk
index 6c5f34501..745a2eb8f 100644
--- a/hw/bsp/stm32f1/boards/stm32f103_bluepill/board.mk
+++ b/hw/bsp/stm32f1/boards/stm32f103_bluepill/board.mk
@@ -3,8 +3,7 @@ MCU_VARIANT = stm32f103xb
CFLAGS += -DSTM32F103xB -DHSE_VALUE=8000000U -DCFG_EXAMPLE_VIDEO_READONLY
# Linker
-LD_FILE_GCC = $(BOARD_PATH)/STM32F103X8_FLASH.ld
-LD_FILE_IAR = $(BOARD_PATH)/stm32f103x8_flash.icf
+LD_FILE = $(BOARD_PATH)/STM32F103X8_FLASH.ld
# For flash-jlink target
JLINK_DEVICE = stm32f103c8
diff --git a/hw/bsp/stm32f1/boards/stm32f103_mini_2/board.mk b/hw/bsp/stm32f1/boards/stm32f103_mini_2/board.mk
index 7e95c1fe1..2d153dd81 100644
--- a/hw/bsp/stm32f1/boards/stm32f103_mini_2/board.mk
+++ b/hw/bsp/stm32f1/boards/stm32f103_mini_2/board.mk
@@ -3,8 +3,7 @@ MCU_VARIANT = stm32f103xb
CFLAGS += -DSTM32F103xB -DHSE_VALUE=8000000U
# Linker
-LD_FILE_GCC = $(BOARD_PATH)/STM32F103XC_FLASH.ld
-LD_FILE_IAR = $(BOARD_PATH)/stm32f103xc_flash.icf
+LD_FILE = $(BOARD_PATH)/STM32F103XC_FLASH.ld
# For flash-jlink target
JLINK_DEVICE = stm32f103rc
diff --git a/hw/bsp/stm32f1/boards/stm32f103ze_iar/board.mk b/hw/bsp/stm32f1/boards/stm32f103ze_iar/board.mk
index 5b17d8036..ca4efd357 100644
--- a/hw/bsp/stm32f1/boards/stm32f103ze_iar/board.mk
+++ b/hw/bsp/stm32f1/boards/stm32f103ze_iar/board.mk
@@ -3,8 +3,7 @@ MCU_VARIANT = stm32f103xe
CFLAGS += -DSTM32F103xE -DHSE_VALUE=8000000U
# Linker
-LD_FILE_GCC = ${ST_CMSIS}/Source/Templates/gcc/linker/STM32F103XE_FLASH.ld
-LD_FILE_IAR = ${ST_CMSIS}/Source/Templates/iar/linker/${MCU_VARIANT}_flash.icf
+LD_FILE = ${ST_CMSIS}/Source/Templates/gcc/linker/STM32F103XE_FLASH.ld
# For flash-jlink target
JLINK_DEVICE = stm32f103ze
diff --git a/hw/bsp/stm32f1/family.mk b/hw/bsp/stm32f1/family.mk
index ca022c7ec..a096fe17a 100644
--- a/hw/bsp/stm32f1/family.mk
+++ b/hw/bsp/stm32f1/family.mk
@@ -12,13 +12,13 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_STM32F1
# GCC Flags
-CFLAGS_GCC += \
+CFLAGS += \
-flto \
# mcu driver cause following warnings
-CFLAGS_GCC += -Wno-error=cast-align
+CFLAGS += -Wno-error=cast-align
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostdlib -nostartfiles \
-specs=nosys.specs -specs=nano.specs
@@ -44,8 +44,7 @@ INC += \
${TOP}/${ST_HAL_DRIVER}/Inc
# Startup
-SRC_S_GCC += ${ST_CMSIS}/Source/Templates/gcc/startup_${MCU_VARIANT}.s
-SRC_S_IAR += ${ST_CMSIS}/Source/Templates/iar/startup_${MCU_VARIANT}.s
+SRC_S += ${ST_CMSIS}/Source/Templates/gcc/startup_${MCU_VARIANT}.s
# flash target ROM bootloader: flash-dfu-util
DFU_UTIL_OPTION = -a 0 --dfuse-address 0x08000000
diff --git a/hw/bsp/stm32f2/family.mk b/hw/bsp/stm32f2/family.mk
index ef14a9d67..e5a44ebba 100644
--- a/hw/bsp/stm32f2/family.mk
+++ b/hw/bsp/stm32f2/family.mk
@@ -9,11 +9,11 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_STM32F2
# mcu driver cause following warnings
-CFLAGS_GCC += \
+CFLAGS += \
-flto \
-Wno-error=sign-compare
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostdlib -nostartfiles \
--specs=nosys.specs --specs=nano.specs
@@ -35,8 +35,6 @@ INC += \
$(TOP)/$(BOARD_PATH)
# Startup
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_${MCU_VARIANT}.s
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_${MCU_VARIANT}.s
+SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_${MCU_VARIANT}.s
# Linker
-LD_FILE_IAR ?= $(ST_CMSIS)/Source/Templates/iar/linker/${MCU_VARIANT}_flash.icf
diff --git a/hw/bsp/stm32f3/family.mk b/hw/bsp/stm32f3/family.mk
index eb4a4e186..ff7558b73 100644
--- a/hw/bsp/stm32f3/family.mk
+++ b/hw/bsp/stm32f3/family.mk
@@ -9,11 +9,11 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_STM32F3
# mcu driver cause following warnings
-CFLAGS_GCC += \
+CFLAGS += \
-flto \
-Wno-error=unused-parameter
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostdlib -nostartfiles \
--specs=nosys.specs --specs=nano.specs
@@ -34,8 +34,6 @@ INC += \
$(TOP)/$(BOARD_PATH)
# Startup
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_${MCU_VARIANT}.s
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_${MCU_VARIANT}.s
+SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_${MCU_VARIANT}.s
# Linker
-LD_FILE_IAR ?= $(ST_CMSIS)/Source/Templates/iar/linker/${MCU_VARIANT}_flash.icf
diff --git a/hw/bsp/stm32f4/boards/feather_stm32f405/board.mk b/hw/bsp/stm32f4/boards/feather_stm32f405/board.mk
index cfd1d8b3b..1b24940fc 100644
--- a/hw/bsp/stm32f4/boards/feather_stm32f405/board.mk
+++ b/hw/bsp/stm32f4/boards/feather_stm32f405/board.mk
@@ -1,12 +1,9 @@
CFLAGS += -DSTM32F405xx
# GCC
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f405xx.s
-LD_FILE_GCC = $(BOARD_PATH)/STM32F405RGTx_FLASH.ld
+SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f405xx.s
+LD_FILE = $(BOARD_PATH)/STM32F405RGTx_FLASH.ld
-# IAR
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_stm32f405xx.s
-LD_FILE_IAR = $(ST_CMSIS)/Source/Templates/iar/linker/stm32f405xx_flash.icf
# For flash-jlink target
JLINK_DEVICE = stm32f405rg
diff --git a/hw/bsp/stm32f4/boards/pyboardv11/board.mk b/hw/bsp/stm32f4/boards/pyboardv11/board.mk
index 4c52e004a..8aac5c4d7 100644
--- a/hw/bsp/stm32f4/boards/pyboardv11/board.mk
+++ b/hw/bsp/stm32f4/boards/pyboardv11/board.mk
@@ -1,12 +1,9 @@
CFLAGS += -DSTM32F405xx
# GCC
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f405xx.s
-LD_FILE_GCC = $(BOARD_PATH)/STM32F405RGTx_FLASH.ld
+SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f405xx.s
+LD_FILE = $(BOARD_PATH)/STM32F405RGTx_FLASH.ld
-# IAR
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_stm32f405xx.s
-LD_FILE_IAR = $(ST_CMSIS)/Source/Templates/iar/linker/stm32f405xx_flash.icf
# For flash-jlink target
JLINK_DEVICE = stm32f405rg
diff --git a/hw/bsp/stm32f4/boards/stm32f401blackpill/board.mk b/hw/bsp/stm32f4/boards/stm32f401blackpill/board.mk
index 3285bd232..e094cf012 100644
--- a/hw/bsp/stm32f4/boards/stm32f401blackpill/board.mk
+++ b/hw/bsp/stm32f4/boards/stm32f401blackpill/board.mk
@@ -1,12 +1,9 @@
CFLAGS += -DSTM32F401xC
# GCC
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f401xc.s
-LD_FILE_GCC = $(BOARD_PATH)/STM32F401VCTx_FLASH.ld
+SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f401xc.s
+LD_FILE = $(BOARD_PATH)/STM32F401VCTx_FLASH.ld
-# IAR
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_stm32f401xc.s
-LD_FILE_IAR = $(ST_CMSIS)/Source/Templates/iar/linker/stm32f401xc_flash.icf
# For flash-jlink target
JLINK_DEVICE = stm32f401cc
diff --git a/hw/bsp/stm32f4/boards/stm32f407blackvet/board.mk b/hw/bsp/stm32f4/boards/stm32f407blackvet/board.mk
index c46a78f81..db1719238 100644
--- a/hw/bsp/stm32f4/boards/stm32f407blackvet/board.mk
+++ b/hw/bsp/stm32f4/boards/stm32f407blackvet/board.mk
@@ -1,12 +1,9 @@
CFLAGS += -DSTM32F407xx
# GCC
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f407xx.s
-LD_FILE_GCC = $(BOARD_PATH)/STM32F407VETx_FLASH.ld
+SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f407xx.s
+LD_FILE = $(BOARD_PATH)/STM32F407VETx_FLASH.ld
-# IAR
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_stm32f407xx.s
-LD_FILE_IAR = $(ST_CMSIS)/Source/Templates/iar/linker/stm32f407xx_flash.icf
# For flash-jlink target
diff --git a/hw/bsp/stm32f4/boards/stm32f407disco/board.mk b/hw/bsp/stm32f4/boards/stm32f407disco/board.mk
index 4de656b0c..5faba55eb 100644
--- a/hw/bsp/stm32f4/boards/stm32f407disco/board.mk
+++ b/hw/bsp/stm32f4/boards/stm32f407disco/board.mk
@@ -1,12 +1,9 @@
CFLAGS += -DSTM32F407xx
# GCC
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f407xx.s
-LD_FILE_GCC = $(BOARD_PATH)/STM32F407VGTx_FLASH.ld
+SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f407xx.s
+LD_FILE = $(BOARD_PATH)/STM32F407VGTx_FLASH.ld
-# IAR
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_stm32f407xx.s
-LD_FILE_IAR = $(ST_CMSIS)/Source/Templates/iar/linker/stm32f407xx_flash.icf
# For flash-jlink target
diff --git a/hw/bsp/stm32f4/boards/stm32f411blackpill/board.mk b/hw/bsp/stm32f4/boards/stm32f411blackpill/board.mk
index c45aba79b..9ff7d0fe3 100644
--- a/hw/bsp/stm32f4/boards/stm32f411blackpill/board.mk
+++ b/hw/bsp/stm32f4/boards/stm32f411blackpill/board.mk
@@ -1,12 +1,9 @@
CFLAGS += -DSTM32F411xE -DHSE_VALUE=25000000
# GCC
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f411xe.s
-LD_FILE_GCC = $(BOARD_PATH)/STM32F411CEUx_FLASH.ld
+SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f411xe.s
+LD_FILE = $(BOARD_PATH)/STM32F411CEUx_FLASH.ld
-# IAR
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_stm32f411xe.s
-LD_FILE_IAR = $(ST_CMSIS)/Source/Templates/iar/linker/stm32f411xe_flash.icf
# For flash-jlink target
JLINK_DEVICE = stm32f411ce
diff --git a/hw/bsp/stm32f4/boards/stm32f411disco/board.mk b/hw/bsp/stm32f4/boards/stm32f411disco/board.mk
index 09fa50bd3..8e922e078 100644
--- a/hw/bsp/stm32f4/boards/stm32f411disco/board.mk
+++ b/hw/bsp/stm32f4/boards/stm32f411disco/board.mk
@@ -1,12 +1,9 @@
CFLAGS += -DSTM32F411xE
# GCC
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f411xe.s
-LD_FILE_GCC = $(BOARD_PATH)/STM32F411VETx_FLASH.ld
+SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f411xe.s
+LD_FILE = $(BOARD_PATH)/STM32F411VETx_FLASH.ld
-# IAR
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_stm32f411xe.s
-LD_FILE_IAR = $(ST_CMSIS)/Source/Templates/iar/linker/stm32f411xe_flash.icf
# For flash-jlink target
JLINK_DEVICE = stm32f411ve
diff --git a/hw/bsp/stm32f4/boards/stm32f412disco/board.mk b/hw/bsp/stm32f4/boards/stm32f412disco/board.mk
index f767ac6c4..e89d673e2 100644
--- a/hw/bsp/stm32f4/boards/stm32f412disco/board.mk
+++ b/hw/bsp/stm32f4/boards/stm32f412disco/board.mk
@@ -1,12 +1,9 @@
CFLAGS += -DSTM32F412Zx
# GCC
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f412zx.s
-LD_FILE_GCC = $(BOARD_PATH)/STM32F412ZGTx_FLASH.ld
+SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f412zx.s
+LD_FILE = $(BOARD_PATH)/STM32F412ZGTx_FLASH.ld
-# IAR
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_stm32f412zx.s
-LD_FILE_IAR = $(ST_CMSIS)/Source/Templates/iar/linker/stm32f412zx_flash.icf
# For flash-jlink target
JLINK_DEVICE = stm32f412zg
diff --git a/hw/bsp/stm32f4/boards/stm32f412nucleo/board.mk b/hw/bsp/stm32f4/boards/stm32f412nucleo/board.mk
index f767ac6c4..e89d673e2 100644
--- a/hw/bsp/stm32f4/boards/stm32f412nucleo/board.mk
+++ b/hw/bsp/stm32f4/boards/stm32f412nucleo/board.mk
@@ -1,12 +1,9 @@
CFLAGS += -DSTM32F412Zx
# GCC
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f412zx.s
-LD_FILE_GCC = $(BOARD_PATH)/STM32F412ZGTx_FLASH.ld
+SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f412zx.s
+LD_FILE = $(BOARD_PATH)/STM32F412ZGTx_FLASH.ld
-# IAR
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_stm32f412zx.s
-LD_FILE_IAR = $(ST_CMSIS)/Source/Templates/iar/linker/stm32f412zx_flash.icf
# For flash-jlink target
JLINK_DEVICE = stm32f412zg
diff --git a/hw/bsp/stm32f4/boards/stm32f439nucleo/board.mk b/hw/bsp/stm32f4/boards/stm32f439nucleo/board.mk
index 2ab32b7f3..97f4aac36 100644
--- a/hw/bsp/stm32f4/boards/stm32f439nucleo/board.mk
+++ b/hw/bsp/stm32f4/boards/stm32f439nucleo/board.mk
@@ -1,12 +1,9 @@
CFLAGS += -DSTM32F439xx
# GCC
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f439xx.s
-LD_FILE_GCC = $(BOARD_PATH)/STM32F439ZITX_FLASH.ld
+SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f439xx.s
+LD_FILE = $(BOARD_PATH)/STM32F439ZITX_FLASH.ld
-# IAR
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_stm32f439xx.s
-LD_FILE_IAR = $(ST_CMSIS)/Source/Templates/iar/linker/stm32f439xx_flash.icf
# For flash-jlink target
JLINK_DEVICE = stm32f439zi
diff --git a/hw/bsp/stm32f4/family.mk b/hw/bsp/stm32f4/family.mk
index f3e74ecea..f0f0731d9 100644
--- a/hw/bsp/stm32f4/family.mk
+++ b/hw/bsp/stm32f4/family.mk
@@ -43,13 +43,13 @@ CFLAGS += \
-DBOARD_TUH_MAX_SPEED=${RHPORT_HOST_SPEED} \
# GCC Flags
-CFLAGS_GCC += \
+CFLAGS += \
-flto \
# suppress warning caused by vendor mcu driver
-CFLAGS_GCC += -Wno-error=cast-align
+CFLAGS += -Wno-error=cast-align
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostdlib -nostartfiles \
--specs=nosys.specs --specs=nano.specs
diff --git a/hw/bsp/stm32f7/boards/stlinkv3mini/board.mk b/hw/bsp/stm32f7/boards/stlinkv3mini/board.mk
index a19e455c7..8082a29d6 100644
--- a/hw/bsp/stm32f7/boards/stlinkv3mini/board.mk
+++ b/hw/bsp/stm32f7/boards/stlinkv3mini/board.mk
@@ -13,7 +13,7 @@ CFLAGS += \
-DHSE_VALUE=25000000 \
# Linker
-LD_FILE_GCC = $(BOARD_PATH)/STM32F723xE_FLASH.ld
+LD_FILE = $(BOARD_PATH)/STM32F723xE_FLASH.ld
# flash target using on-board stlink
flash: flash-stlink
diff --git a/hw/bsp/stm32f7/boards/stm32f723disco/board.mk b/hw/bsp/stm32f7/boards/stm32f723disco/board.mk
index 9b8e7a969..b75192962 100644
--- a/hw/bsp/stm32f7/boards/stm32f723disco/board.mk
+++ b/hw/bsp/stm32f7/boards/stm32f723disco/board.mk
@@ -10,7 +10,7 @@ CFLAGS += \
-DHSE_VALUE=25000000 \
# Linker
-LD_FILE_GCC = $(BOARD_PATH)/STM32F723xE_FLASH.ld
+LD_FILE = $(BOARD_PATH)/STM32F723xE_FLASH.ld
# flash target using on-board stlink
flash: flash-stlink
diff --git a/hw/bsp/stm32f7/boards/stm32f746disco/board.mk b/hw/bsp/stm32f7/boards/stm32f746disco/board.mk
index c2b54406e..b652ffca4 100644
--- a/hw/bsp/stm32f7/boards/stm32f746disco/board.mk
+++ b/hw/bsp/stm32f7/boards/stm32f746disco/board.mk
@@ -12,7 +12,7 @@ CFLAGS += \
-DHSE_VALUE=25000000
# Linker
-LD_FILE_GCC = $(BOARD_PATH)/STM32F746ZGTx_FLASH.ld
+LD_FILE = $(BOARD_PATH)/STM32F746ZGTx_FLASH.ld
# flash target using on-board stlink
flash: flash-stlink
diff --git a/hw/bsp/stm32f7/boards/stm32f746nucleo/board.mk b/hw/bsp/stm32f7/boards/stm32f746nucleo/board.mk
index fe7104eca..21697a300 100644
--- a/hw/bsp/stm32f7/boards/stm32f746nucleo/board.mk
+++ b/hw/bsp/stm32f7/boards/stm32f746nucleo/board.mk
@@ -11,7 +11,7 @@ CFLAGS += \
-DHSE_VALUE=8000000
# Linker
-LD_FILE_GCC = $(BOARD_PATH)/STM32F746ZGTx_FLASH.ld
+LD_FILE = $(BOARD_PATH)/STM32F746ZGTx_FLASH.ld
# flash target using on-board stlink
flash: flash-stlink
diff --git a/hw/bsp/stm32f7/boards/stm32f767nucleo/board.mk b/hw/bsp/stm32f7/boards/stm32f767nucleo/board.mk
index d61e0a00d..9705297cf 100644
--- a/hw/bsp/stm32f7/boards/stm32f767nucleo/board.mk
+++ b/hw/bsp/stm32f7/boards/stm32f767nucleo/board.mk
@@ -11,7 +11,7 @@ CFLAGS += \
-DHSE_VALUE=8000000 \
# Linker
-LD_FILE_GCC = $(BOARD_PATH)/STM32F767ZITx_FLASH.ld
+LD_FILE = $(BOARD_PATH)/STM32F767ZITx_FLASH.ld
# For flash-jlink target
JLINK_DEVICE = stm32f767zi
diff --git a/hw/bsp/stm32f7/boards/stm32f769disco/board.mk b/hw/bsp/stm32f7/boards/stm32f769disco/board.mk
index e756c9727..e2566e989 100644
--- a/hw/bsp/stm32f7/boards/stm32f769disco/board.mk
+++ b/hw/bsp/stm32f7/boards/stm32f769disco/board.mk
@@ -13,7 +13,7 @@ CFLAGS += \
-DHSE_VALUE=25000000 \
# Linker
-LD_FILE_GCC = $(BOARD_PATH)/STM32F769ZITx_FLASH.ld
+LD_FILE = $(BOARD_PATH)/STM32F769ZITx_FLASH.ld
JLINK_DEVICE = stm32f769ni
diff --git a/hw/bsp/stm32f7/family.mk b/hw/bsp/stm32f7/family.mk
index d3422e03c..ecda4caf4 100644
--- a/hw/bsp/stm32f7/family.mk
+++ b/hw/bsp/stm32f7/family.mk
@@ -56,13 +56,13 @@ CFLAGS += \
#endif
# GCC Flags
-CFLAGS_GCC += \
+CFLAGS += \
-flto \
# mcu driver cause following warnings
-CFLAGS_GCC += -Wno-error=cast-align
+CFLAGS += -Wno-error=cast-align
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostdlib -nostartfiles \
--specs=nosys.specs --specs=nano.specs
@@ -91,8 +91,6 @@ INC += \
$(TOP)/$(ST_HAL_DRIVER)/Inc
# Startup
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_$(MCU_VARIANT).s
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_$(MCU_VARIANT).s
+SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_$(MCU_VARIANT).s
# Linker
-LD_FILE_IAR = $(ST_CMSIS)/Source/Templates/iar/linker/$(MCU_VARIANT)_flash.icf
diff --git a/hw/bsp/stm32g0/boards/stm32g0b1nucleo/board.mk b/hw/bsp/stm32g0/boards/stm32g0b1nucleo/board.mk
index 6a6078d5f..9b9128e44 100644
--- a/hw/bsp/stm32g0/boards/stm32g0b1nucleo/board.mk
+++ b/hw/bsp/stm32g0/boards/stm32g0b1nucleo/board.mk
@@ -2,12 +2,9 @@ CFLAGS += \
-DSTM32G0B1xx
# GCC
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32g0b1xx.s
-LD_FILE_GCC = $(BOARD_PATH)/STM32G0B1RETx_FLASH.ld
+SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32g0b1xx.s
+LD_FILE = $(BOARD_PATH)/STM32G0B1RETx_FLASH.ld
-# IAR
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_stm32g0b1xx.s
-LD_FILE_IAR = $(ST_CMSIS)/Source/Templates/iar/linker/stm32g0b1xx_flash.icf
# For flash-jlink target
JLINK_DEVICE = stm32g0b1re
diff --git a/hw/bsp/stm32g0/family.mk b/hw/bsp/stm32g0/family.mk
index e376f7f06..85ae38e37 100644
--- a/hw/bsp/stm32g0/family.mk
+++ b/hw/bsp/stm32g0/family.mk
@@ -13,13 +13,13 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_STM32G0
# GCC Flags
-CFLAGS_GCC += \
+CFLAGS += \
-flto \
# suppress warning caused by vendor mcu driver
-CFLAGS_GCC += -Wno-error=cast-align
+CFLAGS += -Wno-error=cast-align
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostdlib -nostartfiles \
--specs=nosys.specs --specs=nano.specs
diff --git a/hw/bsp/stm32g4/boards/b_g474e_dpow1/board.mk b/hw/bsp/stm32g4/boards/b_g474e_dpow1/board.mk
index 6266b3ccc..a2b4dddf9 100644
--- a/hw/bsp/stm32g4/boards/b_g474e_dpow1/board.mk
+++ b/hw/bsp/stm32g4/boards/b_g474e_dpow1/board.mk
@@ -4,7 +4,7 @@ CFLAGS += \
-DSTM32G474xx \
# Linker
-LD_FILE_GCC = $(BOARD_PATH)/STM32G474RETx_FLASH.ld
+LD_FILE = $(BOARD_PATH)/STM32G474RETx_FLASH.ld
# For flash-jlink target
JLINK_DEVICE = stm32g474re
diff --git a/hw/bsp/stm32g4/boards/stm32g474nucleo/board.mk b/hw/bsp/stm32g4/boards/stm32g474nucleo/board.mk
index dc46af1d1..77178d2bc 100644
--- a/hw/bsp/stm32g4/boards/stm32g474nucleo/board.mk
+++ b/hw/bsp/stm32g4/boards/stm32g474nucleo/board.mk
@@ -5,7 +5,7 @@ CFLAGS += \
-DHSE_VALUE=24000000
# Linker
-LD_FILE_GCC = $(BOARD_PATH)/STM32G474RETx_FLASH.ld
+LD_FILE = $(BOARD_PATH)/STM32G474RETx_FLASH.ld
# For flash-jlink target
JLINK_DEVICE = stm32g474re
diff --git a/hw/bsp/stm32g4/boards/stm32g491nucleo/board.mk b/hw/bsp/stm32g4/boards/stm32g491nucleo/board.mk
index c0f876331..0ef3642dd 100644
--- a/hw/bsp/stm32g4/boards/stm32g491nucleo/board.mk
+++ b/hw/bsp/stm32g4/boards/stm32g491nucleo/board.mk
@@ -5,7 +5,7 @@ CFLAGS += \
-DHSE_VALUE=24000000
# Linker
-LD_FILE_GCC = $(BOARD_PATH)/STM32G491RETX_FLASH.ld
+LD_FILE = $(BOARD_PATH)/STM32G491RETX_FLASH.ld
# For flash-jlink target
JLINK_DEVICE = stm32g491re
diff --git a/hw/bsp/stm32g4/family.mk b/hw/bsp/stm32g4/family.mk
index a153194ce..1882af43b 100644
--- a/hw/bsp/stm32g4/family.mk
+++ b/hw/bsp/stm32g4/family.mk
@@ -13,13 +13,13 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_STM32G4
# GCC Flags
-CFLAGS_GCC += \
+CFLAGS += \
-flto \
# suppress warning caused by vendor mcu driver
-CFLAGS_GCC += -Wno-error=cast-align
+CFLAGS += -Wno-error=cast-align
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostdlib -nostartfiles \
--specs=nosys.specs --specs=nano.specs
@@ -48,11 +48,9 @@ INC += \
$(TOP)/$(ST_HAL_DRIVER)/Inc
# Startup
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_$(MCU_VARIANT).s
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_$(MCU_VARIANT).s
+SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_$(MCU_VARIANT).s
# Linker
-LD_FILE_IAR = $(ST_CMSIS)/Source/Templates/iar/linker/$(MCU_VARIANT)_flash.icf
# flash target using on-board stlink
flash: flash-stlink
diff --git a/hw/bsp/stm32h5/family.mk b/hw/bsp/stm32h5/family.mk
index e34bb513e..6f76872bc 100644
--- a/hw/bsp/stm32h5/family.mk
+++ b/hw/bsp/stm32h5/family.mk
@@ -15,11 +15,11 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_STM32H5
# GCC Flags
-CFLAGS_GCC += \
+CFLAGS += \
-flto \
# suppress warning caused by vendor mcu driver
-CFLAGS_GCC += \
+CFLAGS += \
-Wno-error=cast-align \
-Wno-error=undef \
-Wno-error=unused-parameter \
@@ -27,7 +27,7 @@ CFLAGS_GCC += \
CFLAGS_CLANG += \
-Wno-error=parentheses-equality
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostdlib -nostartfiles \
--specs=nosys.specs --specs=nano.specs
@@ -59,12 +59,10 @@ INC += \
$(TOP)/$(ST_HAL_DRIVER)/Inc
# Startup
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_$(MCU_VARIANT).s
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_$(MCU_VARIANT).s
+SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_$(MCU_VARIANT).s
# Linker
-LD_FILE_IAR = $(ST_CMSIS)/Source/Templates/iar/linker/$(MCU_VARIANT)_flash.icf
-LD_FILE_GCC = $(FAMILY_PATH)/linker/$(MCU_VARIANT_UPPER)_FLASH.ld
+LD_FILE = $(FAMILY_PATH)/linker/$(MCU_VARIANT_UPPER)_FLASH.ld
# flash target using on-board stlink
flash: flash-stlink
diff --git a/hw/bsp/stm32h7/boards/daisyseed/board.mk b/hw/bsp/stm32h7/boards/daisyseed/board.mk
index bb254cfc2..5898b4b12 100644
--- a/hw/bsp/stm32h7/boards/daisyseed/board.mk
+++ b/hw/bsp/stm32h7/boards/daisyseed/board.mk
@@ -1,7 +1,7 @@
MCU_VARIANT = stm32h750xx
CFLAGS += -DSTM32H750xx -DCORE_CM7 -DHSE_VALUE=16000000
-LD_FILE_GCC = $(BOARD_PATH)/stm32h750ibkx_flash.ld
+LD_FILE = $(BOARD_PATH)/stm32h750ibkx_flash.ld
# For flash-jlink target
JLINK_DEVICE = stm32h750ibk6_m7
diff --git a/hw/bsp/stm32h7/boards/stm32h723nucleo/board.mk b/hw/bsp/stm32h7/boards/stm32h723nucleo/board.mk
index c1a98a025..79b521e2a 100644
--- a/hw/bsp/stm32h7/boards/stm32h723nucleo/board.mk
+++ b/hw/bsp/stm32h7/boards/stm32h723nucleo/board.mk
@@ -1,7 +1,7 @@
MCU_VARIANT = stm32h723xx
CFLAGS += -DSTM32H723xx -DHSE_VALUE=8000000
-LD_FILE_GCC = $(FAMILY_PATH)/linker/${MCU_VARIANT}_flash.ld
+LD_FILE = $(FAMILY_PATH)/linker/${MCU_VARIANT}_flash.ld
# For flash-jlink target
JLINK_DEVICE = stm32h723zg
diff --git a/hw/bsp/stm32h7/boards/stm32h743eval/board.mk b/hw/bsp/stm32h7/boards/stm32h743eval/board.mk
index 67b403932..8f27f6460 100644
--- a/hw/bsp/stm32h7/boards/stm32h743eval/board.mk
+++ b/hw/bsp/stm32h7/boards/stm32h743eval/board.mk
@@ -5,7 +5,7 @@ RHPORT_SPEED = OPT_MODE_FULL_SPEED OPT_MODE_HIGH_SPEED
RHPORT_DEVICE ?= 1
RHPORT_HOST ?= 0
-LD_FILE_GCC = $(FAMILY_PATH)/linker/${MCU_VARIANT}_flash.ld
+LD_FILE = $(FAMILY_PATH)/linker/${MCU_VARIANT}_flash.ld
SRC_C += \
${ST_MFXSTM32L152}/mfxstm32l152.c \
diff --git a/hw/bsp/stm32h7/boards/stm32h743nucleo/board.mk b/hw/bsp/stm32h7/boards/stm32h743nucleo/board.mk
index d904de6d2..269137e61 100644
--- a/hw/bsp/stm32h7/boards/stm32h743nucleo/board.mk
+++ b/hw/bsp/stm32h7/boards/stm32h743nucleo/board.mk
@@ -1,7 +1,7 @@
MCU_VARIANT = stm32h743xx
CFLAGS += -DSTM32H743xx -DHSE_VALUE=8000000
-LD_FILE_GCC = $(FAMILY_PATH)/linker/${MCU_VARIANT}_flash.ld
+LD_FILE = $(FAMILY_PATH)/linker/${MCU_VARIANT}_flash.ld
# For flash-jlink target
JLINK_DEVICE = stm32h743zi
diff --git a/hw/bsp/stm32h7/boards/stm32h745disco/board.mk b/hw/bsp/stm32h7/boards/stm32h745disco/board.mk
index 64003f5a9..79387f26a 100644
--- a/hw/bsp/stm32h7/boards/stm32h745disco/board.mk
+++ b/hw/bsp/stm32h7/boards/stm32h745disco/board.mk
@@ -6,8 +6,7 @@ CFLAGS += -DSTM32H745xx -DCORE_CM7 -DHSE_VALUE=25000000
# Default is FulSpeed port
PORT ?= 0
-LD_FILE_GCC = $(FAMILY_PATH)/linker/${MCU_VARIANT}_flash_CM7.ld
-LD_FILE_IAR = $(ST_CMSIS)/Source/Templates/iar/linker/stm32h745xx_flash_CM7.icf
+LD_FILE = $(FAMILY_PATH)/linker/${MCU_VARIANT}_flash_CM7.ld
# For flash-jlink target
JLINK_DEVICE = stm32h745xi_m7
diff --git a/hw/bsp/stm32h7/boards/stm32h747disco/board.mk b/hw/bsp/stm32h7/boards/stm32h747disco/board.mk
index 4b17246e2..4fb7cfd48 100644
--- a/hw/bsp/stm32h7/boards/stm32h747disco/board.mk
+++ b/hw/bsp/stm32h7/boards/stm32h747disco/board.mk
@@ -6,8 +6,7 @@ CFLAGS += -DSTM32H747xx -DCORE_CM7 -DHSE_VALUE=25000000
# Default is FulSpeed port
PORT ?= 0
-LD_FILE_GCC = $(FAMILY_PATH)/linker/${MCU_VARIANT}_flash_CM7.ld
-LD_FILE_IAR = $(ST_CMSIS)/Source/Templates/iar/linker/stm32h747xx_flash_CM7.icf
+LD_FILE = $(FAMILY_PATH)/linker/${MCU_VARIANT}_flash_CM7.ld
# For flash-jlink target
JLINK_DEVICE = stm32h747xi_m7
diff --git a/hw/bsp/stm32h7/boards/stm32h750_weact/board.mk b/hw/bsp/stm32h7/boards/stm32h750_weact/board.mk
index 988fed804..87c81cb63 100644
--- a/hw/bsp/stm32h7/boards/stm32h750_weact/board.mk
+++ b/hw/bsp/stm32h7/boards/stm32h750_weact/board.mk
@@ -3,7 +3,7 @@
MCU_VARIANT = stm32h750xx
CFLAGS += -DSTM32H750xx -DCORE_CM7 -DHSE_VALUE=25000000
-LD_FILE_GCC = $(BOARD_PATH)/stm32h750xx_flash_CM7.ld
+LD_FILE = $(BOARD_PATH)/stm32h750xx_flash_CM7.ld
# For flash-jlink target
JLINK_DEVICE = stm32h750vb
diff --git a/hw/bsp/stm32h7/boards/stm32h750bdk/board.mk b/hw/bsp/stm32h7/boards/stm32h750bdk/board.mk
index 6eb3eb498..dec138f92 100644
--- a/hw/bsp/stm32h7/boards/stm32h750bdk/board.mk
+++ b/hw/bsp/stm32h7/boards/stm32h750bdk/board.mk
@@ -3,7 +3,7 @@
MCU_VARIANT = stm32h750xx
CFLAGS += -DSTM32H750xx -DCORE_CM7 -DHSE_VALUE=25000000
-LD_FILE_GCC = $(BOARD_PATH)/stm32h750xx_flash_CM7.ld
+LD_FILE = $(BOARD_PATH)/stm32h750xx_flash_CM7.ld
# For flash-jlink target
JLINK_DEVICE = stm32h750xb
diff --git a/hw/bsp/stm32h7/boards/waveshare_openh743i/board.mk b/hw/bsp/stm32h7/boards/waveshare_openh743i/board.mk
index 5ff2f4165..65c1fff09 100644
--- a/hw/bsp/stm32h7/boards/waveshare_openh743i/board.mk
+++ b/hw/bsp/stm32h7/boards/waveshare_openh743i/board.mk
@@ -5,7 +5,7 @@ RHPORT_SPEED = OPT_MODE_FULL_SPEED OPT_MODE_HIGH_SPEED
RHPORT_DEVICE ?= 1
RHPORT_HOST ?= 0
-LD_FILE_GCC = $(FAMILY_PATH)/linker/stm32h743xx_flash.ld
+LD_FILE = $(FAMILY_PATH)/linker/stm32h743xx_flash.ld
# Use Timer module for ULPI PHY reset
CFLAGS += -DHAL_TIM_MODULE_ENABLED
diff --git a/hw/bsp/stm32h7/family.mk b/hw/bsp/stm32h7/family.mk
index 19a085424..3978b2eb0 100644
--- a/hw/bsp/stm32h7/family.mk
+++ b/hw/bsp/stm32h7/family.mk
@@ -46,12 +46,12 @@ CFLAGS += \
# GCC Flags
# suppress warning caused by vendor mcu driver
-CFLAGS_GCC += \
+CFLAGS += \
-flto \
-Wno-error=cast-align \
-Wno-error=unused-parameter \
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostdlib -nostartfiles \
--specs=nosys.specs --specs=nano.specs
@@ -84,8 +84,6 @@ INC += \
$(TOP)/$(ST_HAL_DRIVER)/Inc
# Startup
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_$(MCU_VARIANT).s
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_$(MCU_VARIANT).s
+SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_$(MCU_VARIANT).s
# Linker
-LD_FILE_IAR ?= $(ST_CMSIS)/Source/Templates/iar/linker/$(MCU_VARIANT)_flash.icf
diff --git a/hw/bsp/stm32h7rs/family.mk b/hw/bsp/stm32h7rs/family.mk
index 7082cc900..d1336a773 100644
--- a/hw/bsp/stm32h7rs/family.mk
+++ b/hw/bsp/stm32h7rs/family.mk
@@ -47,15 +47,15 @@ CFLAGS += \
-DBUFFER_SIZE_UP=0x300 \
# GCC Flags
-CFLAGS_GCC += \
+CFLAGS += \
-flto \
# suppress warning caused by vendor mcu driver
-CFLAGS_GCC += \
+CFLAGS += \
-Wno-error=cast-align \
-Wno-error=unused-parameter \
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostdlib -nostartfiles \
--specs=nosys.specs --specs=nano.specs
@@ -87,9 +87,7 @@ INC += \
$(TOP)/$(ST_HAL_DRIVER)/Inc
# Startup
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_$(MCU_VARIANT).s
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_$(MCU_VARIANT).s
+SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_$(MCU_VARIANT).s
# Linker
-LD_FILE_GCC ?= $(FAMILY_PATH)/linker/$(MCU_VARIANT)_flash.ld
-LD_FILE_IAR ?= $(ST_CMSIS)/Source/Templates/iar/linker/$(MCU_VARIANT)_flash.icf
+LD_FILE ?= $(FAMILY_PATH)/linker/$(MCU_VARIANT)_flash.ld
diff --git a/hw/bsp/stm32l0/family.mk b/hw/bsp/stm32l0/family.mk
index 0ae881fdf..b72e077f3 100644
--- a/hw/bsp/stm32l0/family.mk
+++ b/hw/bsp/stm32l0/family.mk
@@ -11,7 +11,7 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_STM32L0
# mcu driver cause following warnings
-CFLAGS_GCC += \
+CFLAGS += \
-flto \
-Wno-error=unused-parameter \
-Wno-error=redundant-decls \
@@ -21,7 +21,7 @@ CFLAGS_GCC += \
CFLAGS_CLANG += \
-Wno-error=parentheses-equality
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostdlib -nostartfiles \
--specs=nosys.specs --specs=nano.specs
@@ -43,8 +43,6 @@ INC += \
$(TOP)/$(ST_HAL_DRIVER)/Inc
# Startup
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_${MCU_VARIANT}.s
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_${MCU_VARIANT}.s
+SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_${MCU_VARIANT}.s
# Linker
-LD_FILE_IAR ?= $(ST_CMSIS)/Source/Templates/iar/linker/$(MCU_VARIANT)_flash.icf
diff --git a/hw/bsp/stm32l4/boards/stm32l412nucleo/board.mk b/hw/bsp/stm32l4/boards/stm32l412nucleo/board.mk
index 87b333500..c9b2ab9fa 100644
--- a/hw/bsp/stm32l4/boards/stm32l412nucleo/board.mk
+++ b/hw/bsp/stm32l4/boards/stm32l412nucleo/board.mk
@@ -2,12 +2,9 @@ CFLAGS += \
-DSTM32L412xx \
# GCC
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32l412xx.s
-LD_FILE_GCC = $(BOARD_PATH)/STM32L412KBUx_FLASH.ld
+SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32l412xx.s
+LD_FILE = $(BOARD_PATH)/STM32L412KBUx_FLASH.ld
-# IAR
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_stm32l412xx.s
-LD_FILE_IAR = $(ST_CMSIS)/Source/Templates/iar/linker/stm32l412xx_flash.icf
# For flash-jlink target
JLINK_DEVICE = stm32l412kb
diff --git a/hw/bsp/stm32l4/boards/stm32l476disco/board.mk b/hw/bsp/stm32l4/boards/stm32l476disco/board.mk
index 3ba9ab444..23f0966ee 100644
--- a/hw/bsp/stm32l4/boards/stm32l476disco/board.mk
+++ b/hw/bsp/stm32l4/boards/stm32l476disco/board.mk
@@ -2,12 +2,9 @@ CFLAGS += \
-DSTM32L476xx \
# GCC
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32l476xx.s
-LD_FILE_GCC = $(BOARD_PATH)/STM32L476VGTx_FLASH.ld
+SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32l476xx.s
+LD_FILE = $(BOARD_PATH)/STM32L476VGTx_FLASH.ld
-# IAR
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_stm32l476xx.s
-LD_FILE_IAR = $(ST_CMSIS)/Source/Templates/iar/linker/stm32l476xx_flash.icf
# For flash-jlink target
JLINK_DEVICE = stm32l476vg
diff --git a/hw/bsp/stm32l4/boards/stm32l496nucleo/board.mk b/hw/bsp/stm32l4/boards/stm32l496nucleo/board.mk
index bc0a63c1c..21666b026 100644
--- a/hw/bsp/stm32l4/boards/stm32l496nucleo/board.mk
+++ b/hw/bsp/stm32l4/boards/stm32l496nucleo/board.mk
@@ -2,12 +2,9 @@ CFLAGS += \
-DSTM32L496xx \
# GCC
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32l496xx.s
-LD_FILE_GCC = $(BOARD_PATH)/STM32L496ZGTX_FLASH.ld
+SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32l496xx.s
+LD_FILE = $(BOARD_PATH)/STM32L496ZGTX_FLASH.ld
-# IAR
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_stm32l496xx.s
-LD_FILE_IAR = $(ST_CMSIS)/Source/Templates/iar/linker/stm32l496xx_flash.icf
# For flash-jlink target
JLINK_DEVICE = stm32l496zg
diff --git a/hw/bsp/stm32l4/boards/stm32l4p5nucleo/board.mk b/hw/bsp/stm32l4/boards/stm32l4p5nucleo/board.mk
index 84f831878..09357ff4f 100644
--- a/hw/bsp/stm32l4/boards/stm32l4p5nucleo/board.mk
+++ b/hw/bsp/stm32l4/boards/stm32l4p5nucleo/board.mk
@@ -2,12 +2,9 @@ CFLAGS += \
-DSTM32L4P5xx \
# GCC
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32l4p5xx.s
-LD_FILE_GCC = $(BOARD_PATH)/STM32L4P5ZGTX_FLASH.ld
+SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32l4p5xx.s
+LD_FILE = $(BOARD_PATH)/STM32L4P5ZGTX_FLASH.ld
-# IAR
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_stm32l4p5xx.s
-LD_FILE_IAR = $(ST_CMSIS)/Source/Templates/iar/linker/stm32l4p5xx_flash.icf
# For flash-jlink target
JLINK_DEVICE = stm32l4p5zg
diff --git a/hw/bsp/stm32l4/boards/stm32l4r5nucleo/board.mk b/hw/bsp/stm32l4/boards/stm32l4r5nucleo/board.mk
index ad5bfba38..e811a6e53 100644
--- a/hw/bsp/stm32l4/boards/stm32l4r5nucleo/board.mk
+++ b/hw/bsp/stm32l4/boards/stm32l4r5nucleo/board.mk
@@ -3,12 +3,9 @@ CFLAGS += \
-DSTM32L4R5xx \
# GCC
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32l4r5xx.s
-LD_FILE_GCC = $(BOARD_PATH)/STM32L4RXxI_FLASH.ld
+SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32l4r5xx.s
+LD_FILE = $(BOARD_PATH)/STM32L4RXxI_FLASH.ld
-# IAR
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_stm32l4r5xx.s
-LD_FILE_IAR = $(ST_CMSIS)/Source/Templates/iar/linker/stm32l4r5xx_flash.icf
# For flash-jlink target
JLINK_DEVICE = stm32l4r5zi
diff --git a/hw/bsp/stm32l4/family.mk b/hw/bsp/stm32l4/family.mk
index fd11fd226..b45884989 100644
--- a/hw/bsp/stm32l4/family.mk
+++ b/hw/bsp/stm32l4/family.mk
@@ -13,15 +13,15 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_STM32L4
# GCC Flags
-CFLAGS_GCC += \
+CFLAGS += \
-flto \
-Wno-error=cast-align \
ifeq ($(TOOLCHAIN),gcc)
-CFLAGS_GCC += -Wno-error=maybe-uninitialized
+CFLAGS += -Wno-error=maybe-uninitialized
endif
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostdlib -nostartfiles \
--specs=nosys.specs --specs=nano.specs
diff --git a/hw/bsp/stm32n6/boards/stm32n6570dk/board.mk b/hw/bsp/stm32n6/boards/stm32n6570dk/board.mk
index 05717699c..524ba0ca0 100644
--- a/hw/bsp/stm32n6/boards/stm32n6570dk/board.mk
+++ b/hw/bsp/stm32n6/boards/stm32n6570dk/board.mk
@@ -2,7 +2,7 @@ MCU_VARIANT = stm32n657xx
CFLAGS += -DSTM32N657xx
JLINK_DEVICE = stm32n6xx
-LD_FILE_GCC = $(BOARD_PATH)/STM32N657XX_AXISRAM2_fsbl.ld
+LD_FILE = $(BOARD_PATH)/STM32N657XX_AXISRAM2_fsbl.ld
# flash target using on-board stlink
flash: flash-stlink
diff --git a/hw/bsp/stm32n6/boards/stm32n657nucleo/board.mk b/hw/bsp/stm32n6/boards/stm32n657nucleo/board.mk
index efbb82611..d488f555e 100644
--- a/hw/bsp/stm32n6/boards/stm32n657nucleo/board.mk
+++ b/hw/bsp/stm32n6/boards/stm32n657nucleo/board.mk
@@ -2,7 +2,7 @@ MCU_VARIANT = stm32n657xx
CFLAGS += -DSTM32N657xx
JLINK_DEVICE = stm32n657x0
-LD_FILE_GCC = $(BOARD_PATH)/STM32N657XX_AXISRAM2_fsbl.ld
+LD_FILE = $(BOARD_PATH)/STM32N657XX_AXISRAM2_fsbl.ld
RHPORT_DEVICE ?= 0
RHPORT_HOST ?= 0
diff --git a/hw/bsp/stm32n6/family.mk b/hw/bsp/stm32n6/family.mk
index 9fef533b1..408867153 100644
--- a/hw/bsp/stm32n6/family.mk
+++ b/hw/bsp/stm32n6/family.mk
@@ -36,15 +36,15 @@ CFLAGS += \
-DBUFFER_SIZE_UP=0x4000 \
# GCC Flags
-CFLAGS_GCC += \
+CFLAGS += \
-flto \
# suppress warning caused by vendor mcu driver
-CFLAGS_GCC += \
+CFLAGS += \
-Wno-error=cast-align \
-Wno-error=unused-parameter \
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostdlib -nostartfiles \
--specs=nosys.specs --specs=nano.specs
@@ -81,9 +81,7 @@ INC += \
$(TOP)/$(ST_HAL_DRIVER)/Inc
# Startup
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_$(MCU_VARIANT)_fsbl.s
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_$(MCU_VARIANT).s
+SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_$(MCU_VARIANT)_fsbl.s
# Linker
-LD_FILE_GCC ?= $(ST_CMSIS)/Source/Templates/gcc/linker/$(MCU_VARIANT)_flash.ld
-LD_FILE_IAR ?= $(ST_CMSIS)/Source/Templates/iar/linker/$(MCU_VARIANT)_flash.icf
+LD_FILE ?= $(ST_CMSIS)/Source/Templates/gcc/linker/$(MCU_VARIANT)_flash.ld
diff --git a/hw/bsp/stm32u0/family.mk b/hw/bsp/stm32u0/family.mk
index 9119f3652..4ced248bc 100644
--- a/hw/bsp/stm32u0/family.mk
+++ b/hw/bsp/stm32u0/family.mk
@@ -11,7 +11,7 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_STM32U0
# mcu driver cause following warnings
-CFLAGS_GCC += \
+CFLAGS += \
-flto \
-Wno-error=unused-parameter \
-Wno-error=redundant-decls \
@@ -21,7 +21,7 @@ CFLAGS_GCC += \
CFLAGS_CLANG += \
-Wno-error=parentheses-equality
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostdlib -nostartfiles \
--specs=nosys.specs --specs=nano.specs
@@ -45,10 +45,8 @@ INC += \
$(TOP)/$(ST_HAL_DRIVER)/Inc
# Startup
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_${MCU_VARIANT}.s
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_${MCU_VARIANT}.s
+SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_${MCU_VARIANT}.s
# Linker
MCU_VARIANT_UPPER = $(subst stm32u,STM32U,$(MCU_VARIANT))
LD_FILE ?= $(FAMILY_PATH)/linker/$(MCU_VARIANT_UPPER)_FLASH.ld
-LD_FILE_IAR ?= $(ST_CMSIS)/Source/Templates/iar/linker/$(MCU_VARIANT)_flash.icf
diff --git a/hw/bsp/stm32u5/family.mk b/hw/bsp/stm32u5/family.mk
index 90796836b..e7bc4f299 100644
--- a/hw/bsp/stm32u5/family.mk
+++ b/hw/bsp/stm32u5/family.mk
@@ -10,7 +10,7 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_STM32U5
# suppress warning caused by vendor mcu driver
-CFLAGS_GCC += \
+CFLAGS += \
-flto \
-Wno-error=cast-align \
-Wno-error=undef \
@@ -19,10 +19,10 @@ CFLAGS_GCC += \
-Wno-self-assign \
ifeq ($(TOOLCHAIN),gcc)
-CFLAGS_GCC += -Wno-error=maybe-uninitialized
+CFLAGS += -Wno-error=maybe-uninitialized
endif
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostdlib -nostartfiles \
--specs=nosys.specs --specs=nano.specs
@@ -61,11 +61,9 @@ INC += \
$(TOP)/$(BOARD_PATH)
# Startup
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_$(MCU_VARIANT).s
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_$(MCU_VARIANT).s
+SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_$(MCU_VARIANT).s
# Linker
-LD_FILE_IAR ?= $(ST_CMSIS)/Source/Templates/iar/linker/$(MCU_VARIANT)_flash.icf
# flash target using on-board stlink
flash: flash-stlink
diff --git a/hw/bsp/stm32wb/family.mk b/hw/bsp/stm32wb/family.mk
index 9397be62d..6123a65de 100644
--- a/hw/bsp/stm32wb/family.mk
+++ b/hw/bsp/stm32wb/family.mk
@@ -11,12 +11,12 @@ CPU_CORE ?= cortex-m4
CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_STM32WB
-CFLAGS_GCC += \
+CFLAGS += \
-flto \
-nostdlib -nostartfiles \
-Wno-error=cast-align -Wno-unused-parameter
-LDFLAGS_GCC += -specs=nosys.specs -specs=nano.specs
+LDFLAGS += -specs=nosys.specs -specs=nano.specs
SRC_C += \
src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c \
@@ -39,12 +39,10 @@ INC += \
$(TOP)/$(ST_HAL_DRIVER)/Inc
# Startup
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_$(MCU_VARIANT)_cm4.s
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_$(MCU_VARIANT)_cm4.s
+SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_$(MCU_VARIANT)_cm4.s
# Linker
-LD_FILE_GCC ?= ${ST_CMSIS}/Source/Templates/gcc/linker/${MCU_VARIANT}_flash_cm4.ld
-LD_FILE_IAR ?= $(ST_CMSIS)/Source/Templates/iar/linker/$(MCU_VARIANT)_flash_cm4.icf
+LD_FILE ?= ${ST_CMSIS}/Source/Templates/gcc/linker/${MCU_VARIANT}_flash_cm4.ld
# flash target using on-board stlink
flash: flash-stlink
diff --git a/hw/bsp/stm32wba/family.mk b/hw/bsp/stm32wba/family.mk
index 0a325323b..30848ac89 100644
--- a/hw/bsp/stm32wba/family.mk
+++ b/hw/bsp/stm32wba/family.mk
@@ -11,11 +11,11 @@ CPU_CORE ?= cortex-m33
CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_STM32WBA
-CFLAGS_GCC += \
+CFLAGS += \
-flto \
-Wno-error=cast-align -Wno-unused-parameter
-LDFLAGS_GCC += \
+LDFLAGS += \
-nostdlib -nostartfiles \
-specs=nosys.specs -specs=nano.specs -Wl,--gc-sections
@@ -49,12 +49,10 @@ INC += \
UPPERCASE_MCU_VARIANT = $(subst XX,xx,$(call to_upper,$(MCU_VARIANT)))
# Startup - Manually specify lowercase version for startup file
-SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_$(MCU_VARIANT).s
-SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_$(MCU_VARIANT).s
+SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_$(MCU_VARIANT).s
# Linker
-LD_FILE_GCC ?= ${FAMILY_PATH}/linker/${UPPERCASE_MCU_VARIANT}_FLASH_ns.ld
-LD_FILE_IAR ?= $(ST_CMSIS)/Source/Templates/iar/linker/$(MCU_VARIANT)_flash_ns.icf
+LD_FILE ?= ${FAMILY_PATH}/linker/${UPPERCASE_MCU_VARIANT}_FLASH_ns.ld
# flash target using on-board stlink
flash: flash-stlink
diff --git a/hw/bsp/tm4c/boards/ek_tm4c1294xl/board.mk b/hw/bsp/tm4c/boards/ek_tm4c1294xl/board.mk
index b01977674..26aa55c05 100644
--- a/hw/bsp/tm4c/boards/ek_tm4c1294xl/board.mk
+++ b/hw/bsp/tm4c/boards/ek_tm4c1294xl/board.mk
@@ -2,8 +2,7 @@ MCU_SUB_VARIANT = 129
CFLAGS += -DTM4C1294NCPDT
-LD_FILE_GCC = $(BOARD_PATH)/tm4c1294nc.ld
-LD_FILE_IAR = $(BOARD_PATH)/TM4C1294NC.icf
+LD_FILE = $(BOARD_PATH)/tm4c1294nc.ld
# For flash-jlink target
JLINK_DEVICE = TM4C1294NCPDT
diff --git a/hw/bsp/tm4c/family.mk b/hw/bsp/tm4c/family.mk
index bc966d98e..fc192c3af 100644
--- a/hw/bsp/tm4c/family.mk
+++ b/hw/bsp/tm4c/family.mk
@@ -14,7 +14,7 @@ CFLAGS += \
# mcu driver cause following warnings
CFLAGS += -Wno-error=strict-prototypes -Wno-error=cast-qual
-LDFLAGS_GCC += --specs=nosys.specs --specs=nano.specs
+LDFLAGS += --specs=nosys.specs --specs=nano.specs
INC += \
$(TOP)/lib/CMSIS_5/CMSIS/Core/Include \