Skip to content

Commit 97b8bf9

Browse files
committed
Merge branch 'master' into dnssrvasync
2 parents 4998243 + 237a3fe commit 97b8bf9

File tree

494 files changed

+342351
-2453
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

494 files changed

+342351
-2453
lines changed

.github/ISSUE_TEMPLATE/Issue-report.yml

+3
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ body:
4141
options:
4242
- latest master (checkout manually)
4343
- latest development Release Candidate (RC-X)
44+
- v2.0.8
45+
- v2.0.7
46+
- v2.0.6
4447
- v2.0.5
4548
- v2.0.4
4649
- v2.0.3

.github/scripts/find_new_boards.sh

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
#!/bin/bash
2+
3+
# Get inputs from command
4+
owner_repository=$1
5+
pr_number=$2
6+
7+
url="https://api.github.com/repos/$owner_repository/pulls/$pr_number/files"
8+
echo $url
9+
10+
# Get changes in boards.txt file from PR
11+
Patch=$(curl $url | jq -r '.[] | select(.filename == "boards.txt") | .patch ')
12+
13+
# Extract only changed lines number and count
14+
substring_patch=$(echo "$Patch" | grep -o '@@[^@]*@@')
15+
16+
params_array=()
17+
18+
IFS=$'\n' read -d '' -ra params <<< $(echo "$substring_patch" | grep -oE '[-+][0-9]+,[0-9]+')
19+
20+
for param in "${params[@]}"
21+
do
22+
echo "The parameter is $param"
23+
params_array+=("$param")
24+
done
25+
26+
boards_array=()
27+
previous_board=""
28+
file="boards.txt"
29+
30+
# Loop through boards.txt file and extract all boards that were added
31+
for (( c=0; c<${#params_array[@]}; c+=2 ))
32+
do
33+
deletion_count=$( echo "${params_array[c]}" | cut -d',' -f2 | cut -d' ' -f1 )
34+
addition_line=$( echo "${params_array[c+1]}" | cut -d'+' -f2 | cut -d',' -f1 )
35+
addition_count=$( echo "${params_array[c+1]}" | cut -d'+' -f2 | cut -d',' -f2 | cut -d' ' -f1 )
36+
addition_end=$(($addition_line+$addition_count))
37+
38+
addition_line=$(($addition_line + 3))
39+
addition_end=$(($addition_end - $deletion_count))
40+
41+
echo $addition_line
42+
echo $addition_end
43+
44+
i=0
45+
46+
while read -r line
47+
do
48+
i=$((i+1))
49+
if [ $i -lt $addition_line ]
50+
then
51+
continue
52+
elif [ $i -gt $addition_end ]
53+
then
54+
break
55+
fi
56+
board_name=$(echo "$line" | cut -d '.' -f1 | cut -d '#' -f1)
57+
if [ "$board_name" != "" ]
58+
then
59+
if [ "$board_name" != "$previous_board" ]
60+
then
61+
boards_array+=("espressif:esp32:$board_name")
62+
previous_board="$board_name"
63+
echo "Added 'espressif:esp32:$board_name' to array"
64+
fi
65+
fi
66+
done < "$file"
67+
done
68+
69+
# Create JSON like string with all boards found and pass it to env variable
70+
board_count=${#boards_array[@]}
71+
72+
if [ $board_count -gt 0 ]
73+
then
74+
json_matrix='{"fqbn": ['
75+
for board in ${boards_array[@]}
76+
do
77+
json_matrix+='"'$board'"'
78+
if [ $board_count -gt 1 ]
79+
then
80+
json_matrix+=","
81+
fi
82+
board_count=$(($board_count - 1))
83+
done
84+
json_matrix+=']}'
85+
86+
echo $json_matrix
87+
echo "FQBNS=${json_matrix}" >> $GITHUB_ENV
88+
else
89+
echo "FQBNS=" >> $GITHUB_ENV
90+
fi
+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/bin/bash
2+
3+
OSBITS=`arch`
4+
if [[ "$OSTYPE" == "linux"* ]]; then
5+
export OS_IS_LINUX="1"
6+
if [[ "$OSBITS" == "i686" ]]; then
7+
OS_NAME="linux32"
8+
elif [[ "$OSBITS" == "x86_64" ]]; then
9+
OS_NAME="linux64"
10+
elif [[ "$OSBITS" == "armv7l" || "$OSBITS" == "aarch64" ]]; then
11+
OS_NAME="linuxarm"
12+
else
13+
OS_NAME="$OSTYPE-$OSBITS"
14+
echo "Unknown OS '$OS_NAME'"
15+
exit 1
16+
fi
17+
elif [[ "$OSTYPE" == "darwin"* ]]; then
18+
export OS_IS_MACOS="1"
19+
OS_NAME="macosx"
20+
elif [[ "$OSTYPE" == "cygwin" ]] || [[ "$OSTYPE" == "msys" ]] || [[ "$OSTYPE" == "win32" ]]; then
21+
export OS_IS_WINDOWS="1"
22+
OS_NAME="windows"
23+
else
24+
OS_NAME="$OSTYPE-$OSBITS"
25+
echo "Unknown OS '$OS_NAME'"
26+
exit 1
27+
fi
28+
export OS_NAME
29+
30+
if [ "$OS_IS_MACOS" == "1" ]; then
31+
export ARDUINO_IDE_PATH="$HOME/bin"
32+
export ARDUINO_USR_PATH="$HOME/Documents/Arduino"
33+
elif [ "$OS_IS_WINDOWS" == "1" ]; then
34+
export ARDUINO_IDE_PATH="$HOME/bin"
35+
export ARDUINO_USR_PATH="$HOME/Documents/Arduino"
36+
else
37+
export ARDUINO_IDE_PATH="$HOME/bin"
38+
export ARDUINO_USR_PATH="$HOME/Arduino"
39+
fi
40+
41+
if [ ! -d "$ARDUINO_IDE_PATH" ] || [ ! -f "$ARDUINO_IDE_PATH/arduino-cli" ]; then
42+
echo "Installing Arduino CLI on $OS_NAME ..."
43+
mkdir -p "$ARDUINO_IDE_PATH"
44+
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR="$ARDUINO_IDE_PATH" sh
45+
fi
46+

.github/scripts/install-platformio-esp32.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
export PLATFORMIO_ESP32_PATH="$HOME/.platformio/packages/framework-arduinoespressif32"
44
PLATFORMIO_ESP32_URL="https://github.com/platformio/platform-espressif32.git"
55

6-
TOOLCHAIN_VERSION="8.4.0+2021r2-patch3"
7-
ESPTOOLPY_VERSION="~1.30100.0"
6+
TOOLCHAIN_VERSION="8.4.0+2021r2-patch5"
7+
ESPTOOLPY_VERSION="~1.40400.0"
88
ESPRESSIF_ORGANIZATION_NAME="espressif"
99

1010
echo "Installing Python Wheel ..."

.github/scripts/on-push.sh

+15-26
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ function build(){
99
local fqbn=$2
1010
local chunk_index=$3
1111
local chunks_cnt=$4
12-
local sketches=$5
12+
shift; shift; shift; shift;
13+
local sketches=$*
1314

1415
local BUILD_SKETCH="${SCRIPTS_DIR}/sketch_utils.sh build"
1516
local BUILD_SKETCHES="${SCRIPTS_DIR}/sketch_utils.sh chunk_build"
@@ -24,15 +25,15 @@ function build(){
2425
${BUILD_SKETCHES} ${args}
2526
else
2627
for sketch in ${sketches}; do
27-
args+=" -s $(dirname $sketch)"
28-
if [ "$OS_IS_WINDOWS" == "1" ]; then
28+
local sargs="$args -s $(dirname $sketch)"
29+
if [ "$OS_IS_WINDOWS" == "1" ] && [ -d "$ARDUINO_IDE_PATH/tools-builder" ]; then
2930
local ctags_version=`ls "$ARDUINO_IDE_PATH/tools-builder/ctags/"`
3031
local preprocessor_version=`ls "$ARDUINO_IDE_PATH/tools-builder/arduino-preprocessor/"`
3132
win_opts="-prefs=runtime.tools.ctags.path=$ARDUINO_IDE_PATH/tools-builder/ctags/$ctags_version
3233
-prefs=runtime.tools.arduino-preprocessor.path=$ARDUINO_IDE_PATH/tools-builder/arduino-preprocessor/$preprocessor_version"
33-
args+=" ${win_opts}"
34+
sargs+=" ${win_opts}"
3435
fi
35-
${BUILD_SKETCH} ${args}
36+
${BUILD_SKETCH} ${sargs}
3637
done
3738
fi
3839
}
@@ -59,7 +60,8 @@ fi
5960

6061
SCRIPTS_DIR="./.github/scripts"
6162
if [ "$BUILD_PIO" -eq 0 ]; then
62-
source ${SCRIPTS_DIR}/install-arduino-ide.sh
63+
#source ${SCRIPTS_DIR}/install-arduino-ide.sh
64+
source ${SCRIPTS_DIR}/install-arduino-cli.sh
6365
source ${SCRIPTS_DIR}/install-arduino-core-esp32.sh
6466

6567
FQBN_ESP32="espressif:esp32:esp32:PSRAM=enabled,PartitionScheme=huge_app"
@@ -71,11 +73,13 @@ if [ "$BUILD_PIO" -eq 0 ]; then
7173
$ARDUINO_ESP32_PATH/libraries/WiFiClientSecure/examples/WiFiClientSecure/WiFiClientSecure.ino\
7274
$ARDUINO_ESP32_PATH/libraries/BLE/examples/BLE_server/BLE_server.ino\
7375
$ARDUINO_ESP32_PATH/libraries/ESP32/examples/Camera/CameraWebServer/CameraWebServer.ino\
76+
$ARDUINO_ESP32_PATH/libraries/Insights/examples/MinimalDiagnostics/MinimalDiagnostics.ino\
7477
"
7578

7679
SKETCHES_ESP32XX="\
7780
$ARDUINO_ESP32_PATH/libraries/WiFiClientSecure/examples/WiFiClientSecure/WiFiClientSecure.ino\
7881
$ARDUINO_ESP32_PATH/libraries/WiFi/examples/WiFiClient/WiFiClient.ino\
82+
$ARDUINO_ESP32_PATH/libraries/Insights/examples/MinimalDiagnostics/MinimalDiagnostics.ino\
7983
"
8084

8185
build "esp32s3" $FQBN_ESP32S3 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
@@ -93,26 +97,11 @@ else
9397
build_pio_sketch "$BOARD" "$OPTIONS" "$PLATFORMIO_ESP32_PATH/libraries/BLE/examples/BLE_server/BLE_server.ino" && \
9498
build_pio_sketch "$BOARD" "$OPTIONS" "$PLATFORMIO_ESP32_PATH/libraries/ESP32/examples/Camera/CameraWebServer/CameraWebServer.ino"
9599

96-
# PlatformIO ESP32 Test
97-
# OPTIONS="board_build.mcu = esp32s2"
98-
# build_pio_sketch "$BOARD" "$OPTIONS" "$PLATFORMIO_ESP32_PATH/libraries/WiFi/examples/WiFiClient/WiFiClient.ino" && \
99-
# build_pio_sketch "$BOARD" "$OPTIONS" "$PLATFORMIO_ESP32_PATH/libraries/WiFiClientSecure/examples/WiFiClientSecure/WiFiClientSecure.ino"
100-
101-
python -m platformio ci --board "$BOARD" "$PLATFORMIO_ESP32_PATH/libraries/WiFi/examples/WiFiClient" --project-option="board_build.mcu = esp32s2" --project-option="board_build.partitions = huge_app.csv"
102-
python -m platformio ci --board "$BOARD" "$PLATFORMIO_ESP32_PATH/libraries/WiFi/examples/WiFiClient" --project-option="board_build.mcu = esp32c3" --project-option="board_build.partitions = huge_app.csv"
103-
104-
echo "Hacking in S3 support ..."
105-
replace_script="import json; import os;"
106-
replace_script+="fp=open(os.path.expanduser('~/.platformio/platforms/espressif32/platform.json'), 'r+');"
107-
replace_script+="data=json.load(fp);"
108-
replace_script+="data['packages']['toolchain-xtensa-esp32']['optional']=True;"
109-
replace_script+="data['packages']['toolchain-xtensa-esp32s3']['optional']=False;"
110-
replace_script+="data['packages']['tool-esptoolpy']['owner']='tasmota';"
111-
replace_script+="data['packages']['tool-esptoolpy']['version']='https://github.com/tasmota/esptool/releases/download/v4.2.1/esptool-4.2.1.zip';"
112-
replace_script+="fp.seek(0);fp.truncate();json.dump(data, fp, indent=2);fp.close()"
113-
python -c "$replace_script"
114-
115-
python -m platformio ci --board "$BOARD" "$PLATFORMIO_ESP32_PATH/libraries/WiFi/examples/WiFiClient" --project-option="board_build.mcu = esp32s3" --project-option="board_build.partitions = huge_app.csv"
100+
# Basic sanity testing for other series
101+
for board in "esp32-c3-devkitm-1" "esp32-s2-saola-1" "esp32-s3-devkitc-1"
102+
do
103+
python -m platformio ci --board "$board" "$PLATFORMIO_ESP32_PATH/libraries/WiFi/examples/WiFiClient" --project-option="board_build.partitions = huge_app.csv"
104+
done
116105

117106
#build_pio_sketches "$BOARD" "$OPTIONS" "$PLATFORMIO_ESP32_PATH/libraries"
118107
fi

.github/scripts/on-release.sh

+24-17
Original file line numberDiff line numberDiff line change
@@ -171,20 +171,22 @@ mkdir -p "$PKG_DIR/tools"
171171

172172
# Copy all core files to the package folder
173173
echo "Copying files for packaging ..."
174-
cp -f "$GITHUB_WORKSPACE/boards.txt" "$PKG_DIR/"
175-
cp -f "$GITHUB_WORKSPACE/package.json" "$PKG_DIR/"
176-
cp -f "$GITHUB_WORKSPACE/programmers.txt" "$PKG_DIR/"
177-
cp -Rf "$GITHUB_WORKSPACE/cores" "$PKG_DIR/"
178-
cp -Rf "$GITHUB_WORKSPACE/libraries" "$PKG_DIR/"
179-
cp -Rf "$GITHUB_WORKSPACE/variants" "$PKG_DIR/"
180-
cp -f "$GITHUB_WORKSPACE/tools/espota.exe" "$PKG_DIR/tools/"
181-
cp -f "$GITHUB_WORKSPACE/tools/espota.py" "$PKG_DIR/tools/"
182-
cp -f "$GITHUB_WORKSPACE/tools/esptool.py" "$PKG_DIR/tools/"
183-
cp -f "$GITHUB_WORKSPACE/tools/gen_esp32part.py" "$PKG_DIR/tools/"
184-
cp -f "$GITHUB_WORKSPACE/tools/gen_esp32part.exe" "$PKG_DIR/tools/"
185-
cp -Rf "$GITHUB_WORKSPACE/tools/partitions" "$PKG_DIR/tools/"
186-
cp -Rf "$GITHUB_WORKSPACE/tools/sdk" "$PKG_DIR/tools/"
187-
cp -f $GITHUB_WORKSPACE/tools/platformio-build*.py "$PKG_DIR/tools/"
174+
cp -f "$GITHUB_WORKSPACE/boards.txt" "$PKG_DIR/"
175+
cp -f "$GITHUB_WORKSPACE/package.json" "$PKG_DIR/"
176+
cp -f "$GITHUB_WORKSPACE/programmers.txt" "$PKG_DIR/"
177+
cp -Rf "$GITHUB_WORKSPACE/cores" "$PKG_DIR/"
178+
cp -Rf "$GITHUB_WORKSPACE/libraries" "$PKG_DIR/"
179+
cp -Rf "$GITHUB_WORKSPACE/variants" "$PKG_DIR/"
180+
cp -f "$GITHUB_WORKSPACE/tools/espota.exe" "$PKG_DIR/tools/"
181+
cp -f "$GITHUB_WORKSPACE/tools/espota.py" "$PKG_DIR/tools/"
182+
cp -f "$GITHUB_WORKSPACE/tools/gen_esp32part.py" "$PKG_DIR/tools/"
183+
cp -f "$GITHUB_WORKSPACE/tools/gen_esp32part.exe" "$PKG_DIR/tools/"
184+
cp -f "$GITHUB_WORKSPACE/tools/gen_insights_package.py" "$PKG_DIR/tools/"
185+
cp -f "$GITHUB_WORKSPACE/tools/gen_insights_package.exe" "$PKG_DIR/tools/"
186+
cp -Rf "$GITHUB_WORKSPACE/tools/partitions" "$PKG_DIR/tools/"
187+
cp -Rf "$GITHUB_WORKSPACE/tools/ide-debug" "$PKG_DIR/tools/"
188+
cp -Rf "$GITHUB_WORKSPACE/tools/sdk" "$PKG_DIR/tools/"
189+
cp -f $GITHUB_WORKSPACE/tools/platformio-build*.py "$PKG_DIR/tools/"
188190

189191
# Remove unnecessary files in the package folder
190192
echo "Cleaning up folders ..."
@@ -195,9 +197,14 @@ find "$PKG_DIR" -name '*.git*' -type f -delete
195197
echo "Generating platform.txt..."
196198
cat "$GITHUB_WORKSPACE/platform.txt" | \
197199
sed "s/version=.*/version=$ver$extent/g" | \
198-
sed 's/runtime.tools.xtensa-esp32-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32-elf//g' | \
199-
sed 's/runtime.tools.xtensa-esp32s2-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32s2-elf//g' | \
200-
sed 's/tools.esptool_py.path={runtime.platform.path}\/tools\/esptool/tools.esptool_py.path=\{runtime.tools.esptool_py.path\}/g' \
200+
sed 's/tools.xtensa-esp32-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32-elf/tools.xtensa-esp32-elf-gcc.path=\{runtime.tools.xtensa-esp32-elf-gcc.path\}/g' | \
201+
sed 's/tools.xtensa-esp32s2-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32s2-elf/tools.xtensa-esp32s2-elf-gcc.path=\{runtime.tools.xtensa-esp32s2-elf-gcc.path\}/g' | \
202+
sed 's/tools.xtensa-esp32s3-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32s3-elf/tools.xtensa-esp32s3-elf-gcc.path=\{runtime.tools.xtensa-esp32s3-elf-gcc.path\}/g' | \
203+
sed 's/tools.riscv32-esp-elf-gcc.path={runtime.platform.path}\/tools\/riscv32-esp-elf/tools.riscv32-esp-elf-gcc.path=\{runtime.tools.riscv32-esp-elf-gcc.path\}/g' | \
204+
sed 's/tools.esptool_py.path={runtime.platform.path}\/tools\/esptool/tools.esptool_py.path=\{runtime.tools.esptool_py.path\}/g' | \
205+
sed 's/debug.server.openocd.path={runtime.platform.path}\/tools\/openocd-esp32\/bin\/openocd/debug.server.openocd.path=\{runtime.tools.openocd-esp32.path\}\/bin\/openocd/g' | \
206+
sed 's/debug.server.openocd.scripts_dir={runtime.platform.path}\/tools\/openocd-esp32\/share\/openocd\/scripts\//debug.server.openocd.scripts_dir=\{runtime.tools.openocd-esp32.path\}\/share\/openocd\/scripts\//g' | \
207+
sed 's/debug.server.openocd.scripts_dir.windows={runtime.platform.path}\\tools\\openocd-esp32\\share\\openocd\\scripts\\/debug.server.openocd.scripts_dir.windows=\{runtime.tools.openocd-esp32.path\}\\share\\openocd\\scripts\\/g' \
201208
> "$PKG_DIR/platform.txt"
202209

203210
# Add header with version information

.github/scripts/sketch_utils.sh

+50-18
Original file line numberDiff line numberDiff line change
@@ -117,38 +117,71 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
117117
# 3. Created at the sketch level as "buildX" where X is the number
118118
# of configuration built in case of a multiconfiguration test.
119119

120+
sketchname=$(basename $sketchdir)
121+
120122
ARDUINO_CACHE_DIR="$HOME/.arduino/cache.tmp"
121123
if [ -n "$ARDUINO_BUILD_DIR" ]; then
122124
build_dir="$ARDUINO_BUILD_DIR"
123125
elif [ $len -eq 1 ]; then
124-
build_dir="$sketchdir/build"
126+
# build_dir="$sketchdir/build"
127+
build_dir="$HOME/.arduino/tests/$sketchname/build.tmp"
125128
fi
126129

127130
mkdir -p "$ARDUINO_CACHE_DIR"
128131
for i in `seq 0 $(($len - 1))`
129132
do
130133
if [ $len -ne 1 ]; then
131-
build_dir="$sketchdir/build$i"
134+
# build_dir="$sketchdir/build$i"
135+
build_dir="$HOME/.arduino/tests/$sketchname/build$i.tmp"
132136
fi
133137
rm -rf $build_dir
134138
mkdir -p $build_dir
135139

136140
currfqbn=`echo $fqbn | jq -r --argjson i $i '.[$i]'`
137-
sketchname=$(basename $sketchdir)
138-
echo "Building $sketchname with FQBN=$currfqbn"
139-
$ide_path/arduino-builder -compile -logger=human -core-api-version=10810 \
140-
-fqbn=\"$currfqbn\" \
141-
-warnings="all" \
142-
-tools "$ide_path/tools-builder" \
143-
-tools "$ide_path/tools" \
144-
-built-in-libraries "$ide_path/libraries" \
145-
-hardware "$ide_path/hardware" \
146-
-hardware "$user_path/hardware" \
147-
-libraries "$user_path/libraries" \
148-
-build-cache "$ARDUINO_CACHE_DIR" \
149-
-build-path "$build_dir" \
150-
$xtra_opts "${sketchdir}/${sketchname}.ino"
141+
142+
if [ -f "$ide_path/arduino-cli" ]; then
143+
echo "Building $sketchname with arduino-cli and FQBN=$currfqbn"
144+
145+
curroptions=`echo "$currfqbn" | cut -d':' -f4`
146+
currfqbn=`echo "$currfqbn" | cut -d':' -f1-3`
147+
$ide_path/arduino-cli compile \
148+
--fqbn "$currfqbn" \
149+
--board-options "$curroptions" \
150+
--warnings "all" \
151+
--build-cache-path "$ARDUINO_CACHE_DIR" \
152+
--build-path "$build_dir" \
153+
$xtra_opts "${sketchdir}"
154+
elif [ -f "$ide_path/arduino-builder" ]; then
155+
echo "Building $sketchname with arduino-builder and FQBN=$currfqbn"
156+
echo "Build path = $build_dir"
157+
158+
$ide_path/arduino-builder -compile -logger=human -core-api-version=10810 \
159+
-fqbn=\"$currfqbn\" \
160+
-warnings="all" \
161+
-tools "$ide_path/tools-builder" \
162+
-hardware "$user_path/hardware" \
163+
-libraries "$user_path/libraries" \
164+
-build-cache "$ARDUINO_CACHE_DIR" \
165+
-build-path "$build_dir" \
166+
$xtra_opts "${sketchdir}/${sketchname}.ino"
167+
168+
# $ide_path/arduino-builder -compile -logger=human -core-api-version=10810 \
169+
# -fqbn=\"$currfqbn\" \
170+
# -warnings="all" \
171+
# -tools "$ide_path/tools-builder" \
172+
# -tools "$ide_path/tools" \
173+
# -built-in-libraries "$ide_path/libraries" \
174+
# -hardware "$ide_path/hardware" \
175+
# -hardware "$user_path/hardware" \
176+
# -libraries "$user_path/libraries" \
177+
# -build-cache "$ARDUINO_CACHE_DIR" \
178+
# -build-path "$build_dir" \
179+
# $xtra_opts "${sketchdir}/${sketchname}.ino"
180+
fi
151181
done
182+
unset fqbn
183+
unset xtra_opts
184+
unset options
152185
}
153186

154187
function count_sketches(){ # count_sketches <path> [target]
@@ -294,8 +327,7 @@ function build_sketches(){ # build_sketches <ide_path> <user_path> <target> <pat
294327
fi
295328
echo ""
296329
echo "Building Sketch Index $(($sketchnum - 1)) - $sketchdirname"
297-
args+=" -s $sketchdir $xtra_opts"
298-
build_sketch $args
330+
build_sketch $args -s $sketchdir $xtra_opts
299331
local result=$?
300332
if [ $result -ne 0 ]; then
301333
return $result

0 commit comments

Comments
 (0)