From 472ebcbfaccd62adc0c4ab1c59a967c1d7034385 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 7 Sep 2015 11:52:14 +0100 Subject: fish --- orig_firmware/Makefile | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 orig_firmware/Makefile (limited to 'orig_firmware/Makefile') 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 -- cgit v1.2.3