Updated esp32 board and tools install.

This commit is contained in:
cyteen 2020-10-11 13:27:17 +01:00
parent 8614161578
commit 12fce2457b
1 changed files with 7 additions and 5 deletions

View File

@ -4,7 +4,7 @@ ARDUINO_VERSION=1.8.13
#ARDUINO_HOME=~/
ARDUINO_HOME=/opt
ARDUINO_DIR=${ARDUINO_HOME}/arduino-${ARDUINO_VERSION}/
ARDUINO_TOOLS_DIR=${ARDUINO_TOOLS_DIR}
ARDUINO_TOOLS_DIR=${ARDUINO_DIR}
ADD_URLS=
mkdir "${ARDUINO_TOOLS_DIR}"
@ -18,7 +18,7 @@ wget -c https://downloads.arduino.cc/arduino-${ARDUINO_VERSION}-linux64.tar.xz &
tar xf /var/tmp/arduino-${ARDUINO_VERSION}-linux64.tar.xz
usermod -a -G dialout "${USER}" && \
apt install -y git python-serial
apt install -y git python3-serial
#https://raw.githubusercontent.com/espressif/arduino-esp32/master/package/package_esp32_index.template.json
#http://arduino.esp8266.com/stable/package_esp8266com_index.json
@ -28,20 +28,22 @@ apt install -y git python-serial
# https://github.com/arduino/Arduino/wiki/Unofficial-list-of-3rd-party-boards-support-urls
# Install ESP32 core
ADD_URLS="${ADD_URLS},https://raw.githubusercontent.com/espressif/arduino-esp32/master/package/package_esp32_index.template.json"
ADD_URLS="${ADD_URLS},https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json"
#ADD_URLS="${ADD_URLS}, https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json"
${ARDUINO_DIR}/arduino \
--pref boardsmanager.additional.urls=${ADD_URLS} \
--save-prefs
# arduino [--install-boards package name:platform architecture[:version]]
${ARDUINO_DIR}/arduino --install-boards esp32:esp32
# ESP32-core from git 369MB
mkdir -p ${ARDUINO_DIR}/hardware/espressif && \
cd ${ARDUINO_DIR}/hardware/espressif && \
git clone https://github.com/espressif/arduino-esp32.git esp32 && \
cd esp32 && \
git submodule update --init --recursive && \
cd esp32/tools/ && \
python get.py
cd tools/ && \
python3 get.py
# Install ESP8266
cd /var/tmp || exit