2013-01-12 23:44:42 +01:00
|
|
|
# cc2538dk platform makefile
|
|
|
|
|
|
|
|
ifndef CONTIKI
|
|
|
|
$(error CONTIKI not defined! You must specify where CONTIKI resides!)
|
|
|
|
endif
|
|
|
|
|
|
|
|
CONTIKI_TARGET_DIRS = . dev
|
|
|
|
|
|
|
|
CONTIKI_TARGET_SOURCEFILES += leds.c leds-arch.c
|
|
|
|
CONTIKI_TARGET_SOURCEFILES += contiki-main.c
|
2013-11-04 20:39:56 +01:00
|
|
|
CONTIKI_TARGET_SOURCEFILES += sensors.c smartrf-sensors.c
|
2015-02-11 18:06:54 +01:00
|
|
|
CONTIKI_TARGET_SOURCEFILES += button-sensor.c als-sensor.c
|
2013-01-12 23:44:42 +01:00
|
|
|
|
|
|
|
CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES)
|
|
|
|
|
|
|
|
CLEAN += *.cc2538dk
|
|
|
|
|
|
|
|
### Unless the example dictates otherwise, build with code size optimisations
|
|
|
|
ifndef SMALL
|
|
|
|
SMALL = 1
|
|
|
|
endif
|
|
|
|
|
|
|
|
### Define the CPU directory
|
|
|
|
CONTIKI_CPU=$(CONTIKI)/cpu/cc2538
|
|
|
|
include $(CONTIKI_CPU)/Makefile.cc2538
|
2013-12-05 23:56:30 +01:00
|
|
|
|
2014-11-12 10:18:29 +01:00
|
|
|
MODULES += core/net core/net/mac \
|
|
|
|
core/net/mac/contikimac \
|
2013-05-24 09:21:53 +02:00
|
|
|
core/net/llsec
|
2014-02-02 00:46:45 +01:00
|
|
|
|
|
|
|
BSL = $(CONTIKI)/tools/cc2538-bsl/cc2538-bsl.py
|
|
|
|
|
2015-11-17 23:28:38 +01:00
|
|
|
%.upload: %.bin %.elf
|
2014-02-02 00:46:45 +01:00
|
|
|
ifeq ($(wildcard $(BSL)), )
|
|
|
|
@echo "ERROR: Could not find the cc2538-bsl script. Did you run 'git submodule update --init' ?"
|
|
|
|
else
|
2015-11-17 23:28:38 +01:00
|
|
|
python $(BSL) -e -w -v -a $$($(OBJDUMP) -h $*.elf | sed -n '/\<LOAD\>/{g;1!p;};h' | awk '{print "0x" $$5}' | sort -g | head -1) $<
|
2014-02-02 00:46:45 +01:00
|
|
|
endif
|