Custom ESP32 Arduino Framework Package

I’ve managed to build the Arduino ESP32 framework libraries using the esp32-arduino-lib-builder repository and update some of the configuration options that I needed. I then added my updated library binaries to the existing framework-arduinoespressif32 package (in a new folder). I created a new repository on my Github account for this updated framework-arduinoespressif32 framework and updated my project platformio.ini file to refer to it. So far, so good, the project builds and works properly with the updated ESP32 Arduino framework. However, when I switch to another project that uses the ESP32 Arduino framework (but not my updated framework) it winds up renaming my framework package folder to something like framework-arduinoespressif32@src-7c60f8d39dccf4e1bff992b3033aecb9 with the long commit ID. Then when switching back to the original project that wants to use the modified framework the project will no longer build under Windows because the command line exceeds 32k due to the long folder name now used for the updated framework. I can see that there are other frameworks that seem to differ only by version number and they seem to get named framework-name@version. I haven’t been able to figure out how to get my custom framework to get named with just the version number (and not commit ID) so that the command line doesn’t exceed 32k in length when building. Anyone have suggestions?

Hello, Im trying to get a modified version of arduino libraries for esp32 with some changes in sdkconfig, I achieve to build with esp32-arduino-lib-builder and get something under /out folder, but I have trouble on how to update the platform io framework-arduinoespressif32 or include my new files in platformio.ini.

Can you please explain how to do it exactly, If I override all the folders I get some build errors when try to build my project

Hi Javier, I’ve managed to build a custom version of the Arduino ESP32 libraries with modified SDK config settings. I built the library under WSL2 on a Windows system but you should be able to do that on pretty much any Linux system I believe. I was then able to use these libraries in one of my PlatformIO projects and everything seemed to work. The only problem I’m having is that PlatformIO will “rename” my custom ESP32 library to a very long name (using a full commit ID from the Github account that I use to host the library) when switching back to a ESP32 project that doesn’t use this custom library. After that the project using the custom library fails to build because of a path length issue in one of the ESP32 tools. I haven’t been able to get past this issue but I have been able to continue making progress on the project using the custom library. Let me know if you are still interested in the steps I use to get where I am today.

Hi Spurlock, sorry for the delay. Yes I’m still interested in find a way to get an Arduino ESP32 libraries with modifications in SDK config. Can you tell me the steps from the compilation with esp32-arduino-lib-builder to extract the compiled files and include it in PlatformIO project? Is Github needed for that process? If would be nice to have a step by step procedure, im not so familiar with this. Thanks a lot.

If you use pioarduino/platform-espressif32 as a platform, you have an even easier option: “Hybrid-Compile”

This allows you to set SDK configurations directly in the platformio.ini. pioarduino takes care of the rest, you don’t need to do anything else.

Example:

custom_sdkconfig = 
  CONFIG_ESP_WIFI_GMAC_SUPPORT=y
  CONFIG_ESP_WIFI_CSI_ENABLED=y
  CONFIG_ESP_WIFI_ENABLE_WPA3_SAE=y
  CONFIG_ESP_WIFI_ENABLE_SAE_PK=y
  CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT=y
  CONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT=y
  CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA=y