Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

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.

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

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
    

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

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 Building and Running FreeRTOS from Internal Flash Using STM32CubeIDE .

  2. Use the prebuilt images provided by Emcraft. The prebuilt images can be found in the location documented in Release Notes.

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:

    $ st-flash --serial <ST-Link SN> --reset write freertos_stm32h750.bin 0x08000000
    st-flash 1.7.0-246-gc721751
    2024-03-28T22:24:47 INFO common.c: STM32H74x_H75x: 128 KiB SRAM, 128 KiB flash in at least 128 KiB pages.
    file freertos_stm32h750.bin md5 checksum: 1ba06518a9735b4e36cb6dec2bf98074, stlink checksum: 0x00777023
    2024-03-28T22:24:47 INFO common_flash.c: Attempting to write 74548 (0x12334) bytes to stm32 address: 134217728 (0x8000000)
    -> Flash page at 0x8000000 erased (size: 0x20000)
    
    2024-03-28T22:24:48 INFO flashloader.c: Starting Flash write for H7
    74548/74548 bytes written
    2024-03-28T22:24:49 INFO common_flash.c: Starting verification of write complete
    2024-03-28T22:24:50 INFO common_flash.c: Flash written and verified! jolly good!
    
  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:

    STM32H7 SOM FreeRTOS CLI, www.emcraft.com
    Type help to view a list of available commands.
    CLI>
    

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:

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

    image-20240523-105930.png
  3. Click Open file (the "plus" button) and select the freertos_stm32h750.bin file:

    image-20240523-110221.png

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

    image-20240523-110001.png

    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:

    STM32H7 SOM FreeRTOS CLI, www.emcraft.com
    Type help to view a list of available commands.
    CLI>
  • No labels