Giter Club home page Giter Club logo

Comments (7)

ndabas avatar ndabas commented on June 18, 2024

It looks like you have another openocd.exe somewhere in your PATH or configuration which is being launched instead of the version included with the Pico SDK. The logs say this is the executable: "C:/Users/Michael/DATA/Projects/openocd/openocd.exe".

The pico-env.cmd script that sets up the PATH adds the OpenOCD path to the head of the list so it doesn't get over-ridden by another openocd.exe somewhere else. Do you perhaps have some VS Code configuration that you set up to use your own OpenOCD build?

from pico-setup-windows.

mdrobot7 avatar mdrobot7 commented on June 18, 2024

Yep, I built openocd from source following the setup guide instructions when I originally set up the pico sdk a few years ago. That's the version it's picking up. I didn't realize the setup script cloned and built its own version.

I moved my version of openocd to a different directory, so Powershell shouldn't be able to find it anymore. Running Get-Command openocd in terminal picks up the setup script's version of openocd, and running openocd in terminal gives the standard error output (it's running the setup script's exe). But when I hit F5 to start debugging it tries to launch my version. I checked through the config files in .vscode, nothing looks out of place. How do I force it to use the right path?

I checked PATH btw, my openocd isn't in the User or System path (the script's version is still in the dev environment PATH, checked using ${env:PATH}), so I don't know where it's pulling the path to my version from.

from pico-setup-windows.

ndabas avatar ndabas commented on June 18, 2024

Maybe the OpenOCD path is set in your VS Code user-level settings.json? The debugging is controlled by the cortex-debug extension which might have saved the path to your custom build.

from pico-setup-windows.

mdrobot7 avatar mdrobot7 commented on June 18, 2024

Yep, I found it in my user settings. Should I remove the user-level path altogether or change it?

from pico-setup-windows.

ndabas avatar ndabas commented on June 18, 2024

I think removing the user-level path will be a good idea; if you need to use a different OpenOCD build for a specific project, you can set that in your project-level settings.json: https://github.com/Marus/cortex-debug/blob/master/debug_attributes.md.

from pico-setup-windows.

mdrobot7 avatar mdrobot7 commented on June 18, 2024

Just tested it, it works now. Thanks! Maybe, for the future, warn the user during install that there is another build of openocd present on the system, or see if the project debug config can override the user one, if present?

from pico-setup-windows.

ndabas avatar ndabas commented on June 18, 2024

Great! Yes, we are working on a component which should be able to configure and validate these settings.

from pico-setup-windows.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.