chore: add ESP-IDF installation helper#147
Conversation
There was a problem hiding this comment.
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".
| 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 |
There was a problem hiding this comment.
[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 👍 / 👎.
There was a problem hiding this comment.
Summary
- Updated the ESP-IDF installer helper to clone with
--recurse-submodulesand 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
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68ce715ba6108324a06fa324bd49cb52