Added the PORT make variable to the cc2538dk and Remote makefile. Fixed bug in these makefiles on OSX introduced in #1162

This commit is contained in:
Jelmer Tiete 2015-11-23 11:28:34 -08:00
parent 715946ece3
commit 1efeda4283
2 changed files with 16 additions and 2 deletions

View File

@ -28,11 +28,18 @@ MODULES += core/net core/net/mac \
core/net/mac/contikimac \
core/net/llsec
PYTHON = python
BSL_FLAGS += -e -w -v -a $$($(OBJDUMP) -h $*.elf | grep -B1 LOAD | grep -Ev 'LOAD|\-\-' | awk '{print "0x" $$5}' | sort -g | head -1)
ifdef PORT
BSL_FLAGS += -p $(PORT)
endif
BSL = $(CONTIKI)/tools/cc2538-bsl/cc2538-bsl.py
%.upload: %.bin %.elf
ifeq ($(wildcard $(BSL)), )
@echo "ERROR: Could not find the cc2538-bsl script. Did you run 'git submodule update --init' ?"
else
python $(BSL) -e -w -v -a $$($(OBJDUMP) -h $*.elf | sed -n '/\<LOAD\>/{g;1!p;};h' | awk '{print "0x" $$5}' | sort -g | head -1) $<
$(PYTHON) $(BSL) $(BSL_FLAGS) $<
endif

View File

@ -36,11 +36,18 @@ MODULES += core/net core/net/mac \
core/net/mac/contikimac \
core/net/llsec
PYTHON = python
BSL_FLAGS += -e -w -v -a $$($(OBJDUMP) -h $*.elf | grep -B1 LOAD | grep -Ev 'LOAD|\-\-' | awk '{print "0x" $$5}' | sort -g | head -1)
ifdef PORT
BSL_FLAGS += -p $(PORT)
endif
BSL = $(CONTIKI)/tools/cc2538-bsl/cc2538-bsl.py
%.upload: %.bin %.elf
ifeq ($(wildcard $(BSL)), )
@echo "ERROR: Could not find the cc2538-bsl script. Did you run 'git submodule update --init' ?"
else
$(PYTHON) $(BSL) $(BSL_FLAGS) -a $$($(OBJDUMP) -h $*.elf | sed -n '/\<LOAD\>/{g;1!p;};h' | awk '{print "0x" $$5}' | sort -g | head -1) $<
$(PYTHON) $(BSL) $(BSL_FLAGS) $<
endif