Installing FreeRTOS to STM32H7 SOM ST-LINK/V2 Probe
This application note explains how to install FreeRTOS to the STM32H7 System-On-Module using ST-LINK/V2 debugger/programmer.
Refer to Understanding STM32H7 SOM Boot Architecture as a pre-requisite to understanding the installation procedure.
1. Development Host
The following Windows versions and Linux distributions have been explicitly validated by Emcraft:
Fedora CoreOS 31;
Ubuntu 20.04;
Windows 11 with STM32CubeProgrammer v2.16.0.
2. Software Set-Up
The following software set-up is required on the Linux development host, in order to build U-Boot and FreeRTOS:
On the Windows development host:
Install the
STM32CubeProgrammer
application. Go to STM32CubeProg - STMicroelectronics and select the latest version of the application.
On the Linux development host:
Install the
stlink
package.
For Fedora:$ sudo dnf install stlink
For Ubuntu:
$ sudo apt install stlink
3. Hardware Set-Up
The following hardware set-up is required for installation of the software to the STM32H7 SOM:
STM32H7-SOM Rev 1A soldered onto the STM32H7-BSB Rev 1A or STM32H7-BSB Rev 2A baseboard.
The microUSB cable connected to the P1 connector on the baseboard (to provide the STM32H7 serial console to the development host).
The ST-LINK/V2 debugger/programmer connected to the 20-pin P3 ARM JTAG connector on the baseboard.
The following picture illustrates the above hardware set-up for STM32H7-BSB Rev 1A:
The following picture illustrates the above hardware set-up for STM32H7-BSB Rev 2A:
4. Installable Images
The images to be installed onto the STM32H7 SOM can be obtained using one of the two approaches, as follows:
Build the images from the sources, as documented in Building and Running FreeRTOS from Internal Flash using STM32CubeIDE .
Use the prebuilt images provided by Emcraft. The prebuilt images can be found in the location documented in Release Notes.
5. Installing FreeRTOS to Internal Flash Using stlink Package
Step through the following procedure to install FreeRTOS to the internal Flash of the STM32H750 from the Linux development host:
Run
st-info
utility to identify the connected ST-Link probe:$ st-info --probe Found 2 stlink programmers 1. version: V2J29S7 serial: <ST-Link SN> flash: 131072 (pagesize: 131072) sram: 131072 chipid: 0x450 dev-type: STM32H74x_H75x ...
Run
st-flash
to write the FreeRTOS image to the internal Flash of the STM32H750:Verify that FreeRTOS have been successfully installed. Reset the SOM by pressing the S3 button on the carrier board and confirm that the following output appears on the serial UART console:
6. Installing FreeRTOS to Internal Flash using STM32CubeProgrammer
Step through the following procedure to install FreeRTOS to the internal Flash of the STM32H750 from the Windows development host.
Launch the STM32CubeProgrammer application:
Select the appropriate interface (e.g. SWD) and ST-Link/V2 Probe serial number, then click Connect:
Click Open file (the "plus" button) and select the
freertos_stm32h750.bin
file:Click Download and wait for the application to write the image to the internal Flash and verify it:
Verify that FreeRTOS have been successfully installed. Reset the SOM by pressing the S3 button on the carrier board and confirm that the following output appears on the serial UART console: