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.
This commit is contained in:
Ayke van Laethem
2020-01-10 17:02:30 +01:00
committed by Ron Evans
parent ef4ede43d1
commit 6841f9e245
2 changed files with 33 additions and 3 deletions
+4
View File
@@ -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