2013-04-02 10:06:17 +02:00
|
|
|
## the cpu to build for
|
|
|
|
export CPU = mc1322x
|
|
|
|
|
|
|
|
# toolchain config
|
2014-01-03 19:00:41 +01:00
|
|
|
export PREFIX = arm-none-eabi-
|
|
|
|
export CC = $(PREFIX)gcc
|
|
|
|
export AR = $(PREFIX)ar
|
2014-02-12 17:32:34 +01:00
|
|
|
export CFLAGS += -march=armv4t -mtune=arm7tdmi-s -mlong-calls \
|
2013-04-02 10:06:17 +02:00
|
|
|
-msoft-float -mthumb-interwork -fno-strict-aliasing -fno-common \
|
|
|
|
-ffixed-r8 -ffunction-sections -ffreestanding -fno-builtin \
|
|
|
|
-nodefaultlibs -Wcast-align -Wall -Wstrict-prototypes -Wextra \
|
2014-02-11 18:15:43 +01:00
|
|
|
-Os -pipe
|
2013-10-21 13:06:26 +02:00
|
|
|
export CFLAGS_MTHUMB ?= -mthumb
|
2014-09-29 18:42:48 +02:00
|
|
|
# TODO add -mthumb
|
2013-04-02 10:06:17 +02:00
|
|
|
export AFLAGS = -Wa,-gstabs $(CFLAGS)
|
|
|
|
export AS = $(PREFIX)as
|
|
|
|
export LINK = $(PREFIX)gcc
|
|
|
|
export SIZE = $(PREFIX)size
|
|
|
|
export OBJCOPY = $(PREFIX)objcopy
|
2013-10-11 15:07:53 +02:00
|
|
|
FLASHER = mc1322x-load.pl
|
2014-07-31 19:42:06 +02:00
|
|
|
TERM = pyterm
|
2014-10-17 22:39:45 +02:00
|
|
|
LINKFLAGS += -mcpu=arm7tdmi-s -static -lgcc -nostartfiles -T$(RIOTBASE)/cpu/$(CPU)/mc1322x.lds
|
2013-04-02 10:06:17 +02:00
|
|
|
|
|
|
|
ifeq ($(strip $(PORT)),)
|
|
|
|
export PORT = /dev/ttyUSB0
|
|
|
|
endif
|
2013-10-11 15:07:53 +02:00
|
|
|
export FFLAGS = -t $(PORT) -f $(HEXFILE) -c 'bbmc -l redbee-econotag reset'
|
|
|
|
export OFLAGS = -O binary --gap-fill=0xff
|
2014-08-10 05:20:57 +02:00
|
|
|
export TERMFLAGS += -p "$(PORT)"
|
2013-12-09 13:03:43 +01:00
|
|
|
|
2014-02-15 12:31:43 +01:00
|
|
|
export INCLUDES += -I$(RIOTCPU)/$(CPU)/include/ -I$(RIOTBOARD)/$(BOARD)/include/
|
2014-04-18 16:05:23 +02:00
|
|
|
export INCLUDES += -I$(RIOTCPU)/$(CPU)/maca/include
|
|
|
|
export INCLUDES += -I$(RIOTBOARD)/$(BOARD)/drivers/include
|
2014-07-16 14:26:15 +02:00
|
|
|
export INCLUDES += -I$(RIOTBASE)/sys/net/include
|
2014-02-03 15:58:18 +01:00
|
|
|
|
2014-04-18 16:05:23 +02:00
|
|
|
ifneq (,$(filter defaulttransceiver,$(USEMODULE)))
|
2014-02-24 14:52:50 +01:00
|
|
|
USEMODULE += mc1322x
|
|
|
|
USEMODULE += transceiver
|
2014-04-18 16:05:23 +02:00
|
|
|
endif
|
2014-02-15 12:31:43 +01:00
|
|
|
|
|
|
|
export UNDEF += $(BINDIR)cpu/startup.o
|