Not too long ago, upgrading firmware on STM32F4-Discovery board required it to be performed on a Windows machine. That annoyed the heck a lot of people, myself included.

There’s a very good news for Linux and Mac users. Now, you can do it from your favorite OSes. Since I’m so excited about this, here’s a short article on how to do just that.

First download “STSW-LINK007” from . At the time of this writing the file is called: stsw-link007.zip.

$ unzip stsw-link007.zip
$ tr tree -L 2 .
├── AllPlatforms
│   ├── native
│   ├── StlinkRulesFilesForLinux
│   └── STLinkUpgrade.jar
├── readme.txt
├── stsw-link007.zip
└── Windows
    ├── ST-LinkUpgrade.exe
    └── STLinkUSBDriver.dll

4 directories, 5 files

Let’s set up the udev rules so that your microcontroller board gets recognized when it’s plugged into the computer.

Copy StlinkRulesFilesForLinux/49-stlinkv2-1.rules to /etc/udev/rules.d/, and then either reboot or run:

$ sudo udevadm control --reload-rules
$ sudo udevadm trigger

Plugin the STM32F4-Discovery, and run STLinkUpgrade.jar program:

$ cd AllPlatforms
$ java -jar STLinkUpgrade.jar
STLinkUpgrade running on Kubuntu 14.04.

STLinkUpgrade running on Kubuntu 14.04.

The current firmware on board is: V2J14S0, and it can be upgraded to V2J25S0. Click on Upgrade and wait:

Fimrware successfully upgraded.

Firmware successfully upgraded.

This methods might work for other STM32 boards such as STM32 Nucleo, though I haven’t tried it yet.