ESP32 NVS flash encryption compilation error

Yes the packaging and PlatformIO build scripts are maintained by PIO, the ESPIDF content comes from . See Service End for Bintray, JCenter, GoCenter, and ChartCenter | JFrog for available versions.

From Releases · platformio/platform-espressif32 · GitHub this uses ESP-IDF 3.3 LTS version. So no 4.0.

Already asked in Support for ESP IDF v4 - #3 by ivankravets

Due to the fact that PIO is not using ESP IDF v4 right now probably.

Most interestingly there’s already a v4 package but no announcement has been made yet, so idk how well it works. You may give at a shot to do

platform = https://github.com/platformio/platform-espressif32.git
platform_packages =  
   framework-espidf@3.40000.200303

in the platformio.ini