Using FreeRTOS with Teensy 4.1

Hello!

I just started reading about RTOS, and specifically, the FreeRTOS Kernel. I finished the first section of the beginners guide in the documentation, and now I am on the section of actually installing the Kernel.

I had a few questions regarding this topic. First, do you actually “install” the Kernel onto a device, specifically the Teensy 4.1 in my case, or is it as simple as just including a library in the Arduino IDE like I have seen in a few other examples?

Second, am I able to use specifically FreeRTOS with the Teens 4.1? I know it uses an ARM Cortex-M7, and I want to be able to install FreeRTOS to it, how would I go about doing this?

Thank you!

You can think of FreeRTOS as a library that gets, in most cases, statically linked into your firmware. I’m not sure which IDE you are using, but there are lots of example projects for various chip and IDE/makefile combinations in the FreeRTOS/Demo directory of the main FreeRTOS download that demonstrate how this is done. Plus some pages on the main FreeRTOS.org website that describe using one of those projects as a base for your work, or even create a new project. The free to download book is a good reference for this too.

Thanks for the reply.

So you are saying that essentially, FreeRTOS is just like a library, like any other one in the Arduino framework, that just does something specific? In that case, why is it regarded as an OS? Thanks again.

Hello,

Basically FreeRTOS is an example of what is known as a microkernel pattern:


In simple terms, the primary purpose of such a system is to guarantee the execution of time critical tasks in a timely and predictable/deterministic fashion and to reduce system complexity.
Because you have a microkernel (it is supposed to provide a core set of services needed) so it does mean that it is an OS - even if it doesnt always resemble the traditional OSes like Windows/Linu/Unix/MacOS (that were built for a completely different purpose)
Personally I dont see why you couldnt run FreeRTOS on your Teensy board (I seem to remember seeing the ports for the various cortex-m parts including the Teensy one). I do personally wonder though if you are learning FreeRTOS just for your own benefit or if you have a specific project for an RTOS use in mind - debugging/problem solving an RTOS can get quite painful very quickly

Ilya

The information here will likey answer your question.

You may also find these tutorials helpful for learning about FreeRTOS.