Robert
Robert

Reputation: 1

launch.json program only supports absolute path

After searching searching searching, trying trying trying, I'm a little bit lost and politely ask for help.

In a project from NXP example code for VS Code, I managed to get the debugger going and everything works fine.

BUT: in the launch.json, there is the property of "program" to set the compiled *.elf file for downloading. And this path is only accepted, if it is declared as an absolute path! This is extremely annoying!

Fun fact: the property of "miDebuggerPath" and also "cwd" accepts the variables "${toolchainPath}" and "${workspaceFolder}" and also some defined via environment variables (I really tried a looooot). Only "program" seems not to accept any variables to change it to the current workspace or project folder.

The error I get is:

enter image description here

Can somebody please give me a hint for at least?

First: I searched for relative paths (all google), and even on the VSCode community site, it says ${workspaceFolder} and similar shall work. Which is not.

Second: I tried myself environment variables, internal variables and so on, nothing worked, but ONLY for the program property, the other properties work with them!

Third: I tried to copy the *.elf file in every folder within the project, just in case I am assuming the wrong ${workspaceFolder}, still not working.

Upvotes: 0

Views: 39

Answers (0)

Related Questions