We may earn an affiliate commission when you visit our partners.
Dr Jon Durrant

Updated for FreeRTOS Kernel V11 - January 2024.

FreeRTOS Kernel allows us to add multi-processing to projects on the Raspberry PI Pico. This course teaches the foundations of FreeRTOS Kernel through practical example projects to get you quickly up and running. The course includes 15 separate projects using FreeRTOS Kernel including Symmetric Multi-Processing (using both RP2040 cores).

Read more

Updated for FreeRTOS Kernel V11 - January 2024.

FreeRTOS Kernel allows us to add multi-processing to projects on the Raspberry PI Pico. This course teaches the foundations of FreeRTOS Kernel through practical example projects to get you quickly up and running. The course includes 15 separate projects using FreeRTOS Kernel including Symmetric Multi-Processing (using both RP2040 cores).

The course is written for the Raspberry PI Pico and Pico W. The examples will also run on any RP2040 board, though some modification due to different pinouts may be required if the board is different from the Raspberry PI Pico. These examples can be used as a basis for your own projects or as reference examples of the concepts of FreeRTOS Kernel.

This course covers:

  1. Tasks: Multiple concurrent processes on a single core

  2. Semaphores: Sending signals between tasks to protect shared resources

  3. Queues: Queue management. Queues are often used for decoupling tasks

  4. Message Buffers: A queue of variable length items

  5. Symmetric Multiprocessing: Using both RP2040 cores

  6. C++ use of the FreeRTOS Heap

Simple circuits to illuminate LEDs are used in each example. To build these circuits a small amount of equipment is required:

  • Raspberry PI Pico or Pico W

  • Micro USB Cable for power

  • Breadboard and connection wires

  • 12 LEDs. Any colour though examples use 2x Green, 2x Blue, 8x Red

  • 12 75Ohm resistors

  • Desktop/Laptop for building code and flashing the Pico

The course assumes knowledge of C++. Though each example will walk through the functionality, the course will not talk about the syntax of C++. An understanding of how stack and heap are used by C++ is also assumed.

The course assumes that you can compile and deploy C++ code to the Pico using the Raspberry PI Pico SDK. My other course “Introduction to C Development Environment for Raspberry PICO” teaches these skills.

FreeRTOS Kernel is a foundation state in the journey to more complex projects and IoT devices. Join the course today to have some fun learning FreeRTOS Kernel for the Raspberry PI Pico, Pico W or RP2040 board.

Enroll now

What's inside

Learning objectives

  • To get to grips with freertos on raspberry pi pico or rp2040 board
  • Be able to develop applications for pico/rp2040 using freertos
  • Protect shared resources using semaphores
  • Communicate between tasks using queues and message buffers
  • Utilise both cores of the pico/rp2040 by using symmetric multi processor feature

Syllabus

Introduction

The course goal is to get to grips with FreeRTOS on Raspberry PI PICO, PICO W or RP2040 board. In this lecture, I set out the goal and breadth of the course.

Read more

Introduction to Dr Jon Durrant as the tutor for the course. Remember I am here to answer questions as well as the voice in your ears.

The course will break down FreeRTOS Kernel into its component features. Take a step-by-step approach to learn with resources to help you.

This sections summary and resources.

Deploy first FreeRTOS application to the Pico

The goals for this section are to talk about the setup required to get going on the course.  Then to test the setup out with an example FreeRTOS project.

  1. Raspberry PI Pico Setup

  2. SDK and Code Deployment

  3. Blink External LED, using FreeRTOS

  4. Other RP2040 Devices

Writing C++ for the Pico requires that we have an IDE or Editor, Compiler, Pico SDK, and an approach to deploying binary code to the Pico

There are two strategies for deploying code to the Pico either to use Bootsel or SWD. This lecture briefly summarises these options.

This lecture talks about our first FreeRTOS project to blink an LED. This validates that our build and deploy environment is working.

Blink Project Example

All of the example projects from the course are included in a code repository. This lecture introduces the structure of the repository and the strategy for reusing libraries.

This lecture briefly talks about some alternative RP2040 boards available. The lecture isn't crucial to the course so can be skipped.

Summary lecture for this section.

Understand the FreeRTOS Libraries and content of the FreeRTOS Kernel Library. Understand how FreeRTOS Kernel is configured for the major features.

This section introduces FreeRTOS Kernels and features.

FreeRTOS is more than just the Kernel library. This section introduces the libraries that FreeRTOS provide that sit alongside the Kernel.  Then introduces the features of the Kernel.

The FreeRTOS Kernel is heavily configurable for porting and memory efficiency. This section explains the configuration header file.

Summary lecture for the section.

Managing Tasks and the Scheduler

This section will focus on Task, the key unit of concurrency in FreeRTOS. We will encapsulate a task in a class, explore priority and look at memory management and utilisation.

This lecture refactors the Blink LED example to encapsulate the Task within a C++ class. It looks at the basic control of tasks.

This lecture looks at getting debugging information from FreeRTOS on the tasks and memory usage.

Tasks in FreeRTOS have priority with the highest priority task that is waiting to run being picked next by the scheduler. This lecture explore setting priority and scheduler behaviour.

Tasks Assignment

The method used in this section to construct tasks has all used a dynamic memory model, allocated from the heap. This section looks at how the static memory approach could be used.

The use of Semaphores and Task Notification.

This section will define semaphores and look at examples using binary semaphores, counting semaphores and task notification.

This lecture introduces the concept of a semaphore.

This lecture explores an example of using a FreeRTOS Binary Semaphore to protect a shared resource.

This lecture explores an example of using a FreeRTOS Counting Semaphore to reduce the number of tasks which can blink an LED at any one time.

Assignment Semaphores

This lecture introduces an algorithm for synchronising tasks.

In order to explore synchronisation, we first need an example demonstrating desynchronized tasks.

This lecture uses Task Notification to achieve synchronisation of tasks.

FreeRTOS has a special type of semaphore called a mutex.

Section summary lecture.

The use of FreeRTOS queues in communicating between Tasks.

The goals for this section are to explore queues and their usage to decouple tasks.

This lecture introduces the concept of queues and how queues can be used to decouple agent objects in C++.

This lecture introduces FreeRTOS queue functions. The example shows the usage of queues to allow the public interface of an object to place requests on a queue which can then be handled by the run loop.

Assignment Queues
Use of FreeRTOS Message Buffers to communicate variable length structures between Tasks.

The goal of this section is to show how message buffers are used to communicate variable length structures between tasks.

This lecture introduces the concepts of a message buffer buffer.

This lecture explores a simple example of using a message buffer which will contain string commands.

UART Use of Buffers
Use both RP2040 cores and FreeRTOS SMP

This section explores using both cores of the RP2040, firstly through the SDK and then using FreeRTOS SMP.

The RP2040 has two cores. This lecture introduces the two cores, executing code on both cores, identifying which core code is running on, and using the FIFO queues in the SDK to communicate between the cores.

This lecture introduces FreeRTOS SMP, Symmetric Multi-Processing,  which allows FreeRTOS to run tasks across both cores under the control of the scheduler.

Final summary of the course and thank you from the tutor.

Congratulations and thank you lecture.

Using FreeRTOS Kernel V11 for SMP and Single core configuration. Using FreeRTOS Heap from C++

The section goals for this section:

  1. To build a FreeRTOS Kernel V11 application for a single-core

  2. To build a FeeeRTOS V11 SMP application, running on both cores

  3. C++ Memory management, using the FreeRTOS Heap

In this section I briefly introduce the new FreeRTOS Kervel V11 and talk about the updates to the course repo to provide examples using this version of the Kernel.

The V11 Kernel has some slight changes in configuration for the build and the FreeRTOSconfig.h file. I talk through these changes and then show an example running on a single core.

The great advantage of V11 Kernel is that is merges the SMP code base. So we can now switch our application to run on both cores with a simple configuration change. I talk through SMP configuration and show an example of this in this lecture.

By default C++ will use the Pico SDK Heap for the "new" and "delete" operators. We should configure the "new" and "delete" operations to use the FreeRTOS Heap by default. In this lecture I show how to do that.

C++ only using FreeRTOS Heap for specific Classes

This is a summary lecture for this section.

Good to know

Know what's good
, what to watch for
, and possible dealbreakers
Provides hands-on experience with FreeRTOS Kernel V11, which is a valuable skill for embedded systems developers working on resource-constrained devices
Focuses on the Raspberry Pi Pico and Pico W, making it highly relevant for hobbyists and makers interested in embedded development on these platforms
Assumes knowledge of C++ and its memory management, which may be a barrier to entry for those without prior experience in this programming language
Covers core RTOS concepts such as tasks, semaphores, queues, and message buffers, which are fundamental for understanding real-time operating systems
Requires specific hardware components like LEDs, resistors, breadboard, and connection wires, which may require additional investment beyond the Raspberry Pi Pico itself
Requires familiarity with compiling and deploying C++ code to the Pico using the Raspberry Pi Pico SDK, suggesting prior experience with embedded development is beneficial

Save this course

Save FreeRTOS on Raspberry PI PICO to your list so you can find it easily later:
Save

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in FreeRTOS on Raspberry PI PICO with these activities:
Review C++ Fundamentals
Strengthen your understanding of C++ concepts, especially those related to memory management (stack and heap), which are crucial for FreeRTOS development.
Browse courses on C++ Programming
Show steps
  • Review C++ syntax and data structures.
  • Practice writing simple C++ programs.
  • Focus on memory management concepts.
Practice with Raspberry Pi Pico SDK
Familiarize yourself with the Raspberry Pi Pico SDK to ensure you can compile and deploy C++ code to the Pico, as the course assumes this knowledge.
Browse courses on Software Development Kit
Show steps
  • Set up the Raspberry Pi Pico SDK environment.
  • Compile and run basic examples from the SDK.
  • Experiment with different SDK functions.
Read 'Mastering RTOS: The Definitive Guide to Real-Time Operating Systems'
Deepen your understanding of RTOS concepts and principles, which will help you better grasp the FreeRTOS implementation on the Raspberry Pi Pico.
Show steps
  • Read chapters related to task management and scheduling.
  • Study sections on inter-process communication.
  • Take notes on key concepts and definitions.
Four other activities
Expand to see all activities and additional details
Show all seven activities
Implement Basic FreeRTOS Examples
Reinforce your understanding of FreeRTOS concepts by implementing simple examples such as task creation, semaphore usage, and queue management.
Show steps
  • Create tasks with different priorities.
  • Implement binary and counting semaphores.
  • Use queues to pass data between tasks.
Document Your FreeRTOS Projects
Improve your understanding and retention by documenting the FreeRTOS projects you create, explaining the code and design choices.
Show steps
  • Write detailed comments in your code.
  • Create a README file explaining the project's purpose.
  • Describe the functionality of each task and semaphore.
Develop a Simple RTOS-Controlled System
Apply your knowledge by developing a small project that uses FreeRTOS to control a system, such as blinking LEDs with different frequencies or managing sensor data.
Show steps
  • Define the system's requirements and functionality.
  • Design the task structure and communication mechanisms.
  • Implement and test the FreeRTOS application.
Read 'Real-Time Concepts for Embedded Systems'
Gain a deeper understanding of the real-time concepts underlying FreeRTOS, which will help you optimize your applications and troubleshoot issues.
Show steps
  • Read chapters on scheduling and task management.
  • Study sections on interrupt handling and synchronization.
  • Relate the concepts to FreeRTOS implementation.

Career center

Learners who complete FreeRTOS on Raspberry PI PICO will develop knowledge and skills that may be useful to these careers:
Embedded Systems Engineer
An Embedded Systems Engineer designs, develops, and tests software and hardware for embedded systems, often involving real-time operating systems. This course, focused on FreeRTOS on the Raspberry Pi Pico, directly builds skills in real-time operating system concepts. The course demonstrates how to manage tasks, use semaphores for resource protection, and implement inter-task communication with queues and message buffers. Further, the course provides hands-on experience with both single and dual core use, a core competence for an embedded systems engineer. Understanding these concepts and having experience with them on the Raspberry Pi Pico is valuable for a prospective embedded systems engineer.
Firmware Engineer
A Firmware Engineer develops low-level software that controls hardware, frequently involving real-time operations. This course focusing on FreeRTOS on the Raspberry Pi Pico is directly relevant to this role, teaching the fundamentals of real-time operating systems and their practical application to microcontrollers. Firmware engineers often need to work with tasks, semaphores, queues, and message buffers within an RTOS which this course provides hands-on experience with. Also the course teaches specific skills such as symmetric multiprocessing on the RP2040 which is a powerful tool for firmware engineering. This course provides a foundation in real-time system skills for firmware engineers.
Control Systems Engineer
A Control Systems Engineer designs systems for controlling dynamic processes and machinery. As these systems often operate in real-time, this course may be helpful because it provides a practical introduction to real-time operating systems principles through the use of FreeRTOS on the Raspberry Pi Pico. The course's emphasis on managing tasks and protecting resources with semaphores is directly related to real-time control systems. Control system engineers often work with multi-processing and message communication, which are explored in depth in this course.
Robotics Engineer
A Robotics Engineer designs, builds, and programs robots, often using microcontrollers. This course may be useful as it provides a strong foundation in real-time operating systems through the use of the FreeRTOS Kernel on the Raspberry Pi Pico, a popular microcontroller for robotics prototyping. A robotics engineer would likely use the multi-tasking and resource management features taught, through the use of semaphores and queues. The course's practical approach to learning with example projects makes it relevant to the hands-on nature of robotics development.
Internet of Things Developer
An Internet of Things Developer builds software for devices that connect to the internet. This course may be useful as it introduces real-time operating systems using FreeRTOS and the Raspberry Pi Pico. These are both common tools in Internet of Things development. This course provides experience using tasks, semaphores, queues, and message buffers, all important components of modern embedded software for Internet of Things devices. Working on projects that utilise both cores of the RP2040 is also a useful skill for Internet of Things developers.
Automation Engineer
An Automation Engineer designs and implements automated systems across various industries. This course may be useful to automation engineers who frequently work with real-time systems and embedded controllers. The course's lessons on managing multi-tasking, inter-task communication through queues and semaphores, and multi-core processing using FreeRTOS on the Raspberry Pi Pico are all relevant to the work of an automation engineer. Specifically, experience in the course with message buffers and dual core processing is directly applicable. The hands-on nature of this course would be especially helpful to the role.
Teaching Assistant
A Teaching Assistant may find this course useful as it provides a practical introduction to embedded systems development. This course teaches how to develop applications on the Raspberry Pi Pico using FreeRTOS, making it useful for a prospective teaching assistant who may need to mentor students learning about embedded systems. The course's focus on task management, semaphores, queues, and message buffers are all relevant topics for teaching assistant in university engineering courses. In particular, the hands-on nature of this course is very valuable for a teaching assistant.
Application Engineer
An Application Engineer supports the deployment and use of complex software and hardware solutions, and may find this course helpful. The course provides a practical introduction to real-time operating systems using the FreeRTOS Kernel on the Raspberry Pi Pico and teaches how to create applications with tasks, semaphores, queues, and message buffers. This knowledge is useful for any application engineer who may need to use embedded devices. The course's practical examples make it easy for an application engineer to begin integrating real-time systems into their work.
Test Engineer
A Test Engineer may find this course useful as it provides a practical introduction to embedded systems development, particularly real-time systems. In order to test embedded systems, an understanding of their underlying operation is very useful. This course teaches how to develop applications using FreeRTOS on the Raspberry Pi Pico, covering tasks, semaphores, queues, and message buffers. This provides a solid grasp of the inner workings of the system which a test engineer can use to better design test cases and evaluate system performance. The hands-on nature of this course is also valuable for a test engineer.
Research Scientist
A Research Scientist in fields such as robotics, embedded systems, or signal processing may find this course useful. This course introduces real-time operating systems through the FreeRTOS Kernel on the Raspberry Pi Pico. The course provides practical examples in task management, inter-task communication, and multi-core processing. These concepts are valuable for a research scientist who is working on projects involving embedded systems. The practical understanding of FreeRTOS will help enable a research scientist to better prototype and test their ideas.
Hardware Engineer
A Hardware Engineer designs and develops physical hardware components and systems. This course may be helpful as it introduces the application of C++ to the Raspberry Pi Pico as well as the use of FreeRTOS which is a common tool for hardware engineers. Though this course does not focus on hardware design, the focus on system development with a microcontroller that uses C++ and real-time operations may help hardware engineers to better collaborate with firmware engineers. The skills to program the Raspberry Pi Pico is also useful for hardware engineers who want to test and prototype their hardware projects.
Software Developer
A Software Developer may find this course useful because it introduces some core concepts behind the management of threads and resources. The course teaches how to create tasks, utilise semaphores, queues, and message buffers using FreeRTOS on the Raspberry Pi Pico. These concepts are applicable to software development in general. This course will help build a foundation in concurrent programming, but it is not a core requirement for general software development.
System Integration Engineer
A System Integration Engineer works to combine different hardware and software components into a unified system. An understanding of operating systems, particularly real-time operating systems, may be useful. This course, which focuses on developing applications with FreeRTOS on the Raspberry Pi Pico, can be useful. The course teaches how to manage tasks, protect shared resources with semaphores, and facilitate communication between tasks with queues, which are all useful for a systems integrator. The practical approach of the course is beneficial for understanding system interactions.
Product Manager
A product manager who deals with products involving embedded systems may find this course helpful. This course provides an introduction to FreeRTOS on the Raspberry Pi Pico. The course teaches the basic concepts of multitasking, resource management, and inter task communication which are useful for a product manager. The product manager may gain a better technical understanding of the technologies involved. The course does not provide the core knowledge needed for a product manager, but it may be useful for certain roles.
Technical Sales Engineer
A Technical Sales Engineer may find this course helpful in gaining an understanding of the technologies they are selling. This course teaches the fundamentals of FreeRTOS on the Raspberry Pi Pico. It provides a practical understanding of the capabilities of embedded systems, including task management, semaphores, queues and message buffers. A technical sales engineer who understands these concepts is better equipped to demonstrate the use cases of their product to potential clients. Though this is not a core skill for a sales engineer, it can be very valuable.

Reading list

We've selected two books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in FreeRTOS on Raspberry PI PICO.
Provides a comprehensive overview of real-time operating systems (RTOS), including concepts, design principles, and implementation details. It valuable resource for understanding the underlying mechanisms of FreeRTOS and how it manages tasks, scheduling, and synchronization. While not specific to FreeRTOS on the Pico, it provides a broader context that enhances understanding. This book is useful as additional reading to deepen your understanding of RTOS concepts.
Provides a comprehensive introduction to real-time concepts, including scheduling algorithms, interrupt handling, and resource management. It is particularly useful for understanding the theoretical foundations of FreeRTOS and how it operates in an embedded environment. This book is valuable as additional reading to deepen your understanding of RTOS concepts. It is commonly used as a textbook at academic institutions.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Similar courses are unavailable at this time. Please try again later.
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser