1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/cpu/arm7_common/Makefile.include
Marian Buschsieweke 7092566f1f
cpu/arm7_common: Moved compiler flags here
- Moved compiler & linker flags from boards/common/msba2 to cpu/arm7_common
- Moved dependency to newlib nano to cpu/arm7_common
- Moved config to link in cpu/startup.o to cpu/arm7_common
2019-09-11 01:02:41 +02:00

27 lines
941 B
Makefile

# Target architecture for the build. Use arm-none-eabi if you are unsure.
export TARGET_ARCH ?= arm-none-eabi
INCLUDES += -I$(RIOTBASE)/cpu/arm7_common/include/
# use common ARM7 periph code
USEMODULE += arm7_common_periph
# use the nano-specs of Newlib when available
USEMODULE += newlib_nano
# 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)
CFLAGS_LINK = -ffunction-sections -fdata-sections -fno-builtin -fshort-enums
CFLAGS_DBG ?= -ggdb -g3
CFLAGS_OPT ?= -Os
CFLAGS += $(CFLAGS_CPU) $(CFLAGS_LINK) $(CFLAGS_DBG) $(CFLAGS_OPT)
ASFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG)
export LINKFLAGS += -T$(RIOTCPU)/$(CPU)/ldscripts/$(CPU).ld
export LINKFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) $(CFLAGS_OPT) -static -lgcc -nostartfiles
export LINKFLAGS += -Wl,--gc-sections
export UNDEF += $(BINDIR)/cpu/startup.o