Skip to content

chore: add ESP-IDF installation helper#147

Merged
baba-dev merged 1 commit into
mainfrom
codex/create-install-script-for-esp-idf-setup
Sep 20, 2025
Merged

chore: add ESP-IDF installation helper#147
baba-dev merged 1 commit into
mainfrom
codex/create-install-script-for-esp-idf-setup

Conversation

@baba-dev

Copy link
Copy Markdown
Owner

Summary

  • add a tools/install_idf.sh helper that installs or updates ESP-IDF to a configurable version and location
  • ensure the script validates prerequisites, runs the ESP-IDF installer, and exports the environment for immediate use
  • provide follow-up guidance so future shells can configure IDF_PATH and access idf.py

Testing

  • bash -n tools/install_idf.sh

https://chatgpt.com/codex/tasks/task_e_68ce715ba6108324a06fa324bd49cb52

@baba-dev baba-dev merged commit b6c1420 into main Sep 20, 2025
1 of 5 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex Review: Here are some suggestions.

Reply with @codex fix comments to fix any unresolved comments.

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

Comment thread tools/install_idf.sh
Comment on lines +27 to +33
if [ ! -d "${IDF_PATH}/.git" ]; then
echo "Cloning ESP-IDF ${ESP_IDF_VERSION} into ${IDF_PATH}"
git clone --depth 1 --branch "${ESP_IDF_VERSION}" "${REPO_URL}" "${IDF_PATH}"
else
echo "Updating existing ESP-IDF checkout at ${IDF_PATH}"
git -C "${IDF_PATH}" fetch --depth 1 origin "${ESP_IDF_VERSION}"
git -C "${IDF_PATH}" reset --hard FETCH_HEAD

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Clone/update ESP-IDF without submodules

The helper clones or updates ESP-IDF with --depth 1 but never fetches the repository’s submodules. ESP-IDF depends heavily on submodules (e.g. Wi‑Fi, USB, NimBLE); a shallow clone without them will succeed, yet subsequent idf.py build invocations will fail because those component directories are missing or stuck at the wrong revision. The script should either add --recurse-submodules to the initial clone and run git submodule update --init --recursive after the reset, or otherwise ensure submodules are synced to the requested release.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codex fix comments

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

  • Updated the ESP-IDF installer helper to clone with --recurse-submodules and synchronize submodules after checking out the requested release, ensuring dependent components are available for builds. tools/install_idf.shL27-L36

Testing

  • bash -n tools/install_idf.sh

View task →

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant