Skip to content

expose openocdPath in launch.json?.. #111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
busticated opened this issue Dec 12, 2018 · 3 comments
Closed

expose openocdPath in launch.json?.. #111

busticated opened this issue Dec 12, 2018 · 3 comments

Comments

@busticated
Copy link

hi there 👋

very similar request as: #51 and for the same reasons as mentioned in #110

would it be possible to expose the openocdPath setting in launch.json as well?

currently, i end up managing the setting at the workspace level on behalf of my users based on other configuration settings. so the flow is like: 1. tweak seemingly unrelated setting 2. update toolchain paths & dependencies 3. set cortex-debug.openocdPath in the .code-workspace file based on steps 1 and 2.

instead, being able to do something like this in launch.json would be nice:

"openocdPath": "${command:extension.getDebuggerOpenOCDPath}",

i'm running:
macOS: 10.13.6 (high sierra)
VSCode: 1.29.1
Cortex Debug: 0.1.21

@Marus
Copy link
Owner

Marus commented Jan 27, 2019

This should be added to the next release

@haneefdm
Copy link
Collaborator

haneefdm commented Jun 23, 2019

@Marus, @busticated I am currently using "serverpath" : "..." and it works! If we document and/or add it to IntelliSense, we are golden.

serverpath is generic to any gdb-server including openocd since we can only use one server at a time.

It is becoming more common to make this (and arm tool chain) project-specific even in my use case.

So, in my launch.json, I use toolchainPath and serverpath and use generic things like ${env:USERPROFILE}/... or ${env:HOME}/... to specify paths.

This is mainly because, in settings.json, we cannot make things OS specific. Also a problem with multi-root VSCode workspaces. Global user settings is also an option... just hard to find and edit.

@haneefdm
Copy link
Collaborator

For every path mentioned for user/workspace settings, there is now a OS-specific setting. This will work better for users using the sync feature. This is also the method used by VSCode itself. I recommend using this mechanism rather than serverpath to keep things portable. From CHANGELOG.md for V0.4.8

Pathnames for gdb-servers can be OS specific. For instance cortex-debug.openocdPath can be suffixed with one of .linux, .osx or .windows. For instance cortex-debug.openocdPath.windows is used only on Windows and if that is missing, it will default looking for cortex-debug.openocdPath`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants