Arduino as an esp-idf component: I failed
Posted: Thu May 07, 2020 2:20 pm
I have been spending several days trying to use arduino as a component of esp-Idf with no luck.
Ultimately what I wanted to do was to be able to modify the precompiled librairies of arduino in order to modify some menuconfig settings. for BLE power consumption in particular.
- I have tried first to stay on arduino but using esp32-arduino-lib-builder : building new librairies as in https://github.com/espressif/arduino-es ... builder.md.
It built the libraries but compiling a "blink" project in Arduino would throw 100x of issues and would never compile in arduino ide. I tried to align the esp-idf version to 3.2 which corresponds to arduino's idf level. Same
- I tried also to build the libs but without lib-builder, building a sample project in esp-idf (still 3.2) with "arduino as a component" (https://github.com/espressif/arduino-es ... mponent.md). Same result. Same 100x of error thrown.
The only part where I could not follow the exact instructionwas to git checkout at the exact same commits because the method explained here would not work: I could not find a common commit number. https://github.com/espressif/arduino-esp32/issues/1142
-Finally I tried to forget about rebuilding the libs for arduino and just use esp-idf (3.2) with arduino as component. Followed this (https://github.com/espressif/arduino-es ... mponent.md) step by step, not a glitch in the process... but in the end when I do make of a void arduino project I get:
I have read that this could be because I was not activating Wifi (or OTA) in menuconfig, and I tried to change the related settings, with no change.
So I'm depressed now, I fought for days, and I lost. If anyone has an idea let me know, but I need a drink now.
Ultimately what I wanted to do was to be able to modify the precompiled librairies of arduino in order to modify some menuconfig settings. for BLE power consumption in particular.
- I have tried first to stay on arduino but using esp32-arduino-lib-builder : building new librairies as in https://github.com/espressif/arduino-es ... builder.md.
It built the libraries but compiling a "blink" project in Arduino would throw 100x of issues and would never compile in arduino ide. I tried to align the esp-idf version to 3.2 which corresponds to arduino's idf level. Same
- I tried also to build the libs but without lib-builder, building a sample project in esp-idf (still 3.2) with "arduino as a component" (https://github.com/espressif/arduino-es ... mponent.md). Same result. Same 100x of error thrown.
The only part where I could not follow the exact instructionwas to git checkout at the exact same commits because the method explained here would not work: I could not find a common commit number. https://github.com/espressif/arduino-esp32/issues/1142
-Finally I tried to forget about rebuilding the libs for arduino and just use esp-idf (3.2) with arduino as component. Followed this (https://github.com/espressif/arduino-es ... mponent.md) step by step, not a glitch in the process... but in the end when I do make of a void arduino project I get:
Code: Select all
In file included from C:/esp/hello_world/components/arduino/libraries/WiFi/src/WiFiSTA.h:28:0,
from C:/esp/hello_world/components/arduino/libraries/WiFi/src/WiFi.h:32,
from C:/esp/hello_world/components/arduino/libraries/ArduinoOTA/src/ArduinoOTA.h:4,
from C:/esp/hello_world/components/arduino/libraries/ArduinoOTA/src/ArduinoOTA.cpp:6:
C:/esp/hello_world/components/arduino/libraries/WiFi/src/WiFiGeneric.h:31:39: fatal error: wifi_provisioning/manager.h: No such file or directory
compilation terminated.
So I'm depressed now, I fought for days, and I lost. If anyone has an idea let me know, but I need a drink now.