Skip to content

Commit 12ebafc

Browse files
committed
🪚 Improve esp-idf feature
1 parent 8c99f46 commit 12ebafc

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

features/esp-idf/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "esp-idf",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"name": "ESP-IDF",
55
"description": "Install ESP-IDF with selected version and chip targets",
66
"options": {

features/esp-idf/install.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,16 @@ IDF_PY="${IDF_DIR}/tools/idf.py"
88

99
echo "📥 Installing ESP-IDF v${VERSION} for all targets"
1010

11+
# Install dependencies
12+
apt-get update && apt-get install -y \
13+
git wget flex bison gperf python3 python3-pip cmake ninja-build ccache \
14+
libffi-dev libssl-dev dfu-util libusb-1.0-0
15+
16+
export IDF_TOOLS_PATH="${IDF_DIR}/.espressif"
17+
1118
# Check if already installed and version matches
1219
if [ -x "$IDF_PY" ]; then
20+
". ${IDF_DIR}/export.sh"
1321
INSTALLED_VERSION=$("$IDF_PY" --version 2>/dev/null || echo "")
1422
if [[ "$INSTALLED_VERSION" == *"v$VERSION"* ]]; then
1523
echo "✔ ESP-IDF v${VERSION} already installed!"
@@ -20,11 +28,6 @@ if [ -x "$IDF_PY" ]; then
2028
fi
2129
fi
2230

23-
# Install dependencies
24-
apt-get update && apt-get install -y \
25-
git wget flex bison gperf python3 python3-pip cmake ninja-build ccache \
26-
libffi-dev libssl-dev dfu-util libusb-1.0-0
27-
2831
# Clean esp directory
2932
rm -rf "${IDF_DIR:?}/"* "${IDF_DIR:?}"/.[!.]* 2>/dev/null || true
3033

0 commit comments

Comments
 (0)