ESP32 Arduino recompile SDK

Hi, I was wondering how are compiled the binaries included in est ESP32 Arduino SDK?

I’m trying to enable a compile-time feature. I tried to use a compiled ESP-IDF library in my project by replacing the library, but this compile-time option does touch multiple libraries in the SDK (even the bootloader) and I’d rather know if it’s possible to just completely recompile the SDK and not just try to do some patchwork.

This feature is the OTA rollback (Project Configuration - ESP32 - — ESP-IDF Programming Guide latest documentation).

Thank you.

Arduino-ESP32 uses the tool GitHub - espressif/esp32-arduino-lib-builder to generate the .a library files that make up the precompiled ESP-IDF base.

I’ve already used that thing and had some troubles (noted in Error building release/v4.2 · Issue #26 · espressif/esp32-arduino-lib-builder · GitHub), but in the end I got it working. Used it to active ESP-MDF functionality, as e.g. discussed in ESP-MDF support.

I noticed the structure of the include files is quite different from the one on arduino-esp32 github, is it expected?

Can you show exactly what is different?

For example, in the sdk from arduino-esp32 I have, for freertos,
sdk/include/freertos/freertos/bunch of .h files*

while in the sdk I just compiled I have something like
esp32/include/freertos/include/freertos/bunch of .h files*

This applies for a lot of other subdirectories.

I do know I have compiled using latest esp-idf while arduino-esp32 is using release v3.3 if I’m not mistaken, but I’ve tried with the builder version 3.3 and still had the same issue. Maybe I’m missing a step? I just run I also tried the script to export to arduino but it just copied the files to arduino path.

Yes I think that’s the difference between (master branch) and the previous release

Maybe the people at the esp32-arduino-lib-builder can help you there – I struggled so much with it once that I lost all appetite of working with it again :confused: