Difference between revisions of "Downloading your Software"

From The Relativty Wiki
(Marked this version for translation)
(added version 1.5.0 requirement to STM32 Cores in Arduino IDE)
 
Line 94: Line 94:
  
 
<!--T:26-->
 
<!--T:26-->
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"''' & click the Install button. This will probably take a few minutes to complete as it's over 100Mb in size.
+
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.
 
</translate>
 
</translate>
  
 
[[File:Boardsmgrstm32.png|center|<translate><!--T:27--> Boards Manager STM32 install</translate>]]
 
[[File:Boardsmgrstm32.png|center|<translate><!--T:27--> Boards Manager STM32 install</translate>]]
 
<translate>
 
<translate>
 +
 
== A final software checklist == <!--T:28-->
 
== A final software checklist == <!--T:28-->
  

Latest revision as of 21:00, 9 July 2019

Other languages:
English

Section 2: Downloading your software[edit]

Required 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[edit]

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[edit]

The Windows ST-Link drivers can be downloaded from here:
https://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-utilities/stsw-link009.html
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[edit]

The Windows ST-Link Utility can be downloaded from here:
https://www.st.com/en/development-tools/stsw-link004.html
(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.


Linux drivers[edit]

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[edit]

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[edit]

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[edit]

Next, you will need the Arduino IDE software package. You probably have this already, but if not, you can download it here:
https://www.arduino.cc/en/Main/Software

The STM32 boards package for the Arduino IDE[edit]

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:

https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json

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.

Boards Manager STM32 install

A final software checklist[edit]

OK, this is just to double check that you have everything that we will need.
You should have downloaded these:


Section 3: Assembling your Software[edit]

Now that we've got our software, we need to install it all and test it Assembling your Software