FreeRTOS – A Real-Time Operating System in Theory and Practice

FreeRTOS – A Real-Time Operating System in Theory and Practice

3-day training class

The course content could be tailored to better suit your needs and objectives. If time permits consulting during the training can be included. Please click the public tab to see the public sessions.

Private online
Onsite at your premises
We'll never share your email with anyone else.
Pick Quarter Quarter Status Access Delivery Location Language Timezone Book Until
2nd quarter 2024 private remote virtual German/English (to be defined) UTC+2 (to be defined) Jul 01, 2024
3rd quarter 2024 private remote virtual German/English (to be defined) UTC+2 (to be defined) Oct 01, 2024
4th quarter 2024 private remote virtual German/English (to be defined) UTC+2 (to be defined) Jan 01, 2025

Content as described below. Starting from three attendees from the same company please check our private sessions.

Public online
Public workshop in classroom
We'll never share your email with anyone else.
Pick Date Date Status Access Delivery Location Language Timezone Book Until
Aug 12, 2024 public remote virtual German/English (to be defined) UTC+2 Jul 17, 2024
Oct 28, 2024 public remote virtual German/English (to be defined) UTC+2 Sep 02, 2024

From bare metal C to an industry grade Open Source Real-Time Operating System.

Course Objectives

A “know-how upgrade” for a bare-metal microcontroller C programmer to an industry-grade Open Source real-time operating system.

  • What are the advantages?
  • What is the trade-off?

Hands-on exercises provide you with the necessary practical experience to go ahead and use a real-time operating system with your own embedded system after successfully completing this training.


This 3-day class illustrates the concepts of a real-time operating system. FreeRTOS will be used as an example. It is designed to bring you quickly up to speed. The concepts and commands necessary to make effective use of FreeRTOS are described through a combination of theory and practical examples. Don’t reinvent the wheel, but learn from an experienced trainer and take home a working knowledge of FreeRTOS and the ability to use it effectively in your own embedded development project.


  • depending on host
    • basic familiarity with using a GNU/Linux system as an end-user
    • (Trainer will use Ubuntu as a host system)
  • basic C programming knowledge

Course Roadmap

Who should attend?

People with interest in or tasked with the development of a resource-constrained real-time system like software engineers, field engineers, (project) managers,. . .

Course Outline

Day 1


  • Introduction | Licensing | FreeRTOS Licensing | Real-Time Intro (Time/Utility functions | What is real-time? | Determinism | What is hard real-time?) | RTOS vs. Linux | IDE/Board

Task Management

  • Intro (What is a task? | Task creation)
    • Example01 – crude loop
    • Example02task parameters
    • Example03task priorities (starvation)
    • Example04vTaskDelay() (idle task)
    • Example05vTaskDelayUntil()
    • Example06 – “continuous processing” and vTaskDelayUntil()
    • Example07idle hook
    • Example08 – play with priorities
    • Example09task delete
  • Scheduling (What’s an OS? | What’s a task? | What’s a scheduler?)
  • Schedulers (loop | cyclic executives | limitations of cyclic executives | manual preemption | with interrupts | non-/preemptive | prioritized preemptive | rate monotonic | deadline | cooperative | hybrid)

Queue Management

  • Intro (What is a queue? | Queue as a data type) | Queue Management (Data storage | Accessed by multiple tasks | blocking on read/write | Inter Task Communication | Example Queue Access)
    • Example10 – queue send/receive (Client/Server pattern)
    • Example11 – queues/idle task
  • Working with Large Data | Message Passing Generic (Indirect/Direct Synchronous/Asynchronous)

Day 2

Interrupt Management

  • Intro (Interrupt vs. Polling | How does an Interrupt work? | Hardware/Software Interrupts | What if two interrupts arrive at the same time? | Program Sections | What is reentrant code? | What is an event? | What kind of “events” do you know?)
  • Concurrency Intro
    • Semaphores Intro (Mutual exclusion | Synchronization) | Mutex vs. Synchronization | Sempahore Types (Signal/Wait Pattern | Binary Semaphore | FreeRTOS Binary Semaphore | Counting Semaphore)
  • Events Intro | Interrupt Handlers | Interrupt Processing (Deferred) | Synchronize a Task with an “Interrupt”
    • Example12 – deferred ISR + Binary Semaphore (Binary Semaphore API)
    • Example13 – deferred ISR + Counting Semaphore (Binary Semaphore vs. Counting Semaphore – Events latched | Counting Semaphore API)
    • Example14 – deferred ISR + Queues (Queues and ISRs – API | Inefficient Queue Usage | More efficient Queue usage)
  • Interrupt nesting (NVIC Cortex M3 | LPX17xx NVIC | CMSIS | FreeRTOS and interrupt nesting | priorites)

Resource Management

  • Intro (concurrency | critical regions/sections | atomic | race condition | Thread safety | the single variable | locking | Kinds/Causes of Concurrency | What does need/not need protection? | Deadlock | order of Locks | Contention)
  • Resource Management (Potential conflict – accessing things concurrently | read/modify/write | non-atomic access | reentrancy | shared resource protection)
  • Protecting critical regions/sections (Dis-/enabling interrupts | suspending/locking the scheduler | Mutex)
    • Example15 – Mutex (Mutex API)
  • Priority inversion (Unbounded/Bounded | Sources of unbounded priority inversion | Solutions? | Priority Inversion and FreeRTOS) | Deadlock (Conditions for Deadlock | Prevention) | Gate-keeper Tasks
    • Example16Gate-keeper (vApplicationIdleHook() vs. priority 0)
  • Mutex vs. Semaphore (Ownership/Recursive Mutex) | History

Memory Management

  • Memory types | Fragmentation | Memory exhaustion | Memory allocation patterns (Fixed/Static | Variable/Dynamic | Stack Allocation, Scratch-pad | Memory Pool) | FreeRTOS Static Allocation | FreeRTOS Dynamic Allocation – FreeRTOS Heap | (Why not malloc()/free() | Memory Management Porting heap_1/3/3/4/5.c) | xPortGetFreeHeapSize()

Day 3

Trouble Shooting

  • Intro (What’s a bug/debugging | Types of bugs | Debugging strategy) | Preventing Bugs (Coding Wars | Productive Working Environment | Build Environment | Reuse) | Spelunking (find(1), grep(1), cscope(1), global(1),…) | Modeling/Abstraction | Prototypes | Training | Requirements/Architecture/Design (Design for Test | Firmware Standard | Code Review) | Debugging (GNU toolchain)
  • Debugging by Stopping (Simulator | JTAG Debugging | RTOS aware debugger)
    • Example17Queue Table
  • Debugging Running System (Hardware Exceptions | Stack)
    • Example18vApplicationStackOverflowHook()/uxTaskGetStackHighWaterMark()
    • Example19 – FreeRTOS Heap MallocFailedHook()
    • Example20 – FreeRTOS task statistics
    • Example21 – FreeRTOS run-time statictics
  • Profiling (gprof | gcov) | Other methods (Hardware Trace | Software controlled LEDs | Oscilloscope | Logic Analyzer | 7-Segment Display | Character-based LCD | Graphic Display) | FreeRTOS Trace hook macros
    • Example22 – FreeRTOS trace hook macros 1
    • Example23 – FreeRTOS trace hook macros 2
  • FreeRTOS: Common sources of error


  • Intro (Memory Management | Processor Modes) | FreeRTOS MPU (LPC17xx MPU | Access Permissions | FreeRTOS-MPU API | from Privileged to User mode | Linker Configuration | Practical Usage Tips | inter task communication)
    • Example24 – FreeRTOS MPU (Where was the crash?)

Traffic Light controller

  • Traffic light controller – use what we learned so far
    • Example40 – Traffic light controller (Compile and execute | Heartbeat task | FSM task | UserInput-Val | Pedestrian)

Course Brochure (pdf)

What customers are saying