@@ -103,16 +103,21 @@ function install_ide()
103
103
{
104
104
local ide_path=$1
105
105
local core_path=$2
106
+ local debug=$3
106
107
wget -O arduino.tar.xz https://www.arduino.cc/download.php? f=/arduino-nightly-linux64.tar.xz
107
108
tar xf arduino.tar.xz
108
109
mv arduino-nightly $ide_path
109
110
cd $ide_path /hardware
110
111
mkdir esp8266com
111
112
cd esp8266com
112
113
ln -s $core_path esp8266
114
+ local debug_flags=" "
115
+ if [ " $debug " -eq " debug" ]; then
116
+ debug_flags=" -DDEBUG_ESP_PORT=Serial -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM"
117
+ fi
113
118
# Set custom warnings for all builds (i.e. could add -Wextra at some point)
114
- echo " compiler.c.extra_flags=-Wall -Werror" > esp8266/platform.local.txt
115
- echo " compiler.cpp.extra_flags=-Wall -Werror" >> esp8266/platform.local.txt
119
+ echo " compiler.c.extra_flags=-Wall -Werror $debug_flags " > esp8266/platform.local.txt
120
+ echo " compiler.cpp.extra_flags=-Wall -Werror $debug_flags " >> esp8266/platform.local.txt
116
121
cd esp8266/tools
117
122
python get.py
118
123
export PATH=" $ide_path :$core_path /tools/xtensa-lx106-elf/bin:$PATH "
@@ -197,10 +202,11 @@ function build_sketches_with_platformio()
197
202
198
203
function install_arduino()
199
204
{
205
+ local debug=$1
200
206
# Install Arduino IDE and required libraries
201
207
echo -e " travis_fold:start:sketch_test_env_prepare"
202
208
cd $TRAVIS_BUILD_DIR
203
- install_ide $HOME /arduino_ide $TRAVIS_BUILD_DIR
209
+ install_ide $HOME /arduino_ide $TRAVIS_BUILD_DIR $debug
204
210
which arduino
205
211
cd $TRAVIS_BUILD_DIR
206
212
install_libraries
@@ -248,13 +254,19 @@ if [ -z "$TRAVIS_BUILD_DIR" ]; then
248
254
fi
249
255
250
256
if [ " $BUILD_TYPE " = " build" ]; then
251
- install_arduino
257
+ install_arduino nodebug
252
258
build_sketches_with_arduino 1 0
253
259
elif [ " $BUILD_TYPE " = " build_even" ]; then
254
- install_arduino
260
+ install_arduino nodebug
255
261
build_sketches_with_arduino 2 0
256
262
elif [ " $BUILD_TYPE " = " build_odd" ]; then
257
- install_arduino
263
+ install_arduino nodebug
264
+ build_sketches_with_arduino 2 1
265
+ elif [ " $BUILD_TYPE " = " debug_even" ]; then
266
+ install_arduino debug
267
+ build_sketches_with_arduino 2 0
268
+ elif [ " $BUILD_TYPE " = " debug_odd" ]; then
269
+ install_arduino debug
258
270
build_sketches_with_arduino 2 1
259
271
elif [ " $BUILD_TYPE " = " platformio" ]; then
260
272
# PlatformIO
0 commit comments