aboutsummaryrefslogtreecommitdiffhomepage
path: root/compileopts
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2020-01-10 17:02:30 +0100
committerRon Evans <[email protected]>2020-01-12 17:02:53 +0100
commit6841f9e245b3be5a638128bc2ecd5d67a246246b (patch)
tree2704b6b1ca15155d8277f44dd65f3ae46238439f /compileopts
parentef4ede43d1bbb2dcd91f147eb3c1b2bbfb55b2dd (diff)
downloadtinygo-6841f9e245b3be5a638128bc2ecd5d67a246246b.tar.gz
tinygo-6841f9e245b3be5a638128bc2ecd5d67a246246b.zip
compiler: add support for debugging through JLinkGDBServer
Some J-Link targets aren't supported in OpenOCD (or would need some special configuration), so also give the option to use JLinkGDBServer instead.
Diffstat (limited to 'compileopts')
-rw-r--r--compileopts/target.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/compileopts/target.go b/compileopts/target.go
index 2e989ac59..949f00e47 100644
--- a/compileopts/target.go
+++ b/compileopts/target.go
@@ -47,6 +47,7 @@ type TargetSpec struct {
OpenOCDInterface string `json:"openocd-interface"`
OpenOCDTarget string `json:"openocd-target"`
OpenOCDTransport string `json:"openocd-transport"`
+ JLinkDevice string `json:"jlink-device"`
}
// copyProperties copies all properties that are set in spec2 into itself.
@@ -122,6 +123,9 @@ func (spec *TargetSpec) copyProperties(spec2 *TargetSpec) {
if spec2.OpenOCDTransport != "" {
spec.OpenOCDTransport = spec2.OpenOCDTransport
}
+ if spec2.JLinkDevice != "" {
+ spec.JLinkDevice = spec2.JLinkDevice
+ }
}
// load reads a target specification from the JSON in the given io.Reader. It