Skip to content
Snippets Groups Projects
Unverified Commit b6f58c02 authored by Joakim Eriksson's avatar Joakim Eriksson Committed by GitHub
Browse files

Merge pull request #1802 from pjonsson/fail-missing-nrfjprog

nrf: fail when missing $(NRFJPROG)
parents ca887b04 c1daea29
No related branches found
No related tags found
No related merge requests found
...@@ -86,7 +86,7 @@ endif ...@@ -86,7 +86,7 @@ endif
%.upload: $(OUT_HEX) %.upload: $(OUT_HEX)
ifeq (, $(shell which $(NRFJPROG))) ifeq (, $(shell which $(NRFJPROG)))
@echo "ERROR: Could not find nrfjprog, please install it first" $(error Could not find nrfjprog "$(NRFJPROG)", please install it)
else else
$(NRFJPROG) $(NRFJPROG_OPTIONS) $(NRFJPROG_FLAGS) --sectorerase --program $< $(NRFJPROG) $(NRFJPROG_OPTIONS) $(NRFJPROG_FLAGS) --sectorerase --program $<
$(NRFJPROG) $(NRFJPROG_OPTIONS) $(NRFJPROG_FLAGS) --reset $(NRFJPROG) $(NRFJPROG_OPTIONS) $(NRFJPROG_FLAGS) --reset
...@@ -114,7 +114,7 @@ nrf-upload-sequence: $(foreach SNR, $(NRF_SNRS), nrf-upload-snr.$(SNR)) ...@@ -114,7 +114,7 @@ nrf-upload-sequence: $(foreach SNR, $(NRF_SNRS), nrf-upload-snr.$(SNR))
%.upload-all: $(OUT_HEX) %.upload-all: $(OUT_HEX)
ifeq (, $(shell which $(NRFJPROG))) ifeq (, $(shell which $(NRFJPROG)))
@echo "ERROR: Could not find nrfjprog, please install it first" $(error Could not find nrfjprog "$(NRFJPROG)", please install it)
else else
$(MAKE) HEX_FILE=$< -j $(NUMPAR) nrf-upload-sequence $(MAKE) HEX_FILE=$< -j $(NUMPAR) nrf-upload-sequence
endif endif
......
...@@ -122,7 +122,7 @@ endif ...@@ -122,7 +122,7 @@ endif
%.upload: $(OUT_HEX) %.upload: $(OUT_HEX)
ifeq (, $(shell which $(NRFJPROG))) ifeq (, $(shell which $(NRFJPROG)))
@echo "ERROR: Could not find nrfjprog, please install it first" $(error Could not find nrfjprog "$(NRFJPROG)", please install it)
else else
$(NRFJPROG) -f nrf52 $(NRFJPROG_FLAGS) --sectorerase --program $< $(NRFJPROG) -f nrf52 $(NRFJPROG_FLAGS) --sectorerase --program $<
$(NRFJPROG) -f nrf52 $(NRFJPROG_FLAGS) --reset $(NRFJPROG) -f nrf52 $(NRFJPROG_FLAGS) --reset
...@@ -150,7 +150,7 @@ nrf-upload-sequence: $(foreach SNR, $(NRF_SNRS), nrf-upload-snr.$(SNR)) ...@@ -150,7 +150,7 @@ nrf-upload-sequence: $(foreach SNR, $(NRF_SNRS), nrf-upload-snr.$(SNR))
%.upload-all: $(OUT_HEX) %.upload-all: $(OUT_HEX)
ifeq (, $(shell which $(NRFJPROG))) ifeq (, $(shell which $(NRFJPROG)))
@echo "ERROR: Could not find nrfjprog, please install it first" $(error Could not find nrfjprog "$(NRFJPROG)", please install it)
else else
$(MAKE) HEX_FILE=$< -j $(NUMPAR) nrf-upload-sequence $(MAKE) HEX_FILE=$< -j $(NUMPAR) nrf-upload-sequence
endif endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment