cancel
Showing results for 
Search instead for 
Did you mean: 

Debugging on Linux w/ CubeIDE: udev related error

BStad.1
Associate

When trying to use the debug function in CubeIDE on Linux I get an udev related error. It works most of the time, but at some functions it stops and the debugger drops out. See below for technical details as well as a workaround.

Details

OS: Kubuntu 18.04

Kernel Version: 4.15.0-140-generic

Error in CubeIDE (v1.1.6): `libusb: error [udev_hotplug_event] ignoring udev action bind`

udev Version: 10.45

Board: STEVAL-STWINKT1

Debugger: STLINK-V3MINI

See attached screenshot of syslog and cubeIDE:

0693W000008yN0VQAU.png 

Workouround

Disabling the udev service via systemctl fixes the issue, using this example bash script:

#!/bin/bash
 
#simple script to enable/disable udev
#------------------------------------
#why? gives error when debugging
# THIS IS ONLY A WORKAROUND, NOT A FIX!
#------------------------------------
#How to use:
# (1) connect board and programmer to USB port
# (2) run this script as root with option stop
# (3) ...debug... (note: hotplug, device allocation won't happen anymore)
# (4) run this script as root with option start
 
COMMAND='stop'
 
if [[ $1 != 'start' && $1 != 'stop' ]]; then
    printf "Write either...\nstop\tstop udev and related sockets or\nstart\tstart udev and related sockets\n"
    exit
fi
 
if [[ $1 == 'start' ]]; then
    COMMAND='start'
fi
 
systemctl $COMMAND systemd-udevd-control.socket
systemctl $COMMAND systemd-udevd-kernel.socket
systemctl $COMMAND udev.service

Of course this is only a workaround. In general one does not want to disable udev.

0 REPLIES 0