Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Building from source #8827

Unanswered
jefflongo asked this question in Q&A
Nov 3, 2023 · 1 comments · 3 replies
Discussion options

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...

You must be logged in to vote

Replies: 1 comment 3 replies

Comment options

what exactly do you want to build?

You must be logged in to vote
3 replies
Comment options

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.

Comment options

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.4 branch in the lib-builder repo, since my target arduino-esp32 tag targets idf 4.4.x
  • add CONFIG_BT_CTRL_MODEM_SLEEP=y to configs/defconfig.esp32c3 in lib-builder
  • run lib-builder as follows: ./build.sh -t esp32c3 -I release/v4.4 -i v4.4.6
    • sometimes it's needed to cd into esp-idf and reset everything to clean master branch as the build script sometimes leaves this repo in a pretty broken state..
  • 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.txt causes errors because the paths to the compiling tools and esptool are incorrect in the generated platform.txt

not the most intuitive process but it works...

Comment options

@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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /