summaryrefslogtreecommitdiffstats
path: root/tinyusb/hw/bsp/nrf/boards/pca10059/board.mk
diff options
context:
space:
mode:
Diffstat (limited to 'tinyusb/hw/bsp/nrf/boards/pca10059/board.mk')
-rwxr-xr-xtinyusb/hw/bsp/nrf/boards/pca10059/board.mk15
1 files changed, 15 insertions, 0 deletions
diff --git a/tinyusb/hw/bsp/nrf/boards/pca10059/board.mk b/tinyusb/hw/bsp/nrf/boards/pca10059/board.mk
new file mode 100755
index 00000000..0b82ecdb
--- /dev/null
+++ b/tinyusb/hw/bsp/nrf/boards/pca10059/board.mk
@@ -0,0 +1,15 @@
+MCU_VARIANT = nrf52840
+CFLAGS += -DNRF52840_XXAA
+
+LD_FILE = $(BOARD_PATH)/$(BOARD).ld
+
+# flash using Nordic nrfutil (pip2 install nrfutil)
+# make BOARD=pca10059 SERIAL=/dev/ttyACM0 all flash
+NRFUTIL = nrfutil
+
+$(BUILD)/$(PROJECT).zip: $(BUILD)/$(PROJECT).hex
+ $(NRFUTIL) pkg generate --hw-version 52 --sd-req 0x0000 --debug-mode --application $^ $@
+
+flash: $(BUILD)/$(PROJECT).zip
+ @:$(call check_defined, SERIAL, example: SERIAL=/dev/ttyACM0)
+ $(NRFUTIL) dfu usb-serial --package $^ -p $(SERIAL) -b 115200