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 https://voxelbotics.atlassian.net/wiki/spaces/DOC/pages/298909698 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:

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:

image-20240523-104217.png

The following picture illustrates the above hardware set-up for STM32H7-BSB Rev 2A:

image-20240523-104236.png

4. Installable Images

The images to be installed onto the STM32H7 SOM can be obtained using one of the two approaches, as follows:

  1. Build the images from the sources, as documented in https://voxelbotics.atlassian.net/wiki/spaces/DOC/pages/300515350 .

  2. 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:

  1. 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 ...
  2. Run st-flash to write the FreeRTOS image to the internal Flash of the STM32H750:

  3. 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.

  1. Launch the STM32CubeProgrammer application:

  2. Select the appropriate interface (e.g. SWD) and ST-Link/V2 Probe serial number, then click Connect:

  3. Click Open file (the "plus" button) and select the freertos_stm32h750.bin file:

  4. Click Download and wait for the application to write the image to the internal Flash and verify it:

  5. 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: