Skip to content
Snippets Groups Projects
Commit c1daea29 authored by Peter A. Jonsson's avatar Peter A. Jonsson
Browse files

nrf: fail when missing $(NRFJPROG)

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