About Freertos (copied from their youtube channel)

A real-time operating system (RTOS) is an operating system that runs multi-threaded applications and can meet real-time deadlines. See this article to read more about them:

An RTOS is often a lightweight operating system (OS) designed to run on microcontrollers. Much like general purpose operating systems, they offer a scheduler to run multiple threads or tasks, resource management (such as file I/O), and device drivers. An RTOS is necessary when embedded engineers need to run several threads at the same time on a processor.

The “real-time” part of an RTOS means that such software can meet real-time deadlines. Note that this does not mean “fast,” but rather, it can guarantee that task execution time can be calculated prior to runtime.

Embedded programmers often use a “bare-metal” or “super loop” structure instead of an RTOS when concurrency is not needed. This is the familiar “setup” and “loop forever” style of embedded code where no OS is employed. Many embedded applications can be written in this format, and they are often easier to debug.

In the rest of the series, we will cover various RTOS concepts and provide demonstrations on the ESP32 using Arduino. After each video, excluding this one, we will issue a challenge and the solution can be found in a Maker.IO link provided in the video’s description. We encourage you to try the challenge without looking at the solution.

Product Links: link to esp32

Link to Shawn Hymel Digikey

Memory management is important in a multi-threaded environment, as threads (or tasks) can quickly consume all of the allocated memory, causing bizarre effects such as overwritten memory locations or random processor resets.

The solution to the challenge in the video can be found here: https:www.digikey.comenmaker/proj…

In this video, we look at various ways to allocate memory to a task and how to monitor memory usage in FreeRTOS.

Most C programs rely on 3 different types of memory. Static memory is set aside prior to program execution and used for things like static variables, constants, and global variables. Stack is allowed to grow dynamically and consists of local variables declared at the function level. Finally, heap may also grow dynamically and must be specifically allocated and deallocated by the programmer (e.g. using the malloc() and free() functions, respectively).

Whenever we create a new task in FreeRTOS, we must assign it a set amount of stack memory to use out of the global, available heap. Note that each task also requires another section of heap for the Task Control Block (TCB), which stores various attributes about the task, such as its state and priority.

We demonstrate ways to monitor the stack in each thread as well as the total amount of heap available to the system. We also show what happens when you overrun the stack or heap!

They have manufactored a series of video abot freertos

Copied from the page on youtube ( about realtime movie 1)

Related Videos:

Introduction to RTOS

Part …

1 What is a Real-Time Operating System (RTOS)? https://youtu.be/F321087yYy4​
2 Getting Started with FreeRTOS https://youtu.be/JIr7Xm_riRs​
3 Task Scheduling https://youtu.be/95yUbClyf3E​
4 Memory Management https://youtu.be/Qske3yZRW5I​
5 Queue https://youtu.be/pHJ3lxOoWeI​
6 Mutex https://youtu.be/I55auRpbiTs​
7 Semaphore https://youtu.be/5JcMtbA9QEE​
8 Software Timers https://youtu.be/b1f1Iex0Tso
9 Hardware Interrupts https://youtu.be/qsflCf6ahXU
10 Deadlock and Starvation https://youtu.be/hRsWi4HIENc
11 Priority Inversion https://youtu.be/C2xKhxROmhA
12 Multicore Systems https://youtu.be/LPSHUcH5aQc

Links on digikeys projects

tag rtos

All projects og digikey by ShawnHymel - fpga,rtos,… ju name it

All the lectures movies on digikeys hp