summaryrefslogtreecommitdiffstats
path: root/orig_firmware/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'orig_firmware/Makefile')
-rw-r--r--orig_firmware/Makefile49
1 files changed, 49 insertions, 0 deletions
diff --git a/orig_firmware/Makefile b/orig_firmware/Makefile
new file mode 100644
index 0000000..257bf56
--- /dev/null
+++ b/orig_firmware/Makefile
@@ -0,0 +1,49 @@
+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