Skip to content

Commit f34bb6c

Browse files
authored
Merge pull request #9 from MATTYGILO/codex/fix-undefined-reference-linking-errors
Add helper script for submodules
2 parents 929684c + 72a4171 commit f34bb6c

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ When building with ESP-IDF 5.4 the following submodule commits have been verifie
3535

3636
These versions are pinned via Git submodules. After cloning the repository run
3737
`git submodule update --init --recursive` to fetch the correct revisions.
38+
If Git submodules cannot be fetched directly (for example in environments without full Git access), run `scripts/fetch_submodules.sh` which downloads the same revisions using plain HTTP archives.

scripts/fetch_submodules.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
4+
# Helper to download and extract an archive from codeload.github.com
5+
# Arguments: repo user/repo, destination directory, commit hash
6+
fetch() {
7+
local repo=$1
8+
local dest=$2
9+
local commit=$3
10+
rm -rf "$dest"
11+
mkdir -p "$dest"
12+
curl -L "https://codeload.github.com/${repo}/tar.gz/${commit}" -o tmp.tar.gz
13+
tar -xzf tmp.tar.gz
14+
mv "${repo##*/}-${commit}"/* "$dest"/
15+
rm -rf "${repo##*/}-${commit}" tmp.tar.gz
16+
}
17+
18+
MICROPYTHON_COMMIT=9bde12597a6980ff87ff0137a2616e6e430a1a0e
19+
ESP_TFLITE_MICRO_COMMIT=772214721682ef2d3eed09cafea777edad55541f
20+
ESP_NN_COMMIT=12129cf04b09af0023127ca7551dc1a363344211
21+
MICROPYTHON_ULAB_COMMIT=a05ec05351260cf48fefc347265b8d8bf29c03f1
22+
23+
fetch espressif/esp-nn third_party/esp-nn "$ESP_NN_COMMIT"
24+
fetch espressif/esp-tflite-micro third_party/esp-tflite-micro "$ESP_TFLITE_MICRO_COMMIT"
25+
fetch micropython/micropython third_party/micropython "$MICROPYTHON_COMMIT"
26+
fetch v923z/micropython-ulab third_party/micropython-ulab "$MICROPYTHON_ULAB_COMMIT"
27+
28+
echo "Submodules downloaded"

0 commit comments

Comments
 (0)