boards/msba2-common: Homogenize CFLAGS and add support for newlib-nano
This commit is contained in:
parent
04c37094a0
commit
936a92ce8b
@ -10,21 +10,30 @@ export PREFIX = $(if $(TARGET_TRIPLE),$(TARGET_TRIPLE)-)
|
||||
export CC = $(PREFIX)gcc
|
||||
export CXX = $(PREFIX)g++
|
||||
export AR = $(PREFIX)ar
|
||||
export CFLAGS += -O2 -Wall -Wstrict-prototypes -mcpu=arm7tdmi-s -gdwarf-2 -fdata-sections -ffunction-sections
|
||||
export ASFLAGS = -gdwarf-2 -mcpu=arm7tdmi-s
|
||||
export AS = $(PREFIX)as
|
||||
export LINK = $(PREFIX)gcc
|
||||
export SIZE = $(PREFIX)size
|
||||
export OBJCOPY = $(PREFIX)objcopy
|
||||
FLASHER = lpc2k_pgm
|
||||
TERMPROG ?= $(RIOTBASE)/dist/tools/pyterm/pyterm
|
||||
LINKFLAGS += -gdwarf-2 -mcpu=arm7tdmi-s -static -lgcc -nostartfiles -T$(RIOTBASE)/cpu/$(CPU)/ldscripts/$(CPU).ld -Wl,--gc-sections
|
||||
|
||||
# unwanted (CXXUWFLAGS) and extra (CXXEXFLAGS) flags for c++
|
||||
export CXXUWFLAGS +=
|
||||
export CXXEXFLAGS +=
|
||||
export CFLAGS_CPU = -mcpu=arm7tdmi-s
|
||||
export CFLAGS_LINK = -ffunction-sections -fdata-sections -fno-builtin -fshort-enums
|
||||
export CFLAGS_DBG = -ggdb -g3
|
||||
export CFLAGS_OPT ?= -Os
|
||||
|
||||
ifeq ($(strip $(PORT)),)
|
||||
export CFLAGS += $(CFLAGS_CPU) $(CFLAGS_LINK) $(CFLAGS_DBG) $(CFLAGS_OPT)
|
||||
export 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
|
||||
|
||||
# use the nano-specs of Newlib when available
|
||||
ifeq ($(shell $(LINK) -specs=nano.specs -E - 2>/dev/null >/dev/null </dev/null ; echo $$?),0)
|
||||
export LINKFLAGS += -specs=nano.specs -lc -lnosys
|
||||
endif
|
||||
|
||||
ifeq ($(PORT),)
|
||||
export PORT = /dev/ttyUSB0
|
||||
endif
|
||||
export FFLAGS = $(PORT) $(HEXFILE)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user