2016-03-21 09:27:23 +01:00
|
|
|
# Target architecture for the build. Use arm-none-eabi if you are unsure.
|
2020-09-08 22:28:41 +02:00
|
|
|
TARGET_ARCH_ARM7 ?= arm-none-eabi
|
|
|
|
TARGET_ARCH ?= $(TARGET_ARCH_ARM7)
|
2016-03-21 09:27:23 +01:00
|
|
|
|
2019-07-23 06:48:12 +02:00
|
|
|
INCLUDES += -I$(RIOTBASE)/cpu/arm7_common/include/
|
|
|
|
|
|
|
|
# currently only arm7tdmi-s is supported by RIOT, but allow overriding MCPU
|
|
|
|
# if someone wants to add support for other ARM7 CPUs
|
|
|
|
MCPU ?= arm7tdmi-s
|
|
|
|
|
|
|
|
CFLAGS_CPU = -mcpu=$(MCPU)
|
2022-04-03 01:54:31 +02:00
|
|
|
CFLAGS_LINK = -ffunction-sections -fdata-sections -fshort-enums
|
2019-07-23 06:48:12 +02:00
|
|
|
CFLAGS_DBG ?= -ggdb -g3
|
|
|
|
CFLAGS_OPT ?= -Os
|
|
|
|
|
|
|
|
CFLAGS += $(CFLAGS_CPU) $(CFLAGS_LINK) $(CFLAGS_DBG) $(CFLAGS_OPT)
|
2022-09-23 18:39:28 +02:00
|
|
|
ASFLAGS += $(CFLAGS_CPU)
|
2020-01-02 09:48:02 +01:00
|
|
|
LINKFLAGS += -T$(RIOTCPU)/$(CPU)/ldscripts/$(CPU).ld
|
|
|
|
LINKFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) $(CFLAGS_OPT) -static -lgcc -nostartfiles
|
|
|
|
LINKFLAGS += -Wl,--gc-sections
|