- This topic has 6 replies, 2 voices, and was last updated 8 years, 3 months ago by .
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
- You must be logged in to reply to this topic.
Home › Forums › Mastering STM32 book support forum › Linux Debian: 3 openocd problems (and 2 solution)
Tagged: debian openocd
1. Problem:
When I was in ~/STM32Toolchain/openocd I typed ./configure --enable-stlink
and got the error “configure: error, libusb-1.x not found” or something similar.
Solution:
I typed export PKG_CONFIG_PATH=/usr/include/libusb-1.0
, retried and it worked.
2. Problem
../src/openocd -f boards/<nucleo_conf_file>.cfg
does not work for me.
Solution:
On my Installation, it is ../src/openocd -f board/<nucleo_conf_file>.cfg
, “board” without an “s”.
3. Problem
I made the stlink.conf file and saved it under /etc/udev/rules.d, but the ../src/openocd -f board/<nucleo_conf_file>.cfg
command only works when I am root.
Maybe the configuration I made with ./configure
was different than yours, so I think I have to either reconfigure openocd differently and reinstall it or find another way to give it libusb access.
I emailed you the output of ./configure
.
Hi Louis.
Thank you for reporting this feedback.
I haven’t tested instructions on other Linux distros, so this feedback can help other people using Debian.
I found a solution for the 3. Problem!
I did 4 different things and I do not know which one did the fix, so I present all.
a) In the file /etc/udev/rules.d/stlink.conf I deleted the "SUBSYSTEM=="usb",
b) I renamed the file stlink.conf to stlink.rules
c) I copied STM32Toolchain/openocd/contrib/99-openocd.rules to /etc/udev/rules.d
do not forget to type service udev restart
after every change.
d) sometimes i also typed udevadm control --reload-rules
I have no idea which one did the fix, if somebody knows it, please tell me.
Ok, the only wrong information in the book is that it has to be named stlink.rules and not stlink.conf, all the rest was correct. So it is only method “b)” from last post.
I have to check if I have wrongly reported the filename or in Ubuntu it’s stlink.conf.
Hi Carmine
I just switched to Ubuntu and reinstalled everything. Now I know for sure that it is stlink.rules and not stlink.conf
Best regards
Louis
Hi Luis,
Thank you to remember me that.