mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
c4ccaecda5
Boards should not set PORT and should not have code conditional on PORT as that causes PORT to be evaluated and the build to fail even if this varible is not needed. Exporting has the same effect. This fixes the MSBA2 board by declaring PORT_LINUX and PORT_DARWIN instead.
33 lines
999 B
Makefile
33 lines
999 B
Makefile
## the cpu to build for
|
|
export CPU = lpc2387
|
|
|
|
FLASHER = lpc2k_pgm
|
|
|
|
# configure serial interface
|
|
PORT_LINUX ?= /dev/ttyUSB0
|
|
# This does not make a lot of sense, but it has the same value as the previous code
|
|
PORT_DARWIN ?= /dev/tty.usbserial-ARM
|
|
|
|
TERMFLAGS += -tg -p "$(PORT)"
|
|
include $(RIOTMAKE)/tools/serial.inc.mk
|
|
|
|
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
|
|
|
|
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
|
|
USEMODULE += newlib_nano
|
|
|
|
FFLAGS = $(PORT) $(HEXFILE)
|
|
|
|
INCLUDES += -I$(RIOTBOARD)/common/msba2/include
|
|
|
|
export UNDEF += $(BINDIR)/cpu/startup.o
|