I would like to know, first if it is possible, and if the answer is yes, how to install the FreeRTOS in the VSCode/Platformio, instead to work with the version inside of Arduino Framework?
Today I need to work with heap4.c Memory Management Scheme and I need to change a lot of thing in the original FreeRTOS embedded in the Arduino Framework. Then I think that it will be better in the near future, to work with the FreeRTOS download from FreeRTOS.org.
Soon I will need to change to AWS FreeRTOS, because I will work with AWS IoT Core for LoRaWAN. This is one of major reasons to think now about this change.
I assume your question refers to the ESP32 series ??
All FreeRTOS functions are available in the Arduino framework for the ESP32.
What do you want to change and why do you want to change?
I fear a xy-problem.
You don’t need to adapt FreeRTOS for the ESP32 yourself. The effort would be far too high.
What you are looking for is the ESP-IDF Framework, which is based on a FreeRTOS adapted for the ESP32 (framework = espidf in the platformio.ini).
This allows you to change the SDK settings (menu-config).
No, I am using Cortex-M4, a Nordic nRF52840, with framework Arduino.
I already have a super looping architecture code that I will become it in event-drive architecture using FreeRTOS.
I didn´t find a documentation in Platformio, where I can find “how to use it”. Let me give a example:
I can´t declare any FreeRTOS library, for example, “task.h”, because I receive error messages. Everything is working fine without any FreeRTOS “# include …”
The last strange behavior was relate to “vTaskStartScheduler()”, because when I declare it, I didn´t receive any error message in the compile/linkedit process, but the firmware freezes.
Well it is working the API call like, xTaskCreate, task handle operations, like delete, suspend, list and resume. Then I am assuming that “something” is doing the “vTaskStartScheduler()” and when I declare “again”, the firmware crash. Then I guess that I don´t have to declare the vTaskStartScheduler(), but I didn´t find any documentation about framework Arduino.
You can just start calling into FreeRTOS functions directly without having to start FreeRTOS, because the Arduino core already starts it for you. In fact, it runs setup() and loop() already in a FreeRTOS task.
Thank you very much Max! Your answer is exactly what I was looking for, but I didn´t find any documentation with the relationship between FreeRTOS and Arduino Framework in Platformio.