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_img
luos_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_img

For STLink :

luos_img

PlatformIO's screen after successful driver installation:

luos_img
luos_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):