Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ $ sudo openocd -f interface/cmsis-dap.cfg -f target/rp2040.cfg -c "adapter spee

NOTE: When you use the Debug Probe to upload a binary the ELF version of the file is used, not the UF2 file that you would use when you drag-and-drop.

On linux you might be able to run `openocd` without `sudo` depending on your distribution. If it doesn't work without `sudo` you can add a udev rule, e.g. add the following to `/etc/udev/rules.d/51-usb-perms.rules` and reload your udev rules with `sudo udevadm control --reload ; sudo udevadm trigger`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

linux->Linux


----
SUBSYSTEM=="usb", ATTR{idVendor}=="0a5c", ATTR{idProduct}=="000c", GROUP="plugdev", MODE="0660"
----
Comment on lines +17 to +21
Copy link
Contributor

@nathan-contino nathan-contino Feb 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
On linux you might be able to run `openocd` without `sudo` depending on your distribution. If it doesn't work without `sudo` you can add a udev rule, e.g. add the following to `/etc/udev/rules.d/51-usb-perms.rules` and reload your udev rules with `sudo udevadm control --reload ; sudo udevadm trigger`
----
SUBSYSTEM=="usb", ATTR{idVendor}=="0a5c", ATTR{idProduct}=="000c", GROUP="plugdev", MODE="0660"
----
[TIP]
====
If this command requires `sudo`, you can remove the `sudo` requirement by adding the following udev rule to `/etc/udev/rules.d/51-usb-perms.rules`:
----
SUBSYSTEM=="usb", ATTR{idVendor}=="0a5c", ATTR{idProduct}=="000c", GROUP="plugdev", MODE="0660"
----
Reload your udev rules with `sudo udevadm control --reload ; sudo udevadm trigger`. You should now be able to run `openocd` without `sudo`.
====

Suggestion: move this to an admonition block, since it's not part of the standard instruction flow. Streamline the wording a bit. Some minor changes to follow the documentation style guide, e.g. introducing code blocks with a colon and a clear description.

NOTE: we should probably merge #3523 first because it's big, important, and this PR could introduce merge conflicts since there's lot of scattered renaming in the same file edited in this PR.


=== Debugging with SWD

It’ll also let you use `openocd` in server mode, and connect GDB, which gives you break points and “proper” debugging.
Expand Down