Skip to content

Commit 92c5426

Browse files
Wed 14 Aug 2019 17:53:51 EDT - fixed installer script
1 parent 8ef1f89 commit 92c5426

File tree

1 file changed

+70
-7
lines changed

1 file changed

+70
-7
lines changed

Scripts/helpers/esp32

Lines changed: 70 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,63 @@
11
#!/bin/zsh
22

3+
function install_esp32() {
4+
python=python
5+
pip=pip
6+
7+
mkdir -p ~/Arduino/libraries/
8+
mkdir -p ~/Arduino/hardware/
9+
10+
#sudo usermod -a -G dialout $USER
11+
#sudo apt update &&
12+
#sudo apt install -yy libncurses5 git flex bison gperf ffmpeg python-pyserial python-pip
13+
14+
git clone https://github.com/hardkernel/ODROID-GO.git ~/Arduino/libraries/ODROID-GO
15+
16+
tmpdir=`mktemp -d`
17+
cd $tmpdir &&
18+
wget https://bootstrap.pypa.io/get-pip.py &&
19+
sudo -H $python get-pip.py &&
20+
sudo -H $pip install pyserial
21+
sudo rm -rf $tmpdir
22+
23+
mkdir -p ~/Arduino/hardware/espressif
24+
cd ~/Arduino/hardware/espressif &&
25+
git clone https://github.com/espressif/arduino-esp32.git esp32
26+
27+
cd ~/Arduino/hardware/espressif/esp32 &&
28+
git submodule update --init --recursive
29+
30+
cd ~/Arduino/hardware/espressif/esp32/tools &&
31+
$python get.py
32+
33+
mkdir -p ~/esp/
34+
cd ~/esp &&
35+
git clone https://github.com/OtherCrashOverride/esp-idf --recursive esp-idf-odroidgo &&
36+
$python -m pip install --user -r ~/esp/esp-idf-odroidgo/docs/requirements.txt &&
37+
git clone -b v3.2 --recursive https://github.com/espressif/esp-idf.git esp-idf-official &&
38+
$python -m pip install --user -r ~/esp/esp-idf-official/requirements.txt &&
39+
ln -s ~/esp/esp-idf-official ~/esp/esp-idf
40+
41+
setup_esp32
42+
}
43+
44+
function setup_esp32() {
45+
export IDF_PATH="$HOME/esp/esp-idf"
46+
47+
if [ -f "$HOME/esp/esp-idf/add_path.sh" ]; then
48+
source "$HOME/esp/esp-idf/add_path.sh" > /dev/null 2> /dev/null || true
49+
fi
50+
51+
if [ -d "$HOME/Arduino/hardware/espressif/esp32/tools/xtensa-esp32-elf/bin" ]; then
52+
export PATH="$HOME/Arduino/hardware/espressif/esp32/tools/xtensa-esp32-elf/bin":$PATH
53+
fi
54+
}
55+
56+
export setup_esp32
57+
export install_esp32
58+
59+
clear
60+
361
echo "\n--------------------------------------------------------------------------"
462
echo "\n${squid} ${red}(Re)Install ${cyan}ESP32 IDF? ${nc}[y/${white}N${nc}]"
563
echo "\n--------------------------------------------------------------------------"
@@ -10,11 +68,16 @@ then
1068
echo "\n--------------------------------------------------------------------------"
1169
echo "\n${fox} ${blue}Processing ${cyan}ESP32 IDF${nc}"
1270
echo "\n--------------------------------------------------------------------------"
13-
cd ~/esp
14-
#git clone --recursive git@github.com:OtherCrashOverride/esp-idf.git
15-
git clone -b release/v3.2-odroid --single-branch git@github.com:OtherCrashOverride/esp-idf.git --recursive
16-
cd ~/esp/esp-idf
17-
git submodule update --init --recursive
18-
./install.sh
71+
# cd ~/esp
72+
# git clone --recursive https://github.com/espressif/esp-idf.git
73+
# cd ~/esp/esp-idf
74+
# git submodule update --init --recursive
75+
# ./install.sh
76+
# cd ~/esp
77+
# mv esp-idf/ esp-idf-espressif/
78+
79+
# git clone -b release/v3.2-odroid --single-branch git@github.com:OtherCrashOverride/esp-idf.git --recursive
80+
# git submodule update --init --recursive
81+
82+
install_esp32
1983
fi
20-
clear

0 commit comments

Comments
 (0)