RTOS support for Arduino UNO.

Hello,

I was thinking about doing an RTOS project in Arduino UNO. But, I have read that is not wise to try RTOS in UNO due to low RAM and ROM. If so, what about mega? Can I try RTOS on Arduino Mega? Can anybody suggest RTOS port for Arduino UNO/Mega?

Thank You

I used uMT, a very well behaved RTOS, with a Due. Works great and is a good introduction to using freeRTOS on the ESP32.

I thought about using uMT on a Mega but the author lists a few reasons why not, even though uMT does work on a Mega. The overhead of a freeRTOS on a Mega is not worth it. Instead, for the Mega, use a task scheduler.

freeRTOS is native to the ESP32.

I'm sorry for the noob question but what is the difference with RTOS over the "standard"
setup() loop() function that we all know?

The AVRs in general have a unfortunate ratio of "context" (37 bytes - 32 registers, SP, PC, and SR) to RAM (8k in a MEGA, 2k in an Uno.) Add to that the need for some stack space for each process, and you notice that while you might be able to write a "demonstration" RTOS, it's not likely to be very useful for doing anything. :frowning: