Important libs missing - ESP-IDF

I use the latest version of PlatformIO (VSCode - Windows 10), and I found Important ESP-IDF libs are missing.

  • 1 - Upgrade

Updating contrib-piohome @ 3.2.2 [Up-to-date]
Updating contrib-pysite @ 2.38.191020 [Up-to-date]
Updating tool-unity @ 1.20500.200322 [Up-to-date]
Updating tool-scons @ 3.30102.0 [Up-to-date]
Updating tool-cppcheck @ 1.190.0 [Up-to-date]

Platform Manager

Platform Espressif 32

Updating espressif32 @ 1.12.1 [Up-to-date]
Updating toolchain-xtensa32 @ 2.50200.80 [Up-to-date]
Updating toolchain-esp32ulp @ 1.22851.190618 [Up-to-date]
Updating framework-espidf @ 3.40000.200303 [Up-to-date]
Updating tool-esptoolpy @ 1.20600.0 [Up-to-date]
Updating tool-openocd-esp32 @ 1.1000.20190708[Up-to-date]
Updating tool-mkspiffs @ 2.230.0 [Up-to-date]
Updating tool-cmake @ 3.16.4 [Up-to-date]
Updating tool-ninja @ 1.9.0 [Up-to-date]
Updating tool-mconf @ 1.4060000.20190628[Up-to-date]
Updating tool-idf @ 1.0.1 [Up-to-date]
Uninstalling toolchain-xtensa32 @ 2.80200.200226: [OK]

  • 2 - Create New project

platform: espressif32
board: esp32dev
framework: espidf
main code source: void app_main(void){}

Build OK.
Upload OK.
Run and debug OK.

  • 3 - Add new header

Just add this header: #include "esp_netif.h"

  • 4 - Build

Processing esp32dev (platform: espressif32; board: esp32dev; framework: espidf)
--------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: Redirecting...
PLATFORM: Espressif 32 1.12.1 > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
- framework-espidf 3.40000.200303 (4.0.0)
- tool-cmake 3.16.4
- tool-esptoolpy 1.20600.0 (2.6.0)
- tool-idf 1.0.1
- tool-mconf 1.4060000.20190628 (406.0.0)
- tool-ninja 1.9.0
- toolchain-esp32ulp 1.22851.190618 (2.28.51)
- toolchain-xtensa32 2.80200.200226 (8.2.0)
Reading CMake configuration…
LDF: Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies…
No dependencies
Building in release mode
Compiling .pio\build\esp32dev\esp-idf\src\main.c.o
Generating LD script .pio\build\esp32dev\esp32_out.ld
Generating partitions .pio\build\esp32dev\partitions.bin
Compiling .pio\build\esp32dev\esp-idf\app_trace\app_trace.c.o
Compiling .pio\build\esp32dev\esp-idf\app_trace\app_trace_util.c.o
Compiling .pio\build\esp32dev\esp-idf\app_trace\host_file_io.c.o
Compiling .pio\build\esp32dev\esp-idf\app_trace\gcov\gcov_rtio.c.o
Compiling .pio\build\esp32dev\esp-idf\app_update\esp_ota_ops.c.o
Compiling .pio\build\esp32dev\esp-idf\app_update\esp_app_desc.c.o
src\main.c:3:11: fatal error: esp_netif.h: No such file or directory

I compare PlatformIO ESP-IDF folder with original ESP-IDF folder from Github, I found those lib folders are missing:

C:\Users\Me.platformio\packages\framework-espidf\components\cbor
C:\Users\Me.platformio\packages\framework-espidf\components\esp_hid
C:\Users\Me.platformio\packages\framework-espidf\components\esp_netif
C:\Users\Me.platformio\packages\framework-espidf\components\esp_serial_slave_link
C:\Users\Me.platformio\packages\framework-espidf\components\esp_system
C:\Users\Me.platformio\packages\framework-espidf\components\esp_timer
C:\Users\Me.platformio\packages\framework-espidf\components\esp32s2
C:\Users\Me.platformio\packages\framework-espidf\components\perfmon
C:\Users\Me.platformio\packages\framework-espidf\components\tinyusb

Also there ~400 MB of difference !

Indeed, because you are comparing the current github version to the version included within PlatformIO, which is v4.0, as the release page says. Your listed components are not found in v4.0.

Duplicate of upgrading to new netif code · Issue #342 · platformio/platform-espressif32 · GitHub and Is platformio Framework-espidf doesn't support all compnents from ESP-IDF? · Issue #343 · platformio/platform-espressif32 · GitHub.

The next release of the ESP32 platform will include that update.

Oh I see now!, I added some memory leak fix in IDF 4.2, and I really need to make PlatformIO work with IDF 4.2.

I start by just upgrade the IDF framework folder manually, from 4.0 to 4.2, of course didn’t work!.
what I can do to help making PlatformIO support IDF 4.2?

Thank you,