-
Notifications
You must be signed in to change notification settings - Fork 14
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
Ubuntu VSC OpenOCD debug and SWD flash configured as Windows by default #114
Comments
It looks like the issue is on Ubuntu it can’t find your debug probe - have you set up appropriate udev rules for it to work, as you would for other USB devices on Linux? The extension works out of the box on Rasberry Pi OS, which has the correct udev rules installed, so it does work on Linux environments. |
Yes I have. Would you be able to update me on them to double check that is what I have configured? It works perfectly when I run the openocd command on a terminal (it requires sudo though). |
The .exe doesn't mean its a Windows executable. Actually it's a symlink to the linux binary to have the same path on Windows and other systems. That way your configuration does work cross-platform. What is the output of following commands on your system? groups $(whoami) and cat /etc/udev/rules.d/99-picotool.rules |
Thank you for that clarification, it does make sense now! I'm not experienced much in Linux so please bear with me :) groups $(whoami)
bartolo : bartolo adm dialout cdrom sudo dip plugdev users lpadmin And here is the other one: cat /etc/udev/rules.d/99-picotool.rules
SUBSYSTEM=="usb", \
ATTRS{idVendor}=="2e8a", \
ATTRS{idProduct}=="0003", \
TAG+="uaccess" \
MODE="660", \
GROUP="plugdev"
SUBSYSTEM=="usb", \
ATTRS{idVendor}=="2e8a", \
ATTRS{idProduct}=="0009", \
TAG+="uaccess" \
MODE="660", \
GROUP="plugdev"
SUBSYSTEM=="usb", \
ATTRS{idVendor}=="2e8a", \
ATTRS{idProduct}=="000a", \
TAG+="uaccess" \
MODE="660", \
GROUP="plugdev"
SUBSYSTEM=="usb", \
ATTRS{idVendor}=="2e8a", \
ATTRS{idProduct}=="000f", \
TAG+="uaccess" \
MODE="660", \
GROUP="plugdev" much appreciated your help! |
You need to add a rules entry to that file for idProduct=000C, just copy one of those entries and change the idProduct. You’ll need to reboot after changing the file for the changes to take effect. |
Or alternatively copy the openocd rules file to that directory - you can find an example at https://github.com/raspberrypi/openocd/blob/sdk-2.0.0/contrib/60-openocd.rules |
Thank you for the help Will. ls /etc/udev/rules.d/
10-my-usb.rules 70-snap.canonical-livepatch.rules 70-snap.snapd-desktop-integration.rules 99-cmsis-dap.rules
52-digilent-usb.rules 70-snap.firefox.rules 70-snap.snapd.rules 99-picotool.rules
60-openocd.rules 70-snap.firmware-updater.rules 70-snap.snap-store.rules You won't believe how frustrating it has been. Since I installed it, I only made it work by running externally OpenOCD with the command. BTW: I couldn't get the Pico2 to work with OpenOCD command despite using the right cfg file for rp2350. My only recommendation, ask is:
Thank you for your help! |
I have a dual boot machine with Windows and Ubuntu.
Under Windows (Win 11 pro), I can successfully configure, debug and flash via SWD into a Pico and a Pico2.
Now, under Ubuntu, I can't make it work out of the box despite following all the instructions. I can only get the debug functionality working for the Pico Debug (Cortex Debug with external OpenOCD) only and if I modify the Flash Task.JSON I can get to work the Flash over SWD.
When I look at the tasks.json or the launch.json files when building an out of the box standard Hello Word program, I can see that all the configuration is by default as a Windows machine, not for OpenOCD in a Linux environment
launch.json
tasks.json
Attached are the examples files.
Below is the output of the terminal when executing the SWD flash:
Is there any specific way of installing the extension under Ubuntu to get recognised as a Linux environment and get the debug and SWD capability to work out of the box like in Windows?
Thank you
The text was updated successfully, but these errors were encountered: