FreeRTOS - the small OS for ESP32 and ESP8266

miker2069

Active Member
Licensed User
Longtime User
Having been away from micro-controllers for much of the year (my have things changed!), I will admit that I was puzzled by references to FreeRTOS and ESP32. I never payed much attention to it as when you compile a sketch in Arduino or a B4R program - *it just works*. I originally got started with the Uno board "back in the day" (i.e. 3 years ago) and when you wrote a program, that was the only thing running on the device. Things are different with ESP32 and even ESP8266. The Arduino dev environment (and therefore B4R) link in and utilize a small real time operating system called FreeRTOS. Probably this was apparent to most people, but to me, I totally missed it.

It makes sense though especially with two CPU cores on the ESP32 - how do you coordinate tasks running on different cores, contention for resources, etc (with a single core like the Uno this isn't something we had to worry about to much). This is beneficial since for example WIFI code can run on one core while the app runs on a different core (which is how I believe the compiler sets it up).

Anyway if you're like me and didn't realize it until recently, here's a very quick summary of FreeRTOS and expressif's (makers of the ESP32/ESP8266) use of it.

See this link

In addition, it also seems Amazon is intent on cornering the IoT market by forking a variant of FreeRTOS that now has embedded functionality specifically for AWS. See this link. I'll be honest, I have mixed feelings on this. IoT was the area that I could truly say was not owned by some massive tech company and was totally driven by the maker community (us). Amazon stepping in and getting their "hooks" into it is a bit disappointing (but I guess inevitable). Fortunately for now, it's a fork of the FreeRTOS system and not part of the core that's in Arduino.
 
Top