...
Emcraft provides a FreeRTOS BSP specifically ported, optimized and otherwise enhanced for the STM32H750 system-on-module. The FreeRTOS BSP is based on FreeRTOS V10.3.1. This version of FreeRTOS is available for download from the following location: https://github.com/FreeRTOS/FreeRTOS/tree/V10.3.1 . FreeRTOS source files are located in the following sub-tree: Middlewares/Third_Party/FreeRTOS
.
1.2. STM32Cube HAL
The integral part of the FreeRTOS BSP is the ST's STM32CubeH7 software, which is integrated (linked together) with the FreeRTOS BSP build. STM32CubeH7 provides a HAL (Hardware Abstraction Layer) as well as device drivers and software APIs for various I/O interfaces of the STM32H7.
In the FreeRTOS source tree, the STM32CubeH7 HAL component resides in the following sub-tree: Drivers/STM32H7xx_HAL_Driver
.
2. FreeRTOS Demo Application
...
In the FreeRTOS source tree, the FreeRTOS demo application resides in the following sub-tree: Projects/STM32H7_SOM/Applications/FreeRTOS/freertos_stm32h750
.
2.2. FreeRTOS Demo App Tasks
...
Thread | Location in Source Tree | Comments |
Main Thread |
| Main FreeRTOS thread, which starts the other threads, and then runs the FreeRTOS CLI (Command Line Interface) on the serial console |
WDT Thread |
| Strobes the WDT |
LED Thread |
| Blinks the on-module and on-carrier LEDs |
Push-Buttons Thread |
| Monitors the on-carrier user buttons; when a button has been pressed or released, reports the push-button state change |
Timer Thread |
| Counting number of Timer interrupts |
GUI Thread |
| Implements a GUI interface on the LCD display, with touch screen, using the UI stack |
WiFi Thread |
| Implements a sample TCP server utilizing the WiFi ESP Click board, using the WiFi ESP Click driver |
...
The U-Boot loader makes use of the bootcmd
environment variable to automatically execute commands during startup. The default value of bootcmd
is implemented in such a way that the FreeRTOS application image is loaded from QSPIFlash and started by calling the FreeRTOS app entry point.
...
The default configuration of the FreeRTOS BSP is to run from external SDRAM of the STM32H7 module. To achieve that, the FreeRTOS BSP must be be linked using the freertos_stm32h750_sdram.ld
script.
In this configuration, the FreeRTOS BSP makes use of external SDRAM, as follows:
...
Section | Description | Location and Size |
| FreeRTOS code |
|
| FreeRTOS read-only data |
|
| FreeRTOS initialized read-write data |
|
| FreeRTOS non-initialized read-write data |
|
Stack | FreeRTOS stack |
|
Task Stack | FreeRTOS task stack |
|
Heap | FreeRTOS heap |
|
UBIFS ABI table | Table of UBI/UBIFS ABI entry points provided by U-Boot for RTOS |
|
4.2. Running FreeRTOS BSP from Internal SRAM
Another supported option is to run the FreeRTOS BSP out of internal SRAM. In this option, the FreeRTOS BSP and demo application make use of the internal SRAM of the STM32H7 to perform critical OS code and store OS data. The internal SRAM has L1-cache level performance, it is the fastest memory that is available on the STM32H750 System-on-Module. To achieve this option, the FreeRTOS BSP must be be linked using the freertos_stm32h750_sram.ld
script.
The FreeRTOS BSP makes use of the following SRAM regions:
Code Block |
---|
DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K |
...
RAM_D1 (xrw) : ORIGIN = 0x24000000, LENGTH = 512K |
Allocation of the logical FreeRTOS software sections in SRAM is as follows:
Section | Description | Location and Size |
| FreeRTOS code |
|
| FreeRTOS read-only data |
|
| FreeRTOS initialized read-write data |
|
| FreeRTOS non-initialized read-write data |
|
Stack | FreeRTOS stack |
|
Task Stack | FreeRTOS task stack |
|
Heap | FreeRTOS heap |
|
UBIFS ABI table | Table of UBI/UBIFS ABI entry points provided by U-Boot for RTOS |
|
Additionally, the FreeRTOS BSP makes use of external SDRAM, as follows:
...
Command | Description | Comments |
| Write a certain |
...