## the cpu to build for export CPU = lpc2387 # Target triple for the build. Use arm-none-eabi if you are unsure. export TARGET_TRIPLE ?= arm-none-eabi # toolchain config export PREFIX = $(if $(TARGET_TRIPLE),$(TARGET_TRIPLE)-) export CC = $(PREFIX)gcc export CXX = $(PREFIX)g++ export AR = $(PREFIX)ar 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 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 ifeq ($(shell $(LINK) -specs=nano.specs -E - 2>/dev/null >/dev/null