Hi,
I’m not sure if this is the right place to ask this but is there a guide or something similar to port/update some components of the arduino-esp framework using the latest esp-idf?
I’m askimg this because the “mdns” component on arduino is broken and only really recent changes in the esp-idf fixed the issues.
When looking through the folders it seems like mdns.c and mdns.h got compiled into mdns.a in the esp-arduino framework.
Is there a way to compile said component from the esp-idf and just “drag and drop” it to the arduino framework?
This is only a temporary fix, until someone properly ports it over.
I’m thankful for any pointers in the right direction
Have you tried this? If all function APIs stayed the same and only internal fixes were made, and those fixes don’t depend on some bleeding edge newly other added component in ESP-IDF that Arduino-ESP32 doesn’t have, try to replace the tools/sdk/esp32/lib/libmdns.a in <home folder>/.platformio/packages/framework-arduinoespressif32 with an libmdns.a obtained from your latest ESP-IDF build.
Yeah from the github commit the fixes where only internal null checks inside of the functions and there wasn’t any additional call to new functions or new functions.
My main question is how to actually obtain the .a file from the latest esp-idf. When I build stuff using it I only get .o files in it’s build folder. (are they interchangeable? or is the .a something else?)
I couldn’t find any mdns related .a files in there
Thanks for the links, that was the thing I was searching for !
On an unrelated note:
Does plattformIO use the latest GitHub - espressif/arduino-esp32: Arduino core for the ESP32 ? because while looking for the other stuff I saw that it only uses an older version. Do new versions first need a port to platformIO, or why is that?
PlatformIO uses stable releases and does not grab unverified, untested versions from their bleeding edge repository. That would be a total disaster for stability. The PlatformIO staffs updates these packages in the internal registry when a new version is released and updates platform-espressif32 accordingly, see Releases · platformio/platform-espressif32 · GitHub. The latest version uses the latest stable version v2.0.3.
Of course, PlatformIO gives you the opportunity to source any package from any source. So with platform_packages,
Thanks for everything, after some attempts I managed to get the esp32-arduino-lib-builder running.
It sadly seems like a lot more was changed in the background, so a simple drag and drop doesn’t really work I will probably try and backport it when I have more time, or just wait until someone else does it first
for anyone finding this thread here is the issue on github:
Since we know what ESP-IDF version Arduino-ESP32 is using, it should be trivial to fork ESP-IDF from that, patch in that commit that adds like 4 lines, and use the esp32 lib builder to regenerate the libraries. Then nothing major should have changed.
Okay back here after a bit of sleep.
The reason it didn’t work was because I had some left over stuff in my test project that broke the compilation (like a copy of the mdns folder).
I kind of forgot that, but now the libraries generated using esp32-arduino-lib-builder work.
I’m currently in the process of checking out if the fix actually fixed the issue
okay so last message for now:
just copy and pasting the lines didn’t fix the issue
However replacing the whole mdns folder with the latest one fixed the issue I either copied something wrong or there were a few other changes that also helped out here.
I’m now using the esp-idf v4.4.1 with the mdns component from master and also the arduino-esp32 v2.0.3 (as this supports 4.4.1 which is the closest thing to master right now).
So yeah thanks for all the help! I didn’t knew the tools for generating those .a files existed,
yeah I have, though I’m not sure if this is the “correct” way to fix the issue (on there someone mentioned backporting something to the 4.4 branch), but sharing this probably won’t really hurt.
I can pull and use a version from github, is there a way to specify a local folder (that is in the same path as the other frameworks just a copy with the name framework-arduinoespressif32@myownltsversion)?