Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit2eba12e

Browse files
committed
[skip-changelog] Added a compatibility trick indebug -I fortoolchain.prefix key (#2428)
* Added a compatibility trick in "debug -I" for toolchain.prefix keyThe key was ignored in older versions of the Arduino IDE.In the upcoming release (Arduino IDE 2.2.2) the key is used, but it waswrongly set to "arm-none-eabi-" when we actually want "arm-none-eabi".This patch ensure backward and forward compatibility.* Fixed debug command
1 parente5f2271 commit2eba12e

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

‎commands/debug/debug.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ func getCommandLine(req *rpc.GetDebugConfigRequest, pme *packagemanager.Explorer
130130
vargdbPath*paths.Path
131131
switchdebugInfo.GetToolchain() {
132132
case"gcc":
133-
gdbexecutable:=debugInfo.ToolchainPrefix+"gdb"
133+
gdbexecutable:=debugInfo.ToolchainPrefix+"-gdb"
134134
ifruntime.GOOS=="windows" {
135135
gdbexecutable+=".exe"
136136
}

‎commands/debug/debug_info.go‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,13 @@ func getDebugProperties(req *rpc.GetDebugConfigRequest, pme *packagemanager.Expl
184184
}
185185
}
186186

187+
// HOTFIX: for samd (and maybe some other platforms). We should keep this for a reasonable
188+
// amount of time to allow seamless platforms update.
189+
toolchainPrefix:=debugProperties.Get("toolchain.prefix")
190+
iftoolchainPrefix=="arm-none-eabi-" {
191+
toolchainPrefix="arm-none-eabi"
192+
}
193+
187194
customConfigs:=map[string]string{}
188195
ifcortexDebugProps:=debugProperties.SubTree("cortex-debug.custom");cortexDebugProps.Size()>0 {
189196
customConfigs["cortex-debug"]=convertToJsonMap(cortexDebugProps)
@@ -196,7 +203,7 @@ func getDebugProperties(req *rpc.GetDebugConfigRequest, pme *packagemanager.Expl
196203
SvdFile:debugProperties.Get("svd_file"),
197204
Toolchain:toolchain,
198205
ToolchainPath:debugProperties.Get("toolchain.path"),
199-
ToolchainPrefix:debugProperties.Get("toolchain.prefix"),
206+
ToolchainPrefix:toolchainPrefix,
200207
ToolchainConfiguration:&toolchainConfiguration,
201208
CustomConfigs:customConfigs,
202209
Programmer:req.GetProgrammer(),

‎docs/UPGRADING.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The string field `server_configuration.script` is now an array and has been rena
1313
"executable":"/tmp/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/Blink.ino.elf",
1414
"toolchain":"gcc",
1515
"toolchain_path":"/home/user/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/",
16-
"toolchain_prefix":"arm-none-eabi-",
16+
"toolchain_prefix":"arm-none-eabi",
1717
"server":"openocd",
1818
"server_path":"/home/user/.arduino15/packages/arduino/tools/openocd/0.10.0-arduino7/bin/openocd",
1919
"server_configuration": {
@@ -2245,7 +2245,7 @@ Now:
22452245
debug.executable={build.path}/{build.project_name}.elf
22462246
debug.toolchain=gcc
22472247
debug.toolchain.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/
2248-
debug.toolchain.prefix=arm-none-eabi-
2248+
debug.toolchain.prefix=arm-none-eabi
22492249
debug.server=openocd
22502250
debug.server.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path}/bin/
22512251
debug.server.openocd.scripts_dir={runtime.tools.openocd-0.10.0-arduino7.path}/share/openocd/scripts/

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

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ message GetDebugConfigResponse {
8080
stringtoolchain=2;
8181
// The toolchain directory
8282
stringtoolchain_path=3;
83-
// The toolchain architecture prefix (for example "arm-none-eabi-")
83+
// The toolchain architecture prefix (for example "arm-none-eabi")
8484
stringtoolchain_prefix=4;
8585
// The GDB server type used to connect to the programmer/board (for example
8686
// "openocd")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp