Configuring FreeRTOS

Please start of by purely copying and compiling the official

https://github.com/pioarduino/platform-espressif32/tree/main/examples/espidf-arduino-blink

example. That should build. Then do your modifications on top, if any are needed at all.

This flag being by default on in newer ESP-IDF versions also means that it should be on in the newer Arduino cores (3.x) as well, so with pioarduino, you may even get away with the much much simpler framework = arduino.