GithubHelp home page GithubHelp logo

stm32freertos's Introduction

STM32 FreeRTOS Library for Arduino

This is a port of FreeRTOS for STM32 as Arduino libraries.

For more information about FreeRTOS, visit the FreeRTOS Web Site. Also, See the very useful Getting Started page.

This library provides 2 FreeRTOS versions:

Each have been modified by ST (See st_readme.txt in FreeRTOS Source).

These are the same provided with the STM32Cube MCU Packages. Or thanks to STMicroelectronics GitHub organization: stm32_mw_freertos.

Configuration

FreeRTOS has several configuration options, which can be specified from within the FreeRTOSConfig.h file.

This library provides a default FreeRTOS configuration file named FreeRTOSConfig_Default.h.

User can provide his own FreeRTOS configuration file at sketch level by adding his configuration in a file named STM32FreeRTOSConfig.h.

Or add extra FreeRTOS configuration to the default at sketch level by adding an extra configuration in a file named STM32FreeRTOSConfig_extra.h.

Heap allocation schemes are provided by FreeRTOS, see Memory allocation implementations included in the RTOS source. To extend those schemes a thread-safe heap allocation using C runtime (Newlib) has been added based on Dave Nadler work:

http://www.nadler.com/embedded/newlibAndFreeRTOS.html

By default, the heap_useNewlib.c is used. It can be changed thanks a define in the configuration file:

/* Define memory allocation implementations to use:
 * 1 to 5 for heap_[1-5].c
 * -1 for heap_useNewlib_ST.c
 * Default -1 see heap.c
 */

Since v10.0.1, CMSIS-RTOSv2 can be used instead of default CMSIS-RTOS.

configUSE_CMSIS_RTOS_V2 has to be defined and set to 1 to use CMSIS-RTOSv2.

Limitations

  • MPU: not supported.
  • No CMSIS-RTOSv2 support provided. It is provided as example.
  • On Cortex-M0 and Cortex-M0+, all IT are disabled between xTaskCreate() and vTaskStartScheduler(). So it is not possible to use IT inbetween, like Serial.print() ... This is the reason why, in example "frLiyLayland", between xTaskCreate() and vTaskStartScheduler(), we use direct printf(), which will access directly USART without interrupt

Files & Configuration

  • STM32FreeRTOS.h : Must always be #include first. It references required include files.
  • STM32FreeRTOSConfig.h : If exist at sketch level, it contains the FreeRTOS configurations.
  • STM32FreeRTOSConfig_extra.h : If exist at sketch level, it contains extra FreeRTOS configurations.
  • FreeRTOSConfig_Default.h : Contains the default FreeRTOS configurations for this STM32 port if STM32FreeRTOSConfig.h doesn't exist.

Test results (using Arduino_Core_STM32)

STM32FreeRTOS v9.0.x

Board AnalogRead_DigitalRead Blink_AnalogRead frBlink frBlinkPrint frJitter frLiuLayland
Nucleo F091RC PASSED PASSED PASSED PASSED PASSED FAILED
Nucleo F103RB PASSED PASSED PASSED PASSED PASSED PASSED
Nucleo F303RE PASSED PASSED PASSED PASSED PASSED PASSED
Nucleo F429ZI PASSED PASSED PASSED PASSED PASSED PASSED
STM32F746G-DISCOVERY PASSED PASSED PASSED PASSED PASSED PASSED
Nucleo L053R8 PASSED* PASSED* PASSED* PASSED* PASSED* FAILED
Nucleo L152RE PASSED PASSED PASSED PASSED PASSED PASSED
B-L475E-IOT01A PASSED PASSED PASSED PASSED PASSED PASSED

STM32FreeRTOS v10.0.x

Board AnalogRead_DigitalRead frBlinkPrint frLiuLayland frBlink (CMSIS-RTOSv2) Blinky (CMSIS-RTOSv2)
Nucleo F091RC PASSED PASSED FAILED PASSED PASSED
Nucleo F103RB PASSED PASSED PASSED PASSED PASSED
Nucleo F303RE PASSED PASSED PASSED PASSED PASSED
Nucleo F429ZI PASSED PASSED PASSED PASSED PASSED
STM32F746G-DISCOVERY PASSED PASSED PASSED PASSED PASSED
Nucleo-G071RB PASSED PASSED FAILED PASSED PASSED
Nucleo H743ZI PASSED PASSED PASSED PASSED PASSED
Nucleo L053R8 PASSED* PASSED* FAILED PASSED PASSED
Nucleo L152RE PASSED PASSED PASSED PASSED PASSED
B-L475E-IOT01A PASSED PASSED PASSED PASSED PASSED
P-Nucleo-WB55RG PASSED PASSED FAILED PASSED PASSED

* PASSED with configUSE_NEWLIB_REENTRANT set to 0 due to small RAM.

STM32FreeRTOS v10.2.x

Board AnalogRead_DigitalRead frBlinkPrint frLiuLayland frBlink (CMSIS-RTOSv2) Blinky (CMSIS-RTOSv2)
Nucleo F091RC PASSED PASSED FAILED PASSED PASSED
Nucleo F103RB PASSED PASSED PASSED PASSED PASSED
Nucleo F303RE PASSED PASSED PASSED PASSED PASSED
Nucleo F411RE PASSED PASSED PASSED PASSED PASSED
STM32F746G-DISCOVERY PASSED PASSED PASSED PASSED PASSED
Nucleo-G071RB PASSED PASSED FAILED PASSED PASSED
Nucleo-G474RE PASSED PASSED FAILED PASSED PASSED
Nucleo H743ZI PASSED PASSED PASSED PASSED PASSED
Nucleo L053R8 PASSED* PASSED* FAILED PASSED PASSED
Nucleo L152RE PASSED PASSED PASSED PASSED PASSED
B-L475E-IOT01A PASSED PASSED PASSED PASSED PASSED
P-Nucleo-WB55RG PASSED PASSED FAILED PASSED PASSED

* PASSED with configUSE_NEWLIB_REENTRANT set to 0 due to small RAM.

STM32FreeRTOS v10.3.1

Board AnalogRead_DigitalRead frBlinkPrint frLiuLayland frBlink (CMSIS-RTOSv2) Blinky (CMSIS-RTOSv2)
Nucleo F091RC (Cortex-M0) PASSED PASSED PASSED PASSED PASSED
Nucleo G071RB (Cortex-M0+) PASSED PASSED PASSED PASSED PASSED
Nucleo F103RB (Cortex-M3) PASSED PASSED PASSED PASSED PASSED
Nucleo L476RG (Cortex-M4) PASSED PASSED PASSED PASSED PASSED
Nucleo H743ZI (Cortex-M7) PASSED PASSED PASSED PASSED PASSED
Nucleo L552ZE-Q (Cortex-M33) PASSED PASSED PASSED PASSED PASSED
Nucleo U575ZI-Q (Cortex-M33) PASSED PASSED PASSED PASSED PASSED

stm32freertos's People

Contributors

abostm avatar danyhm avatar fpistm avatar ivankravets avatar maxgerhardt avatar per1234 avatar ramboerik avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.