-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for issue_3209. #3210
Fix for issue_3209. #3210
Conversation
#include "esp32-hal-log.h" is mandatory is order to build BLEDevice.cpp. It can't be left up to a compiler variable.
leftovers from when this library was hosted elsewhere :) it was used so it can compile in IDF without Arduino. Just removing it can cause other issues, like if you use Arduino as IDF component and have not selected to forward IDF errors to Arduino's logging. Then you will get compile error for undefined ESP_LOGx |
So what's the solution then? |
do as you have done for all files in the library and change |
that will force the library to use Arduino's logging and since it's a part of it, that is fine :) |
Sorry, that seems backward to me. Isn't the aim of the arduino-esp32 libraries to provide components usable in an Arduino context that map to esp32 APIs? |
what arduino libraries use |
ESP_LOGx is IDF API that is not controllable through the Arduino IDE and API. Once included IDF libs are precompiled, that is what it is for them. Therefore Arduino uses log_x as logging API and that is controllable through the IDE. |
My mistake. |
OK, reopening because I believe I was correct and have run into this again trying to upgrade from 1.0.3 to master. Our conversation became derailed at this comment #3210 (comment). BLEDevice.cpp is failing to compile because it can't find the log_x() functions. It can't find them because they are declared in esp32-hal-log.h and unlike all the other BLE sources which always include esp32-hal-log.h, BLEDevice.cpp only includes esp32-hal-log.h when the compiler var CONFIG_ARDUHAL_ESP_LOG is defined. BLEDevice.spp should always include esp32-hal-log.h instead of omitting it if CONFIG_ARDUHAL_ESP_LOG is not defined. |
so... you made one change to one file, because you had issues with that file. I asked you to make the same change to all files and to replace any occurrence of ESP_LOGx with log_x. If you are not willing to do it, just say so and I'll do the whole thing myself. As-is, I will not merge just that change. |
Sorry, there seems to be some confusion here. As far as I am aware there aren't any arduino-esp32 files that are using ESP_LOGX. |
yup confusion :) |
#include "esp32-hal-log.h" is mandatory is order to build BLEDevice.cpp.
It can't be left up to a compiler variable.