Integration into ESP-IDF #1600
-
Good afternoon, could you please illustrate a clear way to integrate your library into an ESP-IDF project. I have seen your instructions for connecting it, but I get a number of problems following your steps. For example, when building a project, CMake fails on the "project(arduino-audio-tools)" command. I have tried to troubleshoot the problems, but the further I go, the more problems I have when building. I am very much looking forward to your help! Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments 36 replies
-
What are the exact error messages ? |
Beta Was this translation helpful? Give feedback.
-
Did you read this already ? |
Beta Was this translation helpful? Give feedback.
-
@pschatzmann first off thank you very much these audio tools, they look very useful. I am also looking into using them with ESP-IDF, preferably the most recent stable version which at the moment is v5.3 - I recall reading somewhere that for now, v5.1 worked better with AAT. I’ve tried following your comments from June 20 as follows:
without any CMakeLists.txt edits this did not build:
I think this may be because there is still a /src directory in the git-cloned AAT which should be ignored but isn’t? anyway, I proceded to do:
which unfortunately builds even less:
I’ve also done some attempts yesterday with PlatformIO; I couldn’t get it to build there either, possibly having to do with -DESP32_CMAKE. I could detail my process with that too if you’d like - I don’t have a preference yet for ‘pure’ ESP-IDF in VS Code or via PlatformIO, and am open to advice. Could you evaluate my approach please? Thank you in advance. |
Beta Was this translation helpful? Give feedback.
-
You are getting a linker error because app_main needs to be a c function but you defined it as using c++ calling convention! |
Beta Was this translation helpful? Give feedback.
-
platformio.ini is [env:esp32dev] |
Beta Was this translation helpful? Give feedback.
-
Meanwhile using PlatformIO I'm getting these errors:
by the way, did you not find that
with either or both in place I get the errors. |
Beta Was this translation helpful? Give feedback.
-
It seems that you are using some old versions: Compare with the information I gave you above! |
Beta Was this translation helpful? Give feedback.
-
Here is my final conclusion: It seems that all warnings are treated as errors now because the following options are added automatically -Wall -Werror=all You can resolve the issue with the following entry in platformio.ini build_unflags = -Werror=all This just leaves the warnings as such and does not treat them as errors. |
Beta Was this translation helpful? Give feedback.
-
Hello @pschatzmann and @crosswick, There are other dependencies to arduino-esp32 core: AudioTools.h -> AudioConfig.h -> wants to include esp32-hal-log.h. Which is an arduino file. Do you have to add these also to NoArduino.h? Are there also other dependencies? Has anyone succeeded with no-arduino in esp-idf? If not, I'll try to do it the plattformio way and include arduino as component into my idf-project too. |
Beta Was this translation helpful? Give feedback.
What are the exact error messages ?
I committed some corrections, but I noticed that the -DESP32_CMAKE is only passed properly if it is part of the platformio.ino build_flags = -DESP32_CMAKE