[nrf52840] add nrfjprog target for flashing (#3478)

This commit is contained in:
Martin Turon
2019-02-19 20:46:02 -08:00
committed by Jonathan Hui
parent 18c496d915
commit 0f2502833e
+12
View File
@@ -293,6 +293,18 @@ cortex-m4_target_LDFLAGS = -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=f
$(foreach arch,$(ARCHS),$(eval $(call ARCH_template,$(arch))))
#
# Flashing / Debugging
#
TARGET_APP ?= ot-cli-ftd
APP_FILE_NAME = $(TopResultDir)/$(TargetTuple)/bin/$(TARGET_APP)
APP_FILE_HEX = $(TopResultDir)/$(TargetTuple)/bin/$(TARGET_APP).hex
nrfjprog: $(APP_FILE_NAME)
arm-none-eabi-objcopy -O ihex $(<) $(APP_FILE_HEX)
nrfjprog -f NRF52 --sectorerase --reset --program $(APP_FILE_HEX)
#
# Common / Finalization
#