Merge pull request #784 from g-oikonomou/bugfix/nrf52dk

Fix the nrf52dk .jlink and .flash make targets
This commit is contained in:
Joakim Eriksson 2018-12-02 10:41:05 +01:00 committed by GitHub
commit ba15c0c6e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -185,10 +185,12 @@ $(OBJECT_DIRECTORY)/%.o: %.s
$(TRACE_CC)
$(Q)$(CC) $(ASMFLAGS) $(addprefix -I$(NRF52_SDK_ROOT)/, $(INC_PATHS)) -c -o $@ $<
%.jlink:
sed -e 's/#OUTPUT_FILENAME#/$*.hex/' $(CONTIKI_CPU)/flash.jlink > $@
include $(ARCH_PATH)/cpu/arm/cortex-m/cm4/Makefile.cm4
%.flash: %.hex %.jlink
%.jlink: $(OUT_HEX)
sed -e 's,#OUTPUT_FILENAME#,$<,' $(CONTIKI_CPU)/flash.jlink > $@
%.flash: %.jlink
@echo Flashing: $^
$(JLINK) $(JLINK_OPTS) -CommanderScript $*.jlink
@ -203,5 +205,3 @@ erase:
$(JLINK) $(JLINK_OPTS) -CommanderScript $(CONTIKI_CPU)/erase.jlink
.PHONY: softdevice.jlink
include $(ARCH_PATH)/cpu/arm/cortex-m/cm4/Makefile.cm4