forked from adafruit/circuitpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathesp-idf-toolchain.sh
More file actions
executable file
·42 lines (30 loc) · 1.42 KB
/
esp-idf-toolchain.sh
File metadata and controls
executable file
·42 lines (30 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
# -----------------------------------------------------------------------------
# esp-idf-toolchain.sh: install toolchain for CircuitPython
#
# Author: Bernhard Bablok
#
# -----------------------------------------------------------------------------
REPO_ROOT="/workspaces/circuitpython"
echo -e "[esp-idf-toolchain.sh] starting install"
# --- tooling --------------------------------------------------------------
echo -e "[esp-idf-toolchain.sh] fetch packages"
sudo apt-get update
sudo apt-get -y install ninja-build cmake libusb-1.0-0
# --- esp-idf --------------------------------------------------------------
echo -e "[esp-idf-toolchain.sh] installing esp-idf"
cd "$REPO_ROOT/ports/espressif"
esp-idf/install.sh
source esp-idf/export.sh
# --- re-install our packages in venv created by export.sh -----------------
echo -e "[esp-idf-toolchain.sh] updating python-packages"
cd "$REPO_ROOT"
pip3 install --upgrade -r requirements-dev.txt
pip3 install --upgrade -r requirements-doc.txt
# --- and again install esp-idf (needs other versions) ----------------------
echo -e "[esp-idf-toolchain.sh] installing esp-idf (2nd iteration)"
cd "$REPO_ROOT/ports/espressif"
esp-idf/install.sh
# --- update $HOME/.bashrc --------------------------------------------------
echo -e "[esp-idf-toolchain.sh] update environment in .bashrc"
echo -e "\nsource $REPO_ROOT/ports/espressif/esp-idf/export.sh &> /dev/null\n" >> "$HOME"/.bashrc