SD=sd.hex APP=app.hex BL=bl.hex UICR=uicr.hex OOCD=openocd OOCD_CFG=openocd.cfg flash: ${SD} ${APP} ${BL} ${UICR} ${OOCD} -f ${OOCD_CFG} \ -c "init" -c "reset init" \ -c "nrf51 mass_erase" \ -c "flash write_image ${SD}" \ -c "flash write_image ${APP}" \ -c "flash write_image ${BL}" \ -c "flash write_image ${UICR}" \ -c "reset" \ -c "shutdown" reset: ${OOCD} -f ${OOCD_CFG} \ -c "init" \ -c "reset init" \ -c "reset" \ -c "shutdown" #%.zip: %.hex # ${NRFUTIL} dfu genpkg --dev-revision ${DEV_REVISION} --dev-type ${DEV_TYPE} --application-version ${APP_VERSION} --sd-req ${SD_REQ} --bootloader $< $@ # #dfu: ${PROG}.zip # ${NRFDFU} -b ${BDADDR} -p ${PROG}.zip #flash: $(MAKECMDGOALS) # @echo Flashing: $(OUTPUT_BINARY_DIRECTORY)/$<.hex # nrfjprog --reset --program $(OUTPUT_BINARY_DIRECTORY)/$<.hex # ### Flash softdevice #flash_softdevice: # @echo Flashing: s130_softdevice.hex # nrfjprog --reset --program softdevice/s130/hex/s130_softdevice.hex