From ecaec565aad7d28448f0cfc549a55eb0d4b64779 Mon Sep 17 00:00:00 2001 From: sago35 Date: Mon, 22 Mar 2021 19:00:21 +0900 Subject: [PATCH] nrf: Added support for writing with nrfjprog on all nrf boards `tinygo flash -programmer command` to write using nrfjprog --- targets/nrf51.json | 1 + targets/nrf52.json | 1 + targets/nrf52833.json | 1 + targets/nrf52840.json | 1 + targets/pca10031.json | 1 - targets/pca10040.json | 1 - targets/pca10056.json | 1 - targets/pinetime-devkit0.json | 1 - targets/x9pro.json | 1 - 9 files changed, 4 insertions(+), 5 deletions(-) diff --git a/targets/nrf51.json b/targets/nrf51.json index f8870bc9a..87e0a791a 100644 --- a/targets/nrf51.json +++ b/targets/nrf51.json @@ -14,6 +14,7 @@ "lib/nrfx/mdk/system_nrf51.c", "src/device/nrf/nrf51.s" ], + "flash-command": "nrfjprog -f nrf51 --sectorerase --program {hex} --reset", "openocd-transport": "swd", "openocd-target": "nrf51" } diff --git a/targets/nrf52.json b/targets/nrf52.json index 765fee23f..fe0cffdb4 100644 --- a/targets/nrf52.json +++ b/targets/nrf52.json @@ -12,6 +12,7 @@ "lib/nrfx/mdk/system_nrf52.c", "src/device/nrf/nrf52.s" ], + "flash-command": "nrfjprog -f nrf52 --sectorerase --program {hex} --reset", "openocd-transport": "swd", "openocd-target": "nrf51" } diff --git a/targets/nrf52833.json b/targets/nrf52833.json index a1c88a6f2..140f51f0f 100644 --- a/targets/nrf52833.json +++ b/targets/nrf52833.json @@ -12,6 +12,7 @@ "lib/nrfx/mdk/system_nrf52833.c", "src/device/nrf/nrf52833.s" ], + "flash-command": "nrfjprog -f nrf52 --sectorerase --program {hex} --reset", "openocd-transport": "swd", "openocd-target": "nrf52" } diff --git a/targets/nrf52840.json b/targets/nrf52840.json index c8470c655..6f2ad453a 100644 --- a/targets/nrf52840.json +++ b/targets/nrf52840.json @@ -12,6 +12,7 @@ "lib/nrfx/mdk/system_nrf52840.c", "src/device/nrf/nrf52840.s" ], + "flash-command": "nrfjprog -f nrf52 --sectorerase --program {hex} --reset", "openocd-transport": "swd", "openocd-target": "nrf51" } diff --git a/targets/pca10031.json b/targets/pca10031.json index cccae828a..ef527173a 100644 --- a/targets/pca10031.json +++ b/targets/pca10031.json @@ -1,6 +1,5 @@ { "inherits": ["nrf51"], "build-tags": ["pca10031"], - "flash-command": "nrfjprog -f nrf51 --sectorerase --program {hex} --reset", "openocd-interface": "cmsis-dap" } diff --git a/targets/pca10040.json b/targets/pca10040.json index 7685be427..573944437 100644 --- a/targets/pca10040.json +++ b/targets/pca10040.json @@ -2,7 +2,6 @@ "inherits": ["nrf52"], "build-tags": ["pca10040"], "flash-method": "openocd", - "flash-command": "nrfjprog -f nrf52 --sectorerase --program {hex} --reset", "openocd-interface": "jlink", "openocd-transport": "swd" } diff --git a/targets/pca10056.json b/targets/pca10056.json index fc0acaa0a..1cde41ead 100644 --- a/targets/pca10056.json +++ b/targets/pca10056.json @@ -2,7 +2,6 @@ "inherits": ["nrf52840"], "build-tags": ["pca10056"], "flash-method": "command", - "flash-command": "nrfjprog -f nrf52 --sectorerase --program {hex} --reset", "msd-volume-name": "JLINK", "msd-firmware-name": "firmware.hex", "openocd-interface": "jlink", diff --git a/targets/pinetime-devkit0.json b/targets/pinetime-devkit0.json index adbe874ae..4aa292ded 100644 --- a/targets/pinetime-devkit0.json +++ b/targets/pinetime-devkit0.json @@ -2,7 +2,6 @@ "inherits": ["nrf52"], "build-tags": ["pinetime_devkit0"], "flash-method": "openocd", - "flash-command": "nrfjprog -f nrf52 --sectorerase --program {hex} --reset", "openocd-interface": "jlink", "openocd-transport": "swd" } diff --git a/targets/x9pro.json b/targets/x9pro.json index a9ecc0c83..aab800027 100644 --- a/targets/x9pro.json +++ b/targets/x9pro.json @@ -2,7 +2,6 @@ "inherits": ["nrf52"], "build-tags": ["x9pro"], "flash-method": "openocd", - "flash-command": "nrfjprog -f nrf52 --sectorerase --program {hex} --reset", "openocd-interface": "jlink", "openocd-transport": "swd" }