Merge pull request #1 from g-oikonomou/contrib/change-bsl-addr-calculation
Remove duplicate block and define the argument of -a using $(shell)
This commit is contained in:
commit
ff6e559be2
@ -29,7 +29,7 @@ MODULES += core/net core/net/mac \
|
||||
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)
|
||||
BSL_FLAGS += -e -w -v
|
||||
|
||||
ifdef PORT
|
||||
BSL_FLAGS += -p $(PORT)
|
||||
@ -41,5 +41,8 @@ BSL = $(CONTIKI)/tools/cc2538-bsl/cc2538-bsl.py
|
||||
ifeq ($(wildcard $(BSL)), )
|
||||
@echo "ERROR: Could not find the cc2538-bsl script. Did you run 'git submodule update --init' ?"
|
||||
else
|
||||
$(PYTHON) $(BSL) $(BSL_FLAGS) $<
|
||||
$(eval BSL_ADDRESS_ARG := -a $(shell $(OBJDUMP) -h $*.elf | grep -B1 LOAD | \
|
||||
grep -Ev 'LOAD|\-\-' | awk '{print "0x" $$5}' | \
|
||||
sort -g | head -1))
|
||||
$(PYTHON) $(BSL) $(BSL_FLAGS) $(BSL_ADDRESS_ARG) $<
|
||||
endif
|
||||
|
@ -36,18 +36,14 @@ 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) $<
|
||||
$(eval BSL_ADDRESS_ARG := -a $(shell $(OBJDUMP) -h $*.elf | grep -B1 LOAD | \
|
||||
grep -Ev 'LOAD|\-\-' | awk '{print "0x" $$5}' | \
|
||||
sort -g | head -1))
|
||||
$(PYTHON) $(BSL) $(BSL_FLAGS) $(BSL_ADDRESS_ARG) $<
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user