2013-03-13 16:52:00 +01:00
|
|
|
## the cpu to build for
|
|
|
|
export CPU = lpc2387
|
|
|
|
|
2015-06-04 13:47:46 +02:00
|
|
|
# Target triple for the build. Use arm-none-eabi if you are unsure.
|
|
|
|
export TARGET_TRIPLE ?= arm-none-eabi
|
|
|
|
|
2013-03-13 16:52:00 +01:00
|
|
|
# toolchain config
|
2015-06-04 13:47:46 +02:00
|
|
|
export PREFIX = $(if $(TARGET_TRIPLE),$(TARGET_TRIPLE)-)
|
|
|
|
|
2014-01-03 19:00:41 +01:00
|
|
|
export CC = $(PREFIX)gcc
|
2014-02-26 18:25:15 +01:00
|
|
|
export CXX = $(PREFIX)g++
|
2014-01-03 19:00:41 +01:00
|
|
|
export AR = $(PREFIX)ar
|
2013-03-13 16:52:00 +01:00
|
|
|
export AS = $(PREFIX)as
|
|
|
|
export LINK = $(PREFIX)gcc
|
|
|
|
export SIZE = $(PREFIX)size
|
|
|
|
export OBJCOPY = $(PREFIX)objcopy
|
|
|
|
FLASHER = lpc2k_pgm
|
2014-07-31 19:42:06 +02:00
|
|
|
TERMPROG ?= $(RIOTBASE)/dist/tools/pyterm/pyterm
|
2013-03-13 16:52:00 +01:00
|
|
|
|
2016-02-08 19:37:37 +01:00
|
|
|
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
|
2014-02-26 18:25:15 +01:00
|
|
|
|
2016-02-08 19:37:37 +01:00
|
|
|
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),)
|
2013-03-13 16:52:00 +01:00
|
|
|
export PORT = /dev/ttyUSB0
|
|
|
|
endif
|
2014-01-03 18:45:07 +01:00
|
|
|
export FFLAGS = $(PORT) $(HEXFILE)
|
2014-09-24 12:49:45 +02:00
|
|
|
export TERMFLAGS += -tg -p "$(PORT)"
|
2013-03-23 18:42:11 +01:00
|
|
|
include $(RIOTBOARD)/msba2-common/Makefile.dep
|
2013-06-12 16:27:17 +02:00
|
|
|
|
2013-12-24 14:50:26 +01:00
|
|
|
export INCLUDES += -I$(RIOTBOARD)/msba2-common/include -I$(RIOTBOARD)/msba2-common/drivers/include
|
|
|
|
|
2013-10-11 15:07:53 +02:00
|
|
|
export OFLAGS = -O ihex
|
2014-02-15 12:31:43 +01:00
|
|
|
|
|
|
|
export UNDEF += $(BINDIR)cpu/startup.o
|