I'm using Vscode + CMake + arm-none-eabi + openocd to develop in linux. I've trouble migrating this setup to windows. this is the relevant snippet:
{
"version": "0.2.0",
"configurations": [
{
...
"setupCommands": [
...
{ "text": "-file-exec-and-symbols ${command:cmake.launchTargetPath}", "description": "load file", "ignoreFailures": false},
...
],
...
}
...
]
}
${command:cmake.launchTargetPath}
returns a windows path with '\'
delimiter that is interpreted as an escape char when passed as a gdb argument.
"C:\\some\path\output.elf"
is passed as "C:\somepathoutput.elf"
Install Command Variable Extension
Define an input with the transform command to convert backslashes into slashes.
Use the transformed input instead of the original command