Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e5685ae

Browse filesBrowse files
committed
Added svd-file debug option
1 parent ae120e9 commit e5685ae
Copy full SHA for e5685ae

File tree

6 files changed

+37
-17
lines changed
Filter options

6 files changed

+37
-17
lines changed

‎commands/debug/debug_info.go

Copy file name to clipboardExpand all lines: commands/debug/debug_info.go
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ func getDebugProperties(req *rpc.GetDebugConfigRequest, pme *packagemanager.Expl
191191
Server: server,
192192
ServerPath: debugProperties.Get("server." + server + ".path"),
193193
ServerConfiguration: &serverConfiguration,
194+
SvdFile: debugProperties.Get("svd_file"),
194195
Toolchain: toolchain,
195196
ToolchainPath: debugProperties.Get("toolchain.path"),
196197
ToolchainPrefix: debugProperties.Get("toolchain.prefix"),

‎internal/cli/debug/debug.go

Copy file name to clipboardExpand all lines: internal/cli/debug/debug.go
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ type debugInfoResult struct {
124124
Server string `json:"server,omitempty"`
125125
ServerPath string `json:"server_path,omitempty"`
126126
ServerConfig any `json:"server_configuration,omitempty"`
127+
SvdFile string `json:"svd_file,omitempty"`
127128
CortexDebugCustomConfig any `json:"cortex-debug_custom_configuration,omitempty"`
128129
}
129130

@@ -163,6 +164,7 @@ func newDebugInfoResult(info *rpc.GetDebugConfigResponse) *debugInfoResult {
163164
Server: info.Server,
164165
ServerPath: info.ServerPath,
165166
ServerConfig: serverConfig,
167+
SvdFile: info.SvdFile,
166168
CortexDebugCustomConfig: cortexDebugCustomConfig,
167169
}
168170
}
@@ -179,6 +181,9 @@ func (r *debugInfoResult) String() string {
179181
t.AddRow(tr("Toolchain type"), table.NewCell(r.Toolchain, green))
180182
t.AddRow(tr("Toolchain path"), table.NewCell(r.ToolchainPath, dimGreen))
181183
t.AddRow(tr("Toolchain prefix"), table.NewCell(r.ToolchainPrefix, dimGreen))
184+
if r.SvdFile != "" {
185+
t.AddRow(tr("SVD file path"), table.NewCell(r.SvdFile, dimGreen))
186+
}
182187
switch r.Toolchain {
183188
case "gcc":
184189
// no options available at the moment...

‎internal/integrationtest/debug/debug_test.go

Copy file name to clipboardExpand all lines: internal/integrationtest/debug/debug_test.go
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ func testAllDebugInformation(t *testing.T, env *integrationtest.Environment, cli
130130
"third"
131131
]
132132
},
133+
"svd_file": "svd-file",
133134
"cortex-debug_custom_configuration": {
134135
"anotherStringParamer": "hellooo",
135136
"overrideRestartCommands": [

‎internal/integrationtest/debug/testdata/hardware/my/samd/boards.txt

Copy file name to clipboardExpand all lines: internal/integrationtest/debug/testdata/hardware/my/samd/boards.txt
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,4 @@ my.debug.cortex-debug.custom.overrideRestartCommands.1=monitor gdb_sync
4343
my.debug.cortex-debug.custom.overrideRestartCommands.2=thb setup
4444
my.debug.cortex-debug.custom.overrideRestartCommands.3=c
4545
my.debug.cortex-debug.custom.anotherStringParamer=hellooo
46+
my.debug.svd_file=svd-file

‎rpc/cc/arduino/cli/commands/v1/debug.pb.go

Copy file name to clipboardExpand all lines: rpc/cc/arduino/cli/commands/v1/debug.pb.go
+27-17Lines changed: 27 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎rpc/cc/arduino/cli/commands/v1/debug.proto

Copy file name to clipboardExpand all lines: rpc/cc/arduino/cli/commands/v1/debug.proto
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ message GetDebugConfigResponse {
9494
// cortex-debug custom JSON configuration, it is provided as is from
9595
// the platform developers.
9696
string cortex_debug_custom_json = 9;
97+
// the SVD file to use
98+
string svd_file = 10;
9799
}
98100

99101
// Configurations specific for the 'gcc' toolchain

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.