Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions examples/build_system/make/cpu/arm1176jzf-s.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,4 @@ ifeq ($(TOOLCHAIN),gcc)
CFLAGS += \
-mcpu=arm1176jzf-s \

else ifeq ($(TOOLCHAIN),iar)
#CFLAGS += --cpu cortex-a53
#ASFLAGS += --cpu cortex-a53

endif
4 changes: 0 additions & 4 deletions examples/build_system/make/cpu/arm926ej-s.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,4 @@ ifeq ($(TOOLCHAIN),gcc)
CFLAGS += \
-mcpu=arm926ej-s \

else ifeq ($(TOOLCHAIN),iar)
#CFLAGS += --cpu cortex-a53
#ASFLAGS += --cpu cortex-a53

endif
7 changes: 0 additions & 7 deletions examples/build_system/make/cpu/cortex-a53.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,4 @@ ifeq ($(TOOLCHAIN),gcc)
CFLAGS += \
-mcpu=cortex-a53 \

else ifeq ($(TOOLCHAIN),iar)
CFLAGS += \
--cpu cortex-a53 \

ASFLAGS += \
--cpu cortex-a53 \

endif
7 changes: 0 additions & 7 deletions examples/build_system/make/cpu/cortex-a72.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,4 @@ ifeq ($(TOOLCHAIN),gcc)
CFLAGS += \
-mcpu=cortex-a72 \

else ifeq ($(TOOLCHAIN),iar)
CFLAGS += \
--cpu cortex-a72 \

ASFLAGS += \
--cpu cortex-a72 \

endif
5 changes: 0 additions & 5 deletions examples/build_system/make/cpu/cortex-m0.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions examples/build_system/make/cpu/cortex-m0plus.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions examples/build_system/make/cpu/cortex-m23.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions examples/build_system/make/cpu/cortex-m3.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 0 additions & 7 deletions examples/build_system/make/cpu/cortex-m33-nodsp-nofp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 0 additions & 9 deletions examples/build_system/make/cpu/cortex-m33.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions examples/build_system/make/cpu/cortex-m4-nofpu.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions examples/build_system/make/cpu/cortex-m4.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 0 additions & 9 deletions examples/build_system/make/cpu/cortex-m55.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 0 additions & 9 deletions examples/build_system/make/cpu/cortex-m7-fpsp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 0 additions & 9 deletions examples/build_system/make/cpu/cortex-m7.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 0 additions & 9 deletions examples/build_system/make/cpu/cortex-m85.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions examples/build_system/make/cpu/msp430.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions examples/build_system/make/cpu/rv32i-ilp32.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions examples/build_system/make/cpu/rv32imac-ilp32.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 0 additions & 13 deletions examples/build_system/make/toolchain/arm_iar.mk

This file was deleted.

11 changes: 2 additions & 9 deletions examples/build_system/make/toolchain/gcc_rules.mk
Original file line number Diff line number Diff line change
@@ -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)

Expand All @@ -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

Comment on lines +10 to 11
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-MD is already added in examples/build_system/make/toolchain/gcc_common.mk (CFLAGS baseline). Adding it again here is redundant and makes it harder to reason about the final flag set. Consider removing this extra CFLAGS += -MD line and rely on gcc_common.mk for dependency generation.

Suggested change
CFLAGS += -MD

Copilot uses AI. Check for mistakes.
# LTO makes it difficult to analyze map file for optimizing size purpose
# We will run this option in ci
Expand All @@ -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
Expand Down
44 changes: 0 additions & 44 deletions examples/build_system/make/toolchain/iar_rules.mk

This file was deleted.

2 changes: 1 addition & 1 deletion examples/device/net_lwip_webserver/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/dual/host_hid_to_device_cdc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion examples/dual/host_info_to_device_cdc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion examples/host/msc_file_explorer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion examples/host/msc_file_explorer/src/msc_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@
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);

Check warning on line 263 in examples/host/msc_file_explorer/src/msc_app.c

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this redundant cast.

See more on https://sonarcloud.io/project/issues?id=hathach_tinyusb&issues=AZ0Goc8F4fUXOCXg601n&open=AZ0Goc8F4fUXOCXg601n&pullRequest=3563
return RES_OK;

case GET_SECTOR_SIZE:
Expand Down
Loading
Loading