Downloading your Software
- 1 Section 2: Downloading your software
- 2 Notes on downloading software
- 3 The Windows ST-Link drivers
- 4 The Windows ST-Link Utility
- 5 Linux drivers
- 6 Roger Clark's STM32 Software and Tools package
- 7 Roger Clark's bootloader files
- 8 The Arduino IDE software package
- 9 The STM32 boards package for the Arduino IDE
- 10 A final software checklist
- 11 Section 3: Assembling your Software
Section 2: Downloading your software
|The standard Arduino IDE package|
|The ST-Link Windows drivers (please read below before downloading this)|
|The ST-Link utility (please read below before downloading this)|
|Roger Clark's STM32 Software and tools|
|Roger Clark's Black Pill bootloader binary file|
|Roger Clark's Blue Pill bootloader binary file|
Notes on downloading software
Before you start, the ST-Link requires various drivers, which you should install before you plug it in - please read the notes below, then move onto the next section before you install anything though. We download all of the ST software from the STmicroelectronics website. They are the company responsible for manufacturing the chips that power the STM32 and the ST-Link v2 USB adapters. In order to download anything from ST, you are asked either to provide your name and email, so they can email you the download links, or to create an account. Creating an account means that you can easily return later and download additional software without any hassle, and gives you full access to their help forums, so I found it easier in the long run just to create the account and be done with it.
When downloading from ST.com, scroll right down to the bottom of each page and click on the blue Get Software button.
The Windows ST-Link drivers
The Windows ST-Link drivers can be downloaded from here:
Read the ReadMe.txt that comes with the driver for installation instructions (Basically, you need to run the installer with Administration rights for it to install, but see the next section for full details...)
The Windows ST-Link Utility
The Windows ST-Link Utility can be downloaded from here:
(you need to run the installer with Administration rights again for it to install...)
Occasionally, the utility itself fails to get a shortcut on the Start Menu, so you may have to navigate to its folder and double click on it to run it - if this is the case, it is worth pinning it to your start menu. It also occasionally loses focus on its installation or driver install windows (which leaves the window that you need stuck behind one of your other open windows). This means that sometimes you will have to hunt for the installer window during the install.
For Windows users, you will need to download and install both the ST-Link drivers and the ST-Link Utility. The ST-Link Utility actually installs an additional set of drivers, and you need different drivers to let windows recognise the connections on either end of your STM32 board.
The Linux drivers should be directly available using your normal package manger, so just search for stlink. This will install both the ST-Link utility and the USB drivers so that your Arduino IDE can recognise your ST-Link and program your STM32. I installed this and everything "just worked". My Arduino IDE could happily flash sketches using my ST-Link and the Virtual Com Port worked exactly as it should.
Roger Clark's STM32 Software and Tools package
Next, you will need Roger Clark's STM32 Software and Tools package. Roger Clark is one of the key people in the world of STM32 boards. Hidden away inside this download is the command line bootloader flasher. If your board comes without a bootloader, this little program is exactly what you need to get you up and running - and without it, you're not going anywhere...
Roger Clark's bootloader files
You will also need Roger Clark's bootloader files for both the Black Pill and the Blue Pill boards, which can be downloaded here:
Black Pill bootloader binary file
Blue Pill bootloader binary file Extract the main STM32 Software and Tools package to somewhere sensible, then open the folder and navigate to:
..\Arduino_STM32-master\tools\win\stlink where you should see the program ST-LINK_CLI.exe - This is the bootloader flasher, which we may urgently need later (so remember where you left it).
IMPORTANT: Extract both of your two bootloader binary files, and store then in this folder as well.
The Arduino IDE software package
Next, you will need the Arduino IDE software package. You probably have this already, but if not, you can download it here:
The STM32 boards package for the Arduino IDE
Finally, the last and possibly the most important bit of software: the STM32 boards package for the Arduino IDE.
Open your Arduino IDE and open the preferences, then add this URL to the "Additional Board Manager URLs" at the bottom of the Arduino IDE preferences window:
Now go to the Tools menu -> Board -> Boards Manager and wait whilst it updates the listing. Next, type STM into the search field. Click on "STM32 Cores by STMicroelectronics"
Major Gotcha Warning -> in the Select Version dropdown, make sure 1.5.0 is selected
then click the Install button. This will probably take a few minutes to complete as it's over 100Mb in size.
A final software checklist
OK, this is just to double check that you have everything that we will need.
You should have downloaded these:
- The standard Arduino IDE package
- The ST-Link Windows drivers
- The ST-Link utility
- Roger Clark's STM32 Software and tools
- Roger Clark's Black Pill bootloader binary file
- Roger Clark's Blue Pill bootloader binary file
- The "STM32 Cores by STMicroelectronics" Boards installed into the Boards Manager of your Arduino IDE
Section 3: Assembling your Software
Now that we've got our software, we need to install it all and test it Assembling your Software