From 4eb753e7170969c9ba9ad3d914f74f60c13836ae Mon Sep 17 00:00:00 2001 From: root Date: Tue, 1 Sep 2015 14:26:57 +0100 Subject: fish --- Makefile | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 69e038b..f258e30 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,8 @@ INCLUDES= SDK=sdk-9.0.0 +BDADDR=FD:F9:62:4A:8A:C8 + SDKCSRCS= \ softdevice/common/softdevice_handler/softdevice_handler_appsh.c \ softdevice/common/softdevice_handler/softdevice_handler.c \ @@ -143,18 +145,22 @@ ds: debug: ${PROG} ${GDB} -x gdb.script ${PROG} -test.hex:test.bin - bin2hex.py --offset=0x1c000 $< $@ - -test.bin: - printf '\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f' > $@ - printf '\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f' >> $@ +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} --application $< $@ +dfu: ${PROG}.zip + nrfdfu -b ${BDADDR} -p ${PROG}.zip + + #flash: $(MAKECMDGOALS) # @echo Flashing: $(OUTPUT_BINARY_DIRECTORY)/$<.hex # nrfjprog --reset --program $(OUTPUT_BINARY_DIRECTORY)/$<.hex -- cgit v1.2.3