In order to allow developers to isolate and target your respective issue, please take some time to select the check boxes below and fill out each of the following items appropriate to your specific problem.
Here is behavior with my STLink V3 connected via USB to my computer. The STM32H473 is not connected.
$ openocd --file Tools/debug/openocd-h7.cfg
Open On-Chip Debugger 0.12.0+dev-g9fcf33da8 (2023-11-15-23:04)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : clock speed 1800 kHz
Error: libusb_open() failed with LIBUSB_ERROR_ACCESS
Error: open failed
Now, you can run as root, and see it gets passed the LIBUSB_ERROR_ACCESS error, hinting to me the USB device did not have right permissions
$ sudo openocd --file Tools/debug/openocd-h7.cfg
[sudo] password for ryan:
Open On-Chip Debugger 0.12.0+dev-g9fcf33da8 (2023-11-15-23:04)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : clock speed 1800 kHz
Info : STLINK V3J8M3 (API v3) VID:PID 0483:3754
Info : Target voltage: 0.001603
Error: target voltage may be too low for reliable debugging
Error: init mode failed (unable to connect to the target)
$ lsusb | grep STLINK
Bus 001 Device 038: ID 0483:3754 STMicroelectronics STLINK-V3
Note below permissions are NOT 0666 as explained in the FAQ.
$ ls -l /dev/bus/usb/001/038
crw-rw-r-- 1 root root 189, 37 Nov 16 08:01 /dev/bus/usb/001/038
Expected/description:
I would expect udev rules to be installed into the right directory such that I do not need to run my debugger as root.
Currently, in the debian, they are installed in /lib/udev, but the FAQ says they need to be in /etc/udev/rules.d/
Doing some further research with man udev, it seems the new directory is OK, however, it doesn't seem to help. Checking the rules, I found it was missing the specific rule for my device (0483:3754). Adding this solved it:
Related Issues
https://github.com/stlink-org/stlink/issues/966
Description
In order to allow developers to isolate and target your respective issue, please take some time to select the check boxes below and fill out each of the following items appropriate to your specific problem.
v1.7.0
debian, however reading docs fromdevelop
on3e18d9d3b73ac954fca6ccc8419ce21dd65bd96f
Steps to reproduce
1) Obtain a Ubuntu 22 computer and STLINk V3 2) Install the latest debian from this repo: https://github.com/stlink-org/stlink#installation 3) Verify with the FAQ the udev files are installed under the right directory: https://github.com/stlink-org/stlink/blob/develop/doc/tutorial.md#a-verify-if-udev-rules-are-set-correctly-by-dave-hylands 4) Observe they are not in the right spot:
Commandline output:
Here is behavior with my STLink V3 connected via USB to my computer. The STM32H473 is not connected.
Now, you can run as root, and see it gets passed the
LIBUSB_ERROR_ACCESS
error, hinting to me the USB device did not have right permissionsNote below permissions are NOT
0666
as explained in the FAQ.Expected/description:
I would expect udev rules to be installed into the right directory such that I do not need to run my debugger as root.
Currently, in the debian, they are installed in
/lib/udev
, but the FAQ says they need to be in/etc/udev/rules.d/
Doing some further research with
man udev
, it seems the new directory is OK, however, it doesn't seem to help. Checking the rules, I found it was missing the specific rule for my device (0483:3754). Adding this solved it: