Home › Forums › Mastering STM32 book support forum › Linux Debian: 3 openocd problems (and 2 solution)
Tagged: debian openocd
- This topic has 6 replies, 2 voices, and was last updated 9 years, 1 month ago by
Carmine Noviello.
-
AuthorPosts
-
February 25, 2016 at 10:32 pm #2095
louis
Participant1. Problem:
When I was in ~/STM32Toolchain/openocd I typed./configure --enable-stlinkand got the error “configure: error, libusb-1.x not found” or something similar.
Solution:
I typedexport PKG_CONFIG_PATH=/usr/include/libusb-1.0, retried and it worked.2. Problem
../src/openocd -f boards/<nucleo_conf_file>.cfgdoes 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>.cfgcommand only works when I am root.
Maybe the configuration I made with./configurewas 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.February 26, 2016 at 6:34 am #2096Carmine Noviello
KeymasterHi 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.
February 26, 2016 at 6:19 pm #2104louis
ParticipantI 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.ddo not forget to type
service udev restartafter every change.d) sometimes i also typed
udevadm control --reload-rulesI have no idea which one did the fix, if somebody knows it, please tell me.
February 26, 2016 at 9:33 pm #2105louis
ParticipantOk, 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.
February 27, 2016 at 8:20 am #2106Carmine Noviello
KeymasterI have to check if I have wrongly reported the filename or in Ubuntu it’s stlink.conf.
September 11, 2016 at 7:19 pm #4425louis
ParticipantHi 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
LouisSeptember 11, 2016 at 7:27 pm #4428Carmine Noviello
KeymasterHi Luis,
Thank you to remember me that. -
AuthorPosts
- You must be logged in to reply to this topic.
