Skip to content

[TRACKING] FreeRTOS Adaption Layer  #11485

@JulianHolzwarth

Description

@JulianHolzwarth

Description

The Goal is to have a freertos adaption layer in RIOT like it is for posix and to have tests for it. In the end you should be able to run a freertos application easily in RIOT, without much (in the best case, no) change.

This will be implemented file by file.
This issue will track all the intermediate pull requests and development.

Rationale

Currently in the esp32 there is a freertos adaption layer
and in pr #11108 that plans to add a freertos adaption layer for esp826.
Because there will be a freertos adaption layer for esp32 and esp8266 it makes sense to factorize it and even put it in sys.

Limitation

  • Esp32 freertos needs some additional functions that's why there still is a freertos folder in esp32.
    • xTaskCreatePinnedToCore fuction is only for esp32 and xTaskGetTickCount function is different for esp32 to not change the behavior.
    • the module should be in IRAM for esp32 (linker script) (performance reasons)
  • Dynamically allocating should not be done in riot
    • there are the same functions in freertos without dynamic allocations, they are just not yet implemented and not used in the freertos adaption layer for esp32
  • Threads cannot be killed by another thread in riot so this implementation cannot either

Breakdown

waiting for #11660 for semaphore take with timeout
waiting for #11977

The files will first be improved with tests for them. And then moved to sys/freertos

Useful links

Freertos website: https://www.freertos.org
freertos in riot esp32: https://github.com/RIOT-OS/RIOT/tree/master/cpu/esp32/freertos,
https://github.com/RIOT-OS/RIOT/tree/master/cpu/esp32/include/freertos

branch i am working on: https://github.com/JulianHolzwarth/RIOT/tree/freertos
freertos implementation in esp8266: #11108
while trying to use mutex timeout lock i found a bug: #11660

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: trackingThe issue tracks and organizes the sub-tasks of a larger effort

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions