I am currently working on a project to create a very simple embedded project for an esp32dev board.
I imported configuration files from the helloworld example project and it compiles perfectly.
My problem is that it compiles unneeded libraries such as the bluetooth (bluedroid) library. It is not used in my application and I would like to ignore this libs. I tried multiple solutions:
lib_ignore in the ini file
Remove the #define CONFIG_BLUEDROID_ENABLED and all relaed bluetooth defines from the sdkconfig.h file. The only result is that the compilation of the bluedroid lib fails bescause of the missing defines.
Create my own (with the default options) sdkconfig.h with the ESP32 tool (idf.py menuconfig and idf.py build) and copy it in my project. Same result, the compilation failed because of the missing bluedroid defines.
I was wondering if it was coming form the board esp32dev.json configuration file. Removing the connectivity node didn’t change anything.
I can’t find why this is compiled and where it is specified.
Here is my plateform.ini:
platform = espressif32
framework = espidf
board = esp32dev
board_build.partitions = partitions.csv
monitor_speed = 115200
lib_ldf_mode = deep+
The output gives me 0 dependencies. And the whole compilation starts again.
Please send help
Yes exactly. I just want to exclude that and other unused libs from the compilation as I have no need for it. Everytime I modify a Header file, it recompiles all the components and I didn’t find how to avoid that.
In file included from C:\Users\nhh\.platformio\packages\framework-espidf\components\bt\bluedroid\bta\gatt\bta_gattc_act.c:27:0:
C:/Users/nhh/.platformio/packages/framework-espidf/components/bt/bluedroid/common/include/common/bt_target.h:866:37: error: 'MAX_ACL_CONNECTIONS' undeclared here (not in a function)
#define MAX_L2CAP_CHANNELS MAX_ACL_CONNECTIONS //This is used in the BLE client when start connected with the peer device
It looks for MAX_ACL_CONNECTIONS but I removed every bluetooth related define from the sdkconfig.h in order to try to exclude the lib from the compilation.
Does that mean I have to manually modify the ignore_dirs list in the espidf.py file to ignore components? This solution seems very hard to maintain between projects as I might need the component for another project and I would have to modify it again. Did I miss a way to do it in the .ini file?
I understand that it is the default behaviour but as it takes 5 min to recompile my project everytime, I’m just looking for a way to avoid the recompilation of unused components.
EDIT: I tried modifying the ignore_dirs in C:\Users\user\.platformio\platforms\espressif32\builder\frameworks\espidf.py and it worked perferctly. As I said before, this solution is okay and works for now but is there any other way to do it and make it project dependent with plateformio ?