freertos in arduino. Is vanilla freertos any different?

Hello,
I did search these forums to see if my Q was answered and turned up blank. If it is, please redirect me.
I’m a new user and new to the arduino ecosystem. Please be patient. I will learn – eventually. :wink:

Googling for running FreeRTOS with an arduino turns up instructions like this:
“Then under the Sketch->Include Library menu, ensure that the FreeRTOS library is included in your sketch. A new empty sketch will look like this.”

I’ve read about the timing problems and the lack of execution during task wait when using standard arduino libraries and I wanted to work around that.
Is going to the FreeRTOS website and installing it to an arduino any different then using the FreeRTOS library from the arduino IDE?

Do remember that freeRTOS has overhead that a Uno or a Mega will not handle well. I ran uMT, a RTOS, on a DUE. Works great.

freeRTOS is the OS for ESP32's.

The UNO freeRTOS is written for the UNO.

I did listen to a few talks about it. I thought FreeRTOS was a cross platform lighter-then-linux kernel for RealTime Operating Systems. In other words, for RealTime, you can't have the kernel eating up your resources. Therefore I was under the impression that FreeRTOS was very efficient.

Is this not the case?
What RTOS would be best then?
I just wanted a simple kernel that handled the HW abstraction and was multi-process friendly.

What board are you coding for?

Arduino Pro Mini: Arduino - ArduinoBoardProMini

ballsystemlord:
I've read about the timing problems and the lack of execution during task wait when using standard arduino libraries and I wanted to work around that.

Please provide details. E.g. examples of libraries that will block, links that you found.

sterretje:
Please provide details. E.g. examples of libraries that will block, links that you found.

In no particular order:

Using ardiuno and freertos library:

About 17m in is where the problems with delay() are talked about: FreeRTOS Arduino and ESP32 - YouTube
This talk is mostly about the delay() problems. I can't debug this problem because I don't have an oscilloscope, so I must ensure my code doesn't have a bug like this or someday I'll be pulling my hair out never knowing what my problem is. Why I’m switching over from the awesome Arduino IDE to Atmel Studio. - YouTube
I think this is the FreeRTOS talk I listened to, but I don't remember. Get to know FreeRTOS from the Creator! - DesignWest 2013 - YouTube
Discussions about the limitations of the ardiuno libraries: https://www.eevblog.com/forum/beginners/arduino-vs-bare-metal-programming/
Not terribly relevent, but delay() is used here: programming - How can I handle the millis() rollover? - Arduino Stack Exchange

I am a frequent user of freeRTOS on the ESP32 and find the RTOS to be quite efficient. Using a RTOS on the DUE is to add a library to the DUE. WIth the ESP32 freeRTOS is a native OS.

I do not know enough about real time operating systems to tell you if it will help you or not. I was just curious where you found information about libraries that use delays.

I only know that if I want full control about timing, I will not add another layer of 'obscurity' :smiley:

I'm not going to follow a 2 hour video :wink: I did not see/hear anything about delay except vdelay between roughly 15 and 23 minutes; I might have missed it though.

I did follow Why I’m switching over from the awesome Arduino IDE to Atmel Studio. - YouTube. The explanation makes sense and is correct (to my knowledge). If you have problems with timing, use direct register access and understand the microcontroller as well as the core library functions as demonstrated in that video.

Direct register access however can break code compatibility with other processors.

Switching to Atmel Studio (hardly any experience with it) is not strictly necessary as you can override Arduino's main() function; just put main() and fill it as the presenter of the above video did.

Thanks for the advice.
Maybe I can find a way to benchmark the HW without an oscilloscope and answer this one myself someday.