Skip to content

Commit efa1218

Browse files
cleveHEXladyada
authored andcommitted
Use stable ESP32 library + fixes (#29)
* Use stable esp32 library * Fixes * Version bump + cleanup * Bump IDE version * Fix * Switch to old version for testing purposes * Switch back to newer version of IDE
1 parent 38c5f8e commit efa1218

File tree

2 files changed

+11
-30
lines changed

2 files changed

+11
-30
lines changed

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ git:
99
quiet: true
1010
env:
1111
global:
12-
- ARDUINO_IDE_VERSION="1.8.5"
12+
- ARDUINO_IDE_VERSION="1.8.6"
1313
before_install:
1414
- source $TRAVIS_BUILD_DIR/install.sh
1515
script:
@@ -21,4 +21,4 @@ script:
2121
notifications:
2222
email:
2323
on_success: change
24-
on_failure: change
24+
on_failure: change

install.sh

+9-28
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ fi
88

99
# associative array for the platforms that will be verified in build_main_platforms()
1010
# this will be eval'd in the functions below because arrays can't be exported
11-
# Uno is ATmega328, Zero is SAMD21G18, ESP8277, Leonardo is ATmega32u4, M4 is SAMD51, Mega is ATmega2560, ESP32
12-
export MAIN_PLATFORMS='declare -A main_platforms=( [uno]="arduino:avr:uno" [due]="arduino:sam:arduino_due_x" [zero]="arduino:samd:arduino_zero_native" [esp8266]="esp8266:esp8266:huzzah:FlashSize=4M3M,CpuFrequency=80" [leonardo]="arduino:avr:leonardo" [m4]="adafruit:samd:adafruit_metro_m4" [mega2560]="arduino:avr:mega:cpu=atmega2560" [esp32]="espressif:esp32:featheresp32:FlashFreq=80" )'
11+
# Uno is ATmega328, Zero is SAMD21G18, ESP8266, Leonardo is ATmega32u4, M4 is SAMD51, Mega is ATmega2560, ESP32
12+
export MAIN_PLATFORMS='declare -A main_platforms=( [uno]="arduino:avr:uno" [due]="arduino:sam:arduino_due_x" [zero]="arduino:samd:arduino_zero_native" [esp8266]="esp8266:esp8266:huzzah:FlashSize=4M3M,CpuFrequency=80" [leonardo]="arduino:avr:leonardo" [m4]="adafruit:samd:adafruit_metro_m4" [mega2560]="arduino:avr:mega:cpu=atmega2560" [esp32]="esp32:esp32:featheresp32:FlashFreq=80" )'
1313

1414
# associative array for other platforms that can be called explicitly in .travis.yml configs
1515
# this will be eval'd in the functions below because arrays can't be exported
@@ -21,7 +21,7 @@ export SAMD_PLATFORMS='declare -A samd_platforms=( [zero]="arduino:samd:arduino_
2121

2222
export M4_PLATFORMS='declare -A m4_platforms=( [m4]="adafruit:samd:adafruit_metro_m4" )'
2323

24-
export IO_PLATFORMS='declare -A io_platforms=( [zero]="arduino:samd:arduino_zero_native" [esp8266]="esp8266:esp8266:huzzah:FlashSize=4M3M,CpuFrequency=80" [esp32]="espressif:esp32:featheresp32:FlashFreq=80" )'
24+
export IO_PLATFORMS='declare -A io_platforms=( [zero]="arduino:samd:arduino_zero_native" [esp8266]="esp8266:esp8266:huzzah:FlashSize=4M3M,CpuFrequency=80" [esp32]="esp32:esp32:featheresp32:FlashFreq=80" )'
2525

2626
# make display available for arduino CLI
2727
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_1.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :1 -ac -screen 0 1280x1024x16
@@ -37,7 +37,7 @@ echo "########################################################################";
3737

3838
# if .travis.yml does not set version
3939
if [ -z $ARDUINO_IDE_VERSION ]; then
40-
export ARDUINO_IDE_VERSION="1.8.5"
40+
export ARDUINO_IDE_VERSION="1.8.6"
4141
echo "NOTE: YOUR .TRAVIS.YML DOES NOT SPECIFY ARDUINO IDE VERSION, USING $ARDUINO_IDE_VERSION"
4242
fi
4343

@@ -46,7 +46,7 @@ if [ ! -f $HOME/arduino_ide/$ARDUINO_IDE_VERSION ] && [ -f $HOME/arduino_ide/ard
4646
echo -n "DIFFERENT VERSION OF ARDUINO IDE REQUESTED: "
4747
shopt -s extglob
4848
cd $HOME/arduino_ide/
49-
rm -r -f !(esp32)
49+
rm -rf *
5050
if [ $? -ne 0 ]; then echo -e """$RED""\xe2\x9c\x96"; else echo -e """$GREEN""\xe2\x9c\x93"; fi
5151
cd $OLDPWD
5252
fi
@@ -80,31 +80,12 @@ echo "########################################################################";
8080

8181
# install the due, esp8266, and adafruit board packages
8282
echo -n "ADD PACKAGE INDEX: "
83-
DEPENDENCY_OUTPUT=$(arduino --pref "boardsmanager.additional.urls=https://adafruit.github.io/arduino-board-index/package_adafruit_index.json,http://arduino.esp8266.com/stable/package_esp8266com_index.json" --save-prefs 2>&1)
83+
DEPENDENCY_OUTPUT=$(arduino --pref "boardsmanager.additional.urls=https://adafruit.github.io/arduino-board-index/package_adafruit_index.json,http://arduino.esp8266.com/stable/package_esp8266com_index.json,https://dl.espressif.com/dl/package_esp32_index.json" --save-prefs 2>&1)
8484
if [ $? -ne 0 ]; then echo -e """$RED""\xe2\x9c\x96"; else echo -e """$GREEN""\xe2\x9c\x93"; fi
8585

8686
echo -n "ESP32: "
87-
88-
if [ ! -d $HOME/Arduino/hardware/espressif ]; then
89-
DEPENDENCY_OUTPUT=$(mkdir -p $HOME/Arduino/hardware/espressif &&
90-
cd $HOME/Arduino/hardware/espressif &&
91-
echo -n "DOWNLOADING: " &&
92-
git clone https://github.com/espressif/arduino-esp32.git esp32 -q &&
93-
cd esp32/tools/ &&
94-
python get.py &&
95-
cd $TRAVIS_BUILD_DIR
96-
)
97-
else
98-
DEPENDENCY_OUTPUT=$(cd $HOME/Arduino/hardware/espressif &&
99-
echo -n "UPDATING: " &&
100-
git pull origin master -q &&
101-
cd esp32/tools/ &&
102-
python get.py &&
103-
cd $TRAVIS_BUILD_DIR
104-
)
105-
fi
106-
107-
if [ $? -ne 0 ]; then echo -e """$RED""\xe2\x9c\x96"; else echo -e """$GREEN""\xe2\x9c\x93"; fi
87+
DEPENDENCY_OUTPUT=$(arduino --install-boards esp32:esp32 2>&1)
88+
if [ $? -ne 0 ]; then echo -e "\xe2\x9c\x96 OR CACHED"; else echo -e """$GREEN""\xe2\x9c\x93"; fi
10889

10990
echo -n "DUE: "
11091
DEPENDENCY_OUTPUT=$(arduino --install-boards arduino:sam 2>&1)
@@ -665,4 +646,4 @@ function json_main_platforms()
665646

666647
echo -e "||||||||||||||||||||||||||||| JSON STATUS ||||||||||||||||||||||||||||||\n"
667648

668-
}
649+
}

0 commit comments

Comments
 (0)