Skip to content

Commit 4d20a25

Browse files
pillo79cmaglie
andcommitted
fix: debugging requires a non empty debug.executable (arduino#2439)
* fix: debugging requires a non empty debug.executable * Updated docs --------- Co-authored-by: Cristian Maglie <[email protected]>
1 parent 5b2f729 commit 4d20a25

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

Diff for: commands/debug/debug_info.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ func getDebugProperties(req *rpc.GetDebugConfigRequest, pme *packagemanager.Expl
155155
}
156156
}
157157

158-
if !debugProperties.ContainsKey("executable") {
158+
if !debugProperties.ContainsKey("executable") || debugProperties.Get("executable") == "" {
159159
return nil, &arduino.FailedDebugError{Message: tr("Debugging not supported for board %s", req.GetFqbn())}
160160
}
161161

Diff for: docs/UPGRADING.md

+2
Original file line numberDiff line numberDiff line change
@@ -2264,6 +2264,8 @@ debug.server.openocd.scripts_dir={runtime.tools.openocd-0.10.0-arduino7.path}/sh
22642264
debug.server.openocd.script={runtime.platform.path}/variants/{build.variant}/{build.openocdscript}
22652265
```
22662266
2267+
The `debug.executable` key must be present and non-empty for debugging to be supported.
2268+
22672269
The `debug.server.XXXX` subkeys are optional and also "free text", this means that the configuration may be extended as
22682270
needed by the specific server. For now only `openocd` is supported. Anyway, if this change works, any other kind of
22692271
server may be fairly easily added.

Diff for: docs/platform-specification.md

+3
Original file line numberDiff line numberDiff line change
@@ -1369,12 +1369,15 @@ to provide some debug configuration directives.
13691369
All the debug directives are grouped under the `debug.*` directives. Here is the complete list of the supported
13701370
directives:
13711371

1372+
- `debug.executable`: is the absolute path to the compiled binary of the sketch
13721373
- `debug.toolchain`: is a unique identifier of the required toolchain, currently we support `gcc` (and compatible) only
13731374
- `debug.toolchain.path`: is the absolute path to the toolchain directory
13741375
- `debug.toolchain.prefix`: is the prefix of the toolchain (for example `arm-none-eabi-`)
13751376
- `debug.server`: is a unique identifier of the required debug server, currently we support only `openocd`
13761377
- `debug.svd_file`: is the absolute path to the SVD descriptor.
13771378

1379+
If the `debug.executable` property is not present or is empty debugging will not be allowed.
1380+
13781381
OpenOCD server specific configurations:
13791382

13801383
- `debug.server.openocd.path`: is the absolute path to the OpenOCD directory

0 commit comments

Comments
 (0)