ESP8266:port free RTOS - Page 1
Forum section: electronics / general

author: digitalectron
author_rank: Contributor
timestamp: May 27, 2024, 04:17:12 am
content: Hello everyone,I want to run FreeRTOS and Arduino simultaneously on an ESP8266. I've done extensive searching online but haven't found a solution. Can anyone here guide me on how to port FreeRTOS to the ESP8266? As you know, FreeRTOS can be ported to ST, AVR, and other microcontrollers, so there should be a way for the ESP8266 as well. I am aware that the ESP32 is a better option and comes with FreeRTOS built-in, but my project needs to work specifically with the ESP8266. Please, if anyone can manually port FreeRTOS to the ESP8266, provide guidance here without suggesting alternatives.Also, I am using PlatformIO IDEThank you very much.

author: obiwanjacobi
author_rank: Super Contributor
timestamp: May 27, 2024, 06:55:51 am
content: https://en.wikipedia.org/wiki/FreeRTOS#Supported_architectures... Looks like it's already done?https://github.com/espressif/ESP8266_RTOS_SDK

author: digitalectron
author_rank: Contributor
timestamp: May 27, 2024, 12:10:40 pm
content: Yes, but I want to add Arduino library ,and free RTOS together

author: nctnico
author_rank: Super Contributor
timestamp: May 27, 2024, 12:12:32 pm
content: Quote from: digitalectron on May 27, 2024, 12:10:40 pmI'd start with the software from Espressif which has some of their specific tweaks for FreeRTOS and add the Arduino library to the project.

author: digitalectron
author_rank: Contributor
timestamp: May 27, 2024, 01:10:44 pm
content: what software, can you guide me more ? do you have link ? nctnico

author: nctnico
author_rank: Super Contributor
timestamp: May 27, 2024, 01:21:44 pm
content: Quote from: digitalectron on May 27, 2024, 01:10:44 pmYou can download the software tools for ESP8266 development from Espressif's website.

author: yar
author_rank: Contributor
timestamp: June 28, 2024, 07:54:41 am
content: > do you have link?Links have already been posted. Asking others to type your search requestwhen it's already been done for youis in poor style.HOWEVER, you'd be wise to heed the warning (it's the part in bold face, large, with asterisks around it...just so you don't ask for it to be copied here to save you the click) that this is a very fragile solution that has diverged pretty far from both current ESP-IDF and current Arduino, itself a misnomer. While volunteers have made nearly heroic efforts to keep that a viable porting target, it's REALLY fragile. I know several projects on the edge of de-supporting 8266 just because they're simply out of space and can't keep the product stable when the radio stack runs out of memory and the interaction between hardware subsystems starves each other into deadlocks way too often.The reality is that the radio stack in the 8266 isn't terribly bright and consumes a LOT of resources that the 8266 doesn't have in surplus. Espressif had a good reason to introduce those ESP32's with more RAM, a smarter WiFi implementation, and more RAM. Espressif themselves have found it difficult to keep 8266 code contemporary. It's easy to see the published EOL date for 8266 of 1/1/26 meaning no further software updates at all.You said you didn't want to hear it, but I'd be very nervous about committing new development to 8266 at this time. There are simply better options out there. Since it sounds like you're not preparing to commit major engineering time to it yourself and rely on others to build the infrastructure and code for you, you should brace for an already dying ecosystem.If you're absolutely bent on that hardware, you should probably also investigate smaller integrations that don't even try to multitask in the same way a "real" OS like FreeRTOS and the large overhead of Arduino do.