targets: refactor flash/gdb target configuration

Instead of specifying explicit commands, most of these commands have
been replaced by more specific properties.

This is work that will be necessary for an eventual -programmer flag to
the compiler, with which it is possible to select which programmer to
use to flash or debug a chip. That's not very useful for boards that
already include a programmer or bootloader for that purpose, but is very
useful for novel boards or single-purpose boards that are not already
included in TinyGo.
This commit is contained in:
Ayke van Laethem
2019-10-14 00:29:52 +02:00
committed by Ron Evans
parent 52bac4d75b
commit 2a71aa90bc
23 changed files with 208 additions and 112 deletions
+3 -3
View File
@@ -12,7 +12,7 @@
"extra-files": [
"src/device/stm32/stm32f103xx.s"
],
"flash": "openocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg -c 'program {hex} reset exit'",
"ocd-daemon": ["openocd", "-f", "interface/stlink-v2.cfg", "-f", "target/stm32f1x.cfg"],
"gdb-initial-cmds": ["target remote :3333", "monitor halt", "load", "monitor reset", "c"]
"flash-method": "openocd",
"openocd-interface": "stlink-v2",
"openocd-target": "stm32f1x"
}