⚡ FreeRTOS & ESP32 Dual-Core Embedded Suite · Standalone Offline Edition · ⌂ Master Directory · FreeRTOS Hub · RobotForge · FreeRobotics
RT ESP32 FreeRTOS Guides
Real-Time Operating System Suite

FreeRTOS for ESP32 & Robotics Firmware

Complete offline clones of the internet's premier FreeRTOS tutorials from RandomNerdTutorials, TeachMeMicro, and ControllersTech. Master concurrent tasks, dual-core affinity, mutexes, semaphores, and inter-task queues.

Target: ESP32 / ESP32-S3 Cores: Dual Xtensa LX6 / LX7 (240 MHz) OS: FreeRTOS v10.x SMP IDE: Arduino IDE / PlatformIO

ESP32 Symmetric Multiprocessing (SMP) Architecture

Core 0 (PRO_CPU) ID = 0

Protocol CPU: Handles Wi-Fi 802.11 b/g/n, Bluetooth Low Energy (BLE), and system watchdog interrupts by default.

xTaskCreatePinnedToCore(..., 0);
Core 1 (APP_CPU) ID = 1

Application CPU: Runs the default Arduino loop() task. Ideal for high-speed motor PID loops, sensor fusion, and kinematics.

xTaskCreatePinnedToCore(..., 1);

All 6 Cloned FreeRTOS Tutorials

RANDOM NERD TUTORIALS · 32 CODE SNIPPETS

1. Create Tasks & Dual Core

Learn how to create independent tasks, allocate stack bytes, set priority levels (0 to 24), and bind tasks to Core 0 or Core 1 with xTaskCreatePinnedToCore().

Read Full Guide →
RANDOM NERD TUTORIALS · 20 CODE SNIPPETS

2. Binary & Counting Semaphores

Master task signaling, button ISR interrupts (xSemaphoreGiveFromISR), and resource counting pools so tasks wait without burning CPU cycles.

Read Full Guide →
RANDOM NERD TUTORIALS · 35 CODE SNIPPETS

3. Inter-Task Queues

Pass complex sensor readings, structs, and command packets between multiple producer tasks and consumer tasks safely using thread-safe FIFO queues.

Read Full Guide →
RANDOM NERD TUTORIALS · 14 CODE SNIPPETS

4. Mutex & Shared Resources

Protect shared hardware peripherals (I2C bus, SPI, UART/Serial, OLED displays) and shared memory variables from race conditions and priority inversion.

Read Full Guide →
TEACHMEMICRO · ARCHITECTURE & LIFECYCLE

5. TeachMeMicro: Multitasking

In-depth explanation of FreeRTOS task lifecycle states (Ready, Running, Blocked, Suspended), non-blocking vTaskDelay(), and ESP32 hardware timer ticks.

Read Full Guide →
CONTROLLERSTECH · RTOS THEORY & STEP-BY-STEP

6. ControllersTech: FreeRTOS Series

Foundational real-time operating system concepts: preemptive round-robin scheduling, cooperative scheduling, memory management heaps (Heap_1 to Heap_5).

Read Full Guide →

FreeRTOS C++ Quick Reference Cheat Sheet

Function / Macro Purpose Key Arguments
xTaskCreatePinnedToCore() Spawn a task bound to Core 0 or Core 1 (fn, name, stackBytes, param, priority, handle, coreId)
vTaskDelay(pdMS_TO_TICKS(ms)) Yield CPU to other tasks for specified milliseconds ticksToDelay
vTaskDelete(handle) Terminate and free memory of a task (or NULL for self) taskHandle
xQueueCreate() Allocate a thread-safe message FIFO queue (queueLength, itemSizeBytes)
xQueueSend() / xQueueReceive() Push to and pop from inter-task queue (queue, &item, ticksToWait)
xSemaphoreCreateMutex() Create a mutex lock with priority inheritance none