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 build and run FreeRTOS run-time image for the Emcraft STM32H7 SOM and Starter Kit using STM32CubeIDE.

1. FreeRTOS gits

Emcraft maintains the FreeRTOS sources for the STM32H7 SOM and Starter Kit in the following repository:

The master-1.11.0-cubeide branch contains a project configuration compatible with STM32CubeIDE. This configuration is intended to write the resulting executable binary to the STM32H7 SOM internal Flash and not compatible with the U-Boot boot loader.

2. Software Set-Up

STM32CubeIDE is required on the development host in order to build and debug FreeRTOS. Go to https://www.st.com/en/development-tools/stm32cubeide.html and select the latest version of the IDE. The configuration has been tested with STM32CubeIDE Version 1.14.1 on Windows 11.

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. Adding the FreeRTOS Project to STM32CubeIDE

Run the following step-wise procedure to import FreeRTOS project to STM32CubeIDE:

  1. Create a separate directory and clone the FreeRTOS repository:

    $ mkdir stm32h7-som
    $ cd stm32h7-som
    $ git clone https://gitlab.com/emcraft/STM32H7/STM32CubeH7.git -b master-1.11.0-cubeide
    
  2. Start STM32CubeIDE and select a workspace directory. The workspace directory is an arbitrary directory, different from the directory where your source file is located.

  3. Click File->Open Projects from File System:

    image-20240523-104312.png

  4. Select <STM32CubeH7 path>/Projects/STM32H7_SOM/Applications/FreeRTOS/freertos_stm32h750/SW4STM32/STM32H750-SOM path and click Finish.

5. Building the Project

  1. In Project Explorer double click to the freertos_stm32h750.ioc file to activate the Device Configuration Tool:

    image-20240523-104400.png

  2. Click Project->Generate Code or press Alt-K to generate C-files from the .ioc file.

  3. Click Project->Build Project or press Ctrl-B to start building.

  4. Select the Console tab and check the output:

    image-20240523-104421.png

  5. If needed, find the executable binaries in the Debug subfolder of the FreeRTOS project directory.

6. Debugging the Project

  1. Click the Debug button at the top panel:

    image-20240523-104609.png
  2. Select Remember my decision and switch to the Debug Perspective if prompted:

    image-20240523-104540.png
  3. Wait for the STM32CubeIDE to write the firmware image to the target via ST-Link and stop at the main() function:

    image-20240523-104643.png
  4. Proceed to execute you program with steps, put breakpoints, and examine variables.

7. Known Problems and Limitations

This section lists known problems and limitations of this project configuration.

  1. SDRAM is not supported.

  2. LCD is not supported.

  3. U-Boot environment and reliable upgrade are not available because the U-Boot boot loader has been removed.

  • No labels