-
Notifications
You must be signed in to change notification settings - Fork 7.7k
-
Is there any documentation on how to build from source, to say, change a board Kconfig option? The best I've found is trying to run the build script in https://github.com/espressif/esp32-arduino-lib-builder but I've not had much success when trying to reference a particular tag for arduino-esp32 and esp-idf...
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 3 replies
-
what exactly do you want to build?
Beta Was this translation helpful? Give feedback.
All reactions
-
Specifically, I want to build the arduino-esp32 library (so building the static library/header bundle) to enable CONFIG_BT_CTRL_MODEM_SLEEP as a workaround for #5909, such that I can compile an existing application of mine with arduino-cli with this option enabled.
I'd like to be able to do this while targeting a specific tag from this repo with the associated esp-idf version (i.e. 2.0.12 with esp-idf 4.4.5). My understanding thus far is that esp32-arduino-lib-builder is the way you are intended to do this, adding the option in the config file in lib-builder, building the library then overwriting the files in your local installation. I have not been able to build a version of the library using lib builder that has successfully compiled and linked with my existing application yet.
Beta Was this translation helpful? Give feedback.
All reactions
-
For further clarification, I'd like to understand what the recommended procedure is to build for a specific arduino-esp32 git tag using lib-builder.
EDIT: I am finally able to successfully build both the library and my application with the Kconfig change. My procedure is as follows:
- checkout the
release/v4.4branch in the lib-builder repo, since my target arduino-esp32 tag targets idf 4.4.x - add
CONFIG_BT_CTRL_MODEM_SLEEP=ytoconfigs/defconfig.esp32c3in lib-builder - run lib-builder as follows:
./build.sh -t esp32c3 -I release/v4.4 -i v4.4.6- sometimes it's needed to
cdintoesp-idfand reset everything to clean master branch as the build script sometimes leaves this repo in a pretty broken state..
- sometimes it's needed to
- install targeted arduino-esp32 tag with arduino-cli:
arduino-cli core install esp32:esp32@major.minor.revision - copy ONLY the
out/toolsfrom lib-builder to overwrite$HOME/.arduino15/packages/esp32/hardware/esp32/major.minor.revision/tools- copying the
platform.txtcauses errors because the paths to the compiling tools and esptool are incorrect in the generatedplatform.txt
- copying the
not the most intuitive process but it works...
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
@jefflongo Thank you for not replying "I fixed it" and leaving no details about how you figured it out. 1000 thanks :)
See also https://mm.kno.wled.ge/advanced/compile-arduino-esp32/
Beta Was this translation helpful? Give feedback.