Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8ee69b4

Browse files
author
rsora
committedMar 19, 2020
Add interpreter resolution in debug test
1 parent 02b4a02 commit 8ee69b4

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed
 

‎commands/debug/debug_test.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,10 @@ func TestGetCommandLine(t *testing.T) {
4949
Instance: &rpc.Instance{Id: 1},
5050
Fqbn: "arduino-test:samd:arduino_zero_edbg",
5151
SketchPath: sketchPath.String(),
52-
Port: "none",
5352
}
5453

5554
goldCommand := fmt.Sprintf("%s/arduino-test/tools/arm-none-eabi-gcc/7-2017q4/bin//arm-none-eabi-gdb%s", dataDir, toolExtension) +
56-
" -ex target extended-remote |" +
55+
" --interpreter=console -ex target extended-remote |" +
5756
fmt.Sprintf(" %s/arduino-test/tools/openocd/0.10.0-arduino7/bin/openocd%s", dataDir, toolExtension) +
5857
fmt.Sprintf(" -s \"%s/arduino-test/tools/openocd/0.10.0-arduino7/share/openocd/scripts/\"", dataDir) +
5958
fmt.Sprintf(" --file \"%s/arduino-test/samd/variants/arduino_zero/openocd_scripts/arduino_zero.cfg\"", customHardware) +
@@ -67,14 +66,14 @@ func TestGetCommandLine(t *testing.T) {
6766
// Other samd boards such as mkr1000 can be debugged using an external tool such as Atmel ICE connected to
6867
// the board debug port
6968
req2 := &dbg.DebugConfigReq{
70-
Instance: &rpc.Instance{Id: 1},
71-
Fqbn: "arduino-test:samd:mkr1000",
72-
SketchPath: sketchPath.String(),
73-
Port: "none",
69+
Instance: &rpc.Instance{Id: 1},
70+
Fqbn: "arduino-test:samd:mkr1000",
71+
SketchPath: sketchPath.String(),
72+
Interpreter: "mi1",
7473
}
7574

7675
goldCommand2 := fmt.Sprintf("%s/arduino-test/tools/arm-none-eabi-gcc/7-2017q4/bin//arm-none-eabi-gdb%s", dataDir, toolExtension) +
77-
" -ex target extended-remote |" +
76+
" --interpreter=mi1 -ex target extended-remote |" +
7877
fmt.Sprintf(" %s/arduino-test/tools/openocd/0.10.0-arduino7/bin/openocd%s", dataDir, toolExtension) +
7978
fmt.Sprintf(" -s \"%s/arduino-test/tools/openocd/0.10.0-arduino7/share/openocd/scripts/\"", dataDir) +
8079
fmt.Sprintf(" --file \"%s/arduino-test/samd/variants/mkr1000/openocd_scripts/arduino_zero.cfg\"", customHardware) +

‎commands/debug/testdata/custom_hardware/arduino-test/samd/platform.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,4 +228,4 @@ tools.gdb.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/
228228
tools.gdb.cmd=arm-none-eabi-gdb
229229
tools.gdb.cmd.windows=arm-none-eabi-gdb.exe
230230

231-
tools.gdb.debug.pattern="{path}/{cmd}" -ex 'target extended-remote | {tools.openocd.path}/{tools.openocd.cmd} -s "{tools.openocd.path}/share/openocd/scripts/" --file "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "gdb_port pipe" -c "telnet_port 0" -c init -c halt' {build.path}/{build.project_name}.elf
231+
tools.gdb.debug.pattern="{path}/{cmd}" --interpreter={interpreter} -ex 'target extended-remote | {tools.openocd.path}/{tools.openocd.cmd} -s "{tools.openocd.path}/share/openocd/scripts/" --file "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "gdb_port pipe" -c "telnet_port 0" -c init -c halt' {build.path}/{build.project_name}.elf

0 commit comments

Comments
 (0)
Please sign in to comment.