mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-15 16:33:40 +00:00
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).
This commit is contained in:
+2
-21
@@ -1,26 +1,7 @@
|
||||
{
|
||||
"llvm-target": "armv7em-none-eabi",
|
||||
"build-tags": ["pca10040", "nrf52832", "nrf52", "nrf", "tinygo.arm", "js", "wasm"],
|
||||
"linker": "arm-none-eabi-gcc",
|
||||
"rtlib": "compiler-rt",
|
||||
"pre-link-args": [
|
||||
"-nostdlib",
|
||||
"-nostartfiles",
|
||||
"-mcpu=cortex-m4",
|
||||
"-mthumb",
|
||||
"-T", "targets/nrf52.ld",
|
||||
"-Wl,--gc-sections",
|
||||
"-fno-exceptions", "-fno-unwind-tables",
|
||||
"-ffunction-sections", "-fdata-sections",
|
||||
"-Os",
|
||||
"-DNRF52832_XXAA",
|
||||
"-Ilib/CMSIS/CMSIS/Include",
|
||||
"lib/nrfx/mdk/system_nrf52.c",
|
||||
"src/device/nrf/nrf52.s"
|
||||
],
|
||||
"objcopy": "arm-none-eabi-objcopy",
|
||||
"inherits": ["nrf52"],
|
||||
"build-tags": ["pca10040"],
|
||||
"flash": "nrfjprog -f nrf52 --sectorerase --program {hex} --reset",
|
||||
"ocd-daemon": ["openocd", "-f", "interface/jlink.cfg", "-c", "transport select swd", "-f", "target/nrf51.cfg"],
|
||||
"gdb": "arm-none-eabi-gdb",
|
||||
"gdb-initial-cmds": ["target remote :3333", "monitor halt", "load", "monitor reset", "c"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user