I’ve been meaning to pick up a micro-controller and work on it again. About 5 years ago when I first encountered Arduino, I spent sleepless night learning about it, and creating things from DIY weather station, world clock, light sensor, etc. Fast forward to the current days, I almost forgot everything I learned. But we can always re-learn, or can’t we?

Tonight, I found an Stm32 Nucleo F401RE micro-controller, and I want to start by updating the firmware on it (admittedly, this is the easiest thing to do). ST provides a tool called STW-LINK007, which can be freely downloaded from its website, to flash the firmware on a range of its micro-controllers. I have also written a blog post to update a similar micro-controller, STM32F4-Discovery, in the past.

I’m going to document how to flash the firmware on this Nucleo F401RE on Fedora 32 machine.

First download the STSW-LINK007 from https://www.st.com/en/development-tools/stsw-link007.html. Note that ST requires us to supply name and email address to generate a download link. After the file, en.stsw-link007_V2-37-26.zip is downloaded, we can extract it:

➜ unzip en.stsw-link007_V2-37-26.zip
Archive:  en.stsw-link007_V2-37-26.zip
   creating: stsw-link007/

Next, we need to setup the Udev rule so that the micro-controller board gets recognized when it’s plugged into the computer.

➜ cd stsw-link007/AllPlatforms/StlinkRulesFilesForLinux
➜ sudo dnf localinstall st-stlink-udev-rules-1.0.2-2-linux-noarch.rpm
➜ sudo udevadm control --reload-rules
➜ sudo udevadm trigger

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

➜ cd ..
➜ ls
native  StlinkRulesFilesForLinux  STLinkUpgrade.jar
➜ java -jar STLinkUpgrade.jar

The STLinkUpgrade 3.3.4 program pops up.

screenshot of STLinkUpgrade 3.3.4

Click on Open in update mode button. The Upgrade button will be active.

screenshot of STLinkUpgrade 3.3.4

Click on Update button…

screenshot of STLinkUpgrade 3.3.4

…and wait. Finally, when the firmware finishes flashing, the Nucleo board will restarted it self.

screenshot of STLinkUpgrade 3.3.4

We can verify from the above picture that the Nucleo now has firmware version: V2J27M26.