ESP32: using compile options from ESP-IDF - how to do on platformio?

I wrote code for the ESP32 with arduino framework using platformIO.
Now i want to switch off core 1 of ESP32 CPU. This is normally done by using a configuration option in “FreeRTOS menu” in ESP-IDF names CONFIG_FREERTOS_UNICORE

How can i set this with platformIO?

[env:..]
..
build_flags = -D  CONFIG_FREERTOS_UNICORE

http://docs.platformio.org/en/latest/projectconf/section_env_build.html#build-flags

Thank you very much for the reply, that’s surprisingly easy!

I tried it, but it doesn’t show any impact on the power consumption.

I double checked that the build option exist, but i think it does, it can be found in ESP-IDF in cpu_start.c

Any ideas?

Meanwhile i understood that platformIO with framework arduino uses precompiled libraries, when i build my code for ESP32. That’s why the ESP32 build option “CONFIG_FREERTOS_UNICORE” in platformio.ini has no impact.

What can i do? I want to develop for ESP32 with platformIO, but i need a library which is not available for framework ESP32, only for framework arduino.

Do you have source files of this library?