@@ -103,16 +103,24 @@ 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 " = " 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 -Wextra -Werror $debug_flags " > esp8266/platform.local.txt
120
+ echo " compiler.cpp.extra_flags=-Wall -Wextra -Werror $debug_flags " >> esp8266/platform.local.txt
121
+ echo -e " \n----platform.local.txt----"
122
+ cat esp8266/platform.local.txt
123
+ echo -e " \n----\n"
116
124
cd esp8266/tools
117
125
python get.py
118
126
export PATH=" $ide_path :$core_path /tools/xtensa-lx106-elf/bin:$PATH "
@@ -197,10 +205,11 @@ function build_sketches_with_platformio()
197
205
198
206
function install_arduino()
199
207
{
208
+ local debug=$1
200
209
# Install Arduino IDE and required libraries
201
210
echo -e " travis_fold:start:sketch_test_env_prepare"
202
211
cd $TRAVIS_BUILD_DIR
203
- install_ide $HOME /arduino_ide $TRAVIS_BUILD_DIR
212
+ install_ide $HOME /arduino_ide $TRAVIS_BUILD_DIR $debug
204
213
which arduino
205
214
cd $TRAVIS_BUILD_DIR
206
215
install_libraries
@@ -248,13 +257,19 @@ if [ -z "$TRAVIS_BUILD_DIR" ]; then
248
257
fi
249
258
250
259
if [ " $BUILD_TYPE " = " build" ]; then
251
- install_arduino
260
+ install_arduino nodebug
252
261
build_sketches_with_arduino 1 0
253
262
elif [ " $BUILD_TYPE " = " build_even" ]; then
254
- install_arduino
263
+ install_arduino nodebug
255
264
build_sketches_with_arduino 2 0
256
265
elif [ " $BUILD_TYPE " = " build_odd" ]; then
257
- install_arduino
266
+ install_arduino nodebug
267
+ build_sketches_with_arduino 2 1
268
+ elif [ " $BUILD_TYPE " = " debug_even" ]; then
269
+ install_arduino debug
270
+ build_sketches_with_arduino 2 0
271
+ elif [ " $BUILD_TYPE " = " debug_odd" ]; then
272
+ install_arduino debug
258
273
build_sketches_with_arduino 2 1
259
274
elif [ " $BUILD_TYPE " = " platformio" ]; then
260
275
# PlatformIO
0 commit comments