Skip to main content

I can't flash my board using DFU or STLink

Symptom(s)

When you try to update a board using DFU or STLink, an error message appears on PlatformiO:

luos_imgluos_img
luos_imgluos_img

Possible explanation

Your USB drivers are not up-to-date on your computer.

Resolution

If you have this problem with an USB Gate board

First thing to check is that the USB cable is properly plugged into the right USB port of your board. You need to use the DFU programming port and not the serial one.

Update your USB driver

You may need to update you USB driver. The process depends on your OS:

Windows

You need to install and run Zadig by following this tutorial on GitHub.

Installing the drivers:

For DFU :

luos_imgluos_img

For STLink :

luos_imgluos_img

PlatformIO's screen after successful driver installation:

luos_imgluos_img
luos_imgluos_img

Linux

You need permissions to access the device for non-root users:

echo 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", GROUP="plugdev", MODE="0666"' > /etc/udev/rules.d/60-luos.rules

MacOS

You need to install libusb:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
brew install libusb

Associated documentation page(s):