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 can be tailored to suit your needs and objectives, and, if time permits, consulting can be added during the training. 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
4th quarter 2026 private remote virtual German/English (to be defined) UTC+2 (to be defined) Jan 01, 2027

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

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.

Description

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.

Prerequisites

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

Course Roadmap

Who should attend?

People with an 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

  • 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
    • Example02: task parameters
    • Example03: task priorities (starvation)
    • Example04: vTaskDelay() (idle task)
    • Example05: vTaskDelayUntil()
    • Example06: “continuous processing” and vTaskDelayUntil()
    • Example07: idle hook
    • Example08: play with priorities
    • Example09: task 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 | Semaphore 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/does 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 (disabling/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
    • Example16: Gate-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)
    • Example17: Queue Table
  • Debugging Running System (Hardware Exceptions | Stack)
    • Example18: vApplicationStackOverflowHook()/uxTaskGetStackHighWaterMark()
    • Example19: FreeRTOS Heap MallocFailedHook()
    • Example20: FreeRTOS task statistics
    • Example21: FreeRTOS run-time statistics
  • 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

FreeRTOS-MPU

  • 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’ve learned so far
    • Example40: Traffic light controller (compile and execute | Heartbeat task, | FSM task, | UserInput-Val, | Pedestrian)

Course Brochure (pdf)

What customers are saying

Reliable Embedded Systems
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.