I’ve looked around and haven’t found instructions on how to update the version of the ESP-IDF used by PIO, although there are plenty of indications that it does indeed support the current 4.x branch. My VS-Code/PIO installation is up to date (Core 4.3.1, Home 3.1.1, PIO expressif32 1.12), and yet it seems to be including ESP-IDF 3.2.3.
Can someone point me towards some documentation on how to change that?
Then it’s impossible. Can you show the first like 20 lines of output when you run the “Build” task? It should tell you that framework-espidf is at version 3.40000.*.
I thought maybe the ESP-IDF version would be different if a started a fresh non-Arduino project. So I started a new project in the PIO GUI, copy-and-pasted the C source for the “getting started” example in the ESP-IDF project, and added the line:
printf("Version: %s\n", esp_get_idf_version());
The output that results is:
Version: HEAD-HASH-NOTFOUND
And the same string shows up during the boot of the device:
(171) boot: Loaded app from partition at offset 0x10000
I (171) boot: Disabling RNG early entropy source...
I (171) cpu_start: Pro cpu up.
I (174) cpu_start: Application information:
I (177) cpu_start: Project name: test23
I (181) cpu_start: App version: 1
I (185) cpu_start: Compile time: Apr 20 2020 00:51:52
I (190) cpu_start: ELF file SHA256: ce206e9d1d8ff9ac...
I (195) cpu_start: ESP-IDF: HEAD-HASH-NOTFOUND
I (200) cpu_start: Starting app cpu, entry point is 0x40080fd8
I (0) cpu_start: App cpu up.
Do you know why it isn’t reporting a version number? I haven’t been getting any useful hits in Google searches.
No, I haven’t resolved it. I think the problem is that the Git commit information that is used to populate that information in Espressif’s standard ESP-IDF isn’t available when the PlatformIO version is created. I don’t know how to fix it, or if it’s possible.
It is very frustrating when you cannot get support for this package, and no one feels compelled to respond to users with an explanation for the issues they discover. It would be nice if a representative were able to at least confirm the issue has been noted and provide a glimmer of hope that it may be fixed in a future release.
I have decided to simply report the ESP-IDF version in my code using the ESP_IDF_VERSION_MAJOR, ESP_IDF_VERSION_MINOR and ESP_IDF_VERSION_PATCH definitions. This at least reliably informs the user about the IDF version used in building the application image, although it does not tell the whole story.
For instance, the PlatformIO ESP framework v1.12.0 added support for ESP-IDF v4.0. The framework v1.12.1 also supports ESP-IDF v4.0, but with improvements to the integration.
Just curious… do you know of a way to retrieve the version of the ESP-IDF framework that was used in a build?
since the format is <major packet version>.<underlying packet version>.<date>, so this means framework-espidf major packet version 3 (PIO-internal numbering), 40100 → 4.1.0 underlying version of ESP-IDF, date code 2020 27th August. Was also clarified in Find the mbed version which was used before a backup? - #3 by scottc11.