From 97095c8bb58e70197d182ab5d2c1b0336e77e629 Mon Sep 17 00:00:00 2001 From: Jelmer Tiete Date: Mon, 9 Nov 2015 00:29:49 -0800 Subject: [PATCH] Updated makefiles of srf06 platform to support uploading via cc2538-bsl script --- platform/srf06-cc26xx/srf06/Makefile.srf06 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/platform/srf06-cc26xx/srf06/Makefile.srf06 b/platform/srf06-cc26xx/srf06/Makefile.srf06 index d94181927..3459cbadc 100644 --- a/platform/srf06-cc26xx/srf06/Makefile.srf06 +++ b/platform/srf06-cc26xx/srf06/Makefile.srf06 @@ -3,3 +3,19 @@ CFLAGS += -DBOARD_SMARTRF06EB=1 CONTIKI_TARGET_DIRS += srf06 BOARD_SOURCEFILES += leds-arch.c srf06-sensors.c button-sensor.c board.c + +PYTHON = python +BSL_FLAGS += -e -w -v + +ifdef PORT + BSL_FLAGS += -p $(PORT) +endif + +BSL = $(CONTIKI)/tools/cc2538-bsl/cc2538-bsl.py + +%.upload: %.bin +ifeq ($(wildcard $(BSL)), ) + @echo "ERROR: Could not find the cc2538-bsl script. Did you run 'git submodule update --init' ?" +else + $(PYTHON) $(BSL) $(BSL_FLAGS) $< +endif