Amazon FreeRTOS#

Safe, non-overflowing OS abstractions & wrappers for FreeRTOS

Pigweed’s FreeRTOS integration provides a suite of abstractions and helpers designed to make developing C++ applications on FreeRTOS safer, more robust, and fully compatible with Pigweed’s portable facades.

  • Safer mutexes & compile-time lock safety: Prevents undefined behavior by asserting against use in interrupt contexts and detecting recursive locks at runtime. Additionally, Pigweed’s sync primitives support Clang’s thread-safety analysis annotations, enabling compile-time detection of data races and incorrect lock ordering—which raw C-based FreeRTOS mutexes cannot support.

  • Robust timers & clocks: Avoids 32-bit tick overflows and eliminates software timer deletion race conditions common in native FreeRTOS software timers.

  • Optimal notifications: Consumes task notifications directly inside the TCB, avoiding the static RAM and handle overhead required by native FreeRTOS binary semaphores.

Advantages & differences

Learn how Pigweed’s wrappers improve safety, catch bugs at compile-time or runtime, and compare directly with raw FreeRTOS APIs.

Advantages & differences
Setup

Integrate FreeRTOS with GN, CMake, or Bazel, configure target parameters, and set up necessary custom runtime hook functions.

Setup

Modules#

The following table lists all modules related to Amazon FreeRTOS.

Name

Status

Description

Languages

pw_chrono_freertos

stable

pw_interrupt_freertos

experimental

pw_malloc_freertos

stable

pw_sync_freertos

stable

pw_thread_freertos

stable