Tools installation and first test 45min
Target description
Teach how to install the main tools for programming the STM32:
- STM32CubeMX, a tool to set and graphically program all STM32 boards and products
- STM32CubeIDE, the free IDE to develop the STM32 software
- STM32CubeProg, a tool to load/spy software in the STM32 memory
- STM32CubeL4, an STM32L4 MCU software package with embedded examples
Having completed this tutorial, you should be able to open the STM32 professional ecosystem.
You should also manage to bring applications from the ecosystem onto the NUCLEO board.
Finally, you will be able to run the blinking LED example in debug mode.
Prerequisites
- Computer with Windows 7 (or higher)
- Java installed
- web access
Hardware
- NUCLEO-L476RG[1] board (64-pin)
- USB Type-A to Mini-B cable
1. Install STM32CubeMX
10min
STM32CubeMX is the tool to grapically program the STM32.
- Download STM32CubeMX[2]
- Register on www.st.com web site if necessary.
- Unzip the downloaded file and launch the SetupSTM32CubeMX-xxx corresponding to your OS.
STM32CubeMX is now installed on your computer.
2. Install STM32CubeIDE
10min
STM32CubeIDE is the Integrated Development Environment to develop STM32 software.
- Download STM32CubeIDE[3]
- Register on www.st.com web site if necessary.
- Unzip the downloaded file and launch the STM32CubeIDE-xxx corresponding to your OS.
STM32CubeIDE is now installed on your computer, enjoy!
3. Install STM32CubeProg
5min
STM32CubProgrammer is a tool load/spy software in STM32.
- Download STM32CubeProg[4]
- Unzip the downloaded file and launch the SetupSTM32CubeProgrammer-xxx.exe corresponding to your OS, and follow the instructions.
STM32 USB driver and STM32CubeProg are now installed on your computer.
4. Download STM32CubeL4 Firmware package
10min
STM32Cube MCU Package for STM32L4 Series and STM32L4 Plus Series.
- Open STM32CubeMX
- Click Manage embedded software packages in Help
- Check the last STM32CubeL4 release version
- Click Install (it may take a long time)
- Now STM32L4 libraries and examples are installed at the following location C:\Users\myname\STM32Cube\Repository\STM32Cube_FW_L4_Vx.xx.x.
5. Launch STM32CubeIDE in debug mode and run my first program
- Launch STM32CubeIDE
- If STM32CubeIDE asks, select the default workspace
- In File STM32CubeIDE menu, click on Open Projects from File System
- In the window, click Directory and select C:\Users\myname\STM32Cube\Repository\STM32Cube_FW_L4_Vx.xx.x\Projects\NUCLEO-L476RG\Examples_LL\GPIO\GPIO_InfiniteLedToggling
- Select the project GPIO_InfiniteLedToggling\SW4STM32\STM32L476RG_NUCLEO
- Accept the popup, asking for conversion.
Now your project is under STM32CubeIDE
- Default STM32CubeIDE settings are adequate for this tutorial
- Click on Debug icon to launch and debug the project
- Please ensure to click on “Shared ST-Link” option on Debug configurations and Debugger tab
- Click Resume icon to continue the program execution
Now you are able to:
- find STM32 libraries
- open a project (example)
- load a project in STM32CubeIDE
- execute a project in debug mode
- make a LED blink
Now you have in your computer:
- libraries for STM32L4
- examples for STM32L4
- STM32CubeProg (to communicate with the MCU)
- STM32CubeMX (to graphically generate your project)
- STM32CubeIDE (to code)
6. References