ESP8266 arduino code to FreeRTOS

I have a very general question, so please excuse me if this is not the appropriate place to ask this. I have a rather complex project for a LEGO robotic arm controlled by several motors. The motors are driven by Adafruit motor shields and I also use gyroscopes, and current sensors to measure power consumptions. I’m using Adafruit libraries for the motor shields and the current sensors. My code is written in the typical arduino-style cpp and I’m using PlatformIO.

I was thinking to convert my code to FreeRTOS for better time handling. I had no experience with FreeRTOS so when I realized it’s a completely different framework I thought that that would be impossible. So my question is: what are the minimum requirements to convert my code to FreeRTOS and what would be a good introduction for that? I’ve already compiled and run a few examples so the PlatformIO is setup I think, at least I can run the Blink-Hello World-WiFi connect examples to start with.

If you are using an ESP8266, you are already using FreeRTOS since that is the thing that runs your Arduino sketches an that chip.

Is there anything specifically that you are/were having trouble with?