Skip to content

Commit 342ed72

Browse files
committed
debugger: hotfix for samd platforms 1.8.8 and 1.8.9
1 parent 60109a1 commit 342ed72

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

commands/debug/debug_info.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,20 @@ func getDebugProperties(req *debug.DebugConfigReq, pm *packagemanager.PackageMan
8080
toolProperties.Merge(platformRelease.RuntimeProperties())
8181
toolProperties.Merge(boardProperties)
8282

83+
// HOTFIX: Remove me when the `arduino:samd` core is updated
84+
if !toolProperties.ContainsKey("debug.executable") {
85+
if platformRelease.String() == "arduino:samd@1.8.9" || platformRelease.String() == "arduino:samd@1.8.8" {
86+
toolProperties.Set("debug.executable", "{build.path}/{build.project_name}.elf")
87+
toolProperties.Set("debug.toolchain", "gcc")
88+
toolProperties.Set("debug.toolchain.path", "{runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/")
89+
toolProperties.Set("debug.toolchain.prefix", "arm-none-eabi-")
90+
toolProperties.Set("debug.server", "openocd")
91+
toolProperties.Set("debug.server.openocd.path", "{runtime.tools.openocd-0.10.0-arduino7.path}/bin/openocd")
92+
toolProperties.Set("debug.server.openocd.scripts_dir", "{runtime.tools.openocd-0.10.0-arduino7.path}/share/openocd/scripts/")
93+
toolProperties.Set("debug.server.openocd.script", "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}")
94+
}
95+
}
96+
8397
for _, tool := range pm.GetAllInstalledToolsReleases() {
8498
toolProperties.Merge(tool.RuntimeProperties())
8599
}

0 commit comments

Comments
 (0)