pico-project-generator icon indicating copy to clipboard operation
pico-project-generator copied to clipboard

Backslashes in compilerPath aren't escaped in VSCode JSON (Windows)

Open jpbloom opened this issue 2 years ago • 2 comments

The compilerPath populated in c_cpp_properties.json can cause a parsing error to be thrown in VSCode due to unescaped backslashes.

eg.,

"compilerPath": "C:\Program Files (x86)\Arm GNU Toolchain arm-none-eabi\12.2 rel1\bin\arm-none-eabi-gcc.EXE",

will fail, but

"compilerPath": "C:\\Program Files (x86)\\Arm GNU Toolchain arm-none-eabi\\12.2 rel1\\bin\\arm-none-eabi-gcc.EXE",

Is fine. Also, converting to forward slashes in the path works.

Might be particular to how certain system configs get the toolchain added to the system environment variables / PATH? Not sure, I'm a bit new to this toolchain.

Current workaround is to manually edit the JSON and then use CMake: Delete Cache and Reconfigure.

jpbloom avatar Feb 12 '23 22:02 jpbloom