aboutsummaryrefslogtreecommitdiffhomepage
path: root/targets/nrf52840-mdk.json
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2018-11-19 21:08:12 +0100
committerAyke van Laethem <[email protected]>2018-11-19 21:08:12 +0100
commit760bc5d0a42204e6a49ebca0cb686530a671e240 (patch)
tree3a9daef7c9ce5bcaca383ea561fa715ce9aba01b /targets/nrf52840-mdk.json
parentf02766265ced8b90444ce0382a6d1cc5196d7c30 (diff)
downloadtinygo-760bc5d0a42204e6a49ebca0cb686530a671e240.tar.gz
tinygo-760bc5d0a42204e6a49ebca0cb686530a671e240.zip
targets: let specific targets inherit more general targets
This avoids a ton of duplication and makes it easier to change a generic target (for example, the "cortex-m" target) for all boards that use it. Also, by making it possible to inherit properties from a parent target specification, it is easier to support out-of-tree boards that don't have to be updated so often. A target specification for a special-purpose board can simply inherit the specification of a supported chip and override the properites it needs to override (like the programming interface).
Diffstat (limited to 'targets/nrf52840-mdk.json')
-rw-r--r--targets/nrf52840-mdk.json22
1 files changed, 2 insertions, 20 deletions
diff --git a/targets/nrf52840-mdk.json b/targets/nrf52840-mdk.json
index 7be436422..388c325b1 100644
--- a/targets/nrf52840-mdk.json
+++ b/targets/nrf52840-mdk.json
@@ -1,25 +1,7 @@
{
- "llvm-target": "armv7em-none-eabi",
- "build-tags": ["nrf52840_mdk", "nrf52840", "nrf", "tinygo.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",
+ "inherits": ["nrf52840"],
+ "build-tags": ["nrf52840_mdk"],
"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"]
}