IDF WIFI station example can't build in Platformio

Hi everyone,

I want to build the station from wifi getting started example (esp-idf/station_example_main.c at master · espressif/esp-idf · GitHub).

It doesn’t work because the used “esp_event_handler_instance_register” function isn’t initialise in esp_event.h on my framework ESP-IDF.
The same for esp_event_handler_instance_t in esp_event_base.h.

framework-esp-idf version after update: 3.40100.200827

How get i the latest version of esp idf in platformio?

Thanks for your help!

Why are you building the example from the master branch? Latest release features ESP-IDF v4.1.0. You need esp-idf/station_example_main.c at release/v4.1 · espressif/esp-idf · GitHub from release/v4.1.