aboutsummaryrefslogtreecommitdiffhomepage
path: root/targets/nrf52840-mdk.json
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2018-10-06 13:53:58 +0200
committerAyke van Laethem <[email protected]>2018-10-18 15:07:06 +0200
commitdaf92226d835d9eac6360087b7853499ea871af5 (patch)
treeee4d7ca9d7a18c7b40c46fb71e97cb3c44dff1b9 /targets/nrf52840-mdk.json
parentf9edf7cc5ce075361172c23cf4b6301a863a24ce (diff)
downloadtinygo-daf92226d835d9eac6360087b7853499ea871af5.tar.gz
tinygo-daf92226d835d9eac6360087b7853499ea871af5.zip
nrf: add nrf52840-mdk board
With the help of Chillance on GitHub.
Diffstat (limited to 'targets/nrf52840-mdk.json')
-rw-r--r--targets/nrf52840-mdk.json25
1 files changed, 25 insertions, 0 deletions
diff --git a/targets/nrf52840-mdk.json b/targets/nrf52840-mdk.json
new file mode 100644
index 000000000..15424c51e
--- /dev/null
+++ b/targets/nrf52840-mdk.json
@@ -0,0 +1,25 @@
+{
+ "llvm-target": "armv7em-none-eabi",
+ "build-tags": ["nrf52840_mdk", "nrf52840", "nrf", "arm", "js", "wasm"],
+ "linker": "arm-none-eabi-gcc",
+ "pre-link-args": [
+ "-nostdlib",
+ "-nostartfiles",
+ "-mcpu=cortex-m4",
+ "-mthumb",
+ "-T", "targets/nrf52840.ld",
+ "-Wl,--gc-sections",
+ "-fno-exceptions", "-fno-unwind-tables",
+ "-ffunction-sections", "-fdata-sections",
+ "-Os",
+ "-DNRF52840_XXAA",
+ "-Ilib/CMSIS/CMSIS/Include",
+ "lib/nrfx/mdk/system_nrf52840.c",
+ "src/device/nrf/nrf52840.s"
+ ],
+ "objcopy": "arm-none-eabi-objcopy",
+ "flash": "openocd -f interface/cmsis-dap.cfg -f target/nrf51.cfg -c 'program {hex} reset exit'",
+ "ocd-daemon": ["openocd", "-f", "interface/cmsis-dap.cfg", "-f", "target/nrf51.cfg"],
+ "gdb": "arm-none-eabi-gdb",
+ "gdb-initial-cmds": ["target remote :3333", "monitor halt", "load", "monitor reset", "c"]
+}