Skip to content

Commit c0d865f

Browse files
committed
modified
1 parent ad09c8e commit c0d865f

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

build.sh

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -111,24 +111,25 @@ export IDF_CCACHE_ENABLE=$CCACHE_ENABLE
111111
echo "TARGET(s): ${TARGET[@]}"
112112

113113
mkdir -p dist
114+
rm -f "log_*.txt" # remove old log files if any exists
114115

115116
if [ $SKIP_ENV -eq 0 ]; then
116117
echo "* Installing/Updating ESP-IDF and all components..."
117118
# update components from git
118-
./tools/update-components.sh
119+
./tools/update-components.sh >> log_instEnviroment.txt
119120
if [ $? -ne 0 ]; then exit 1; fi
120121

121122
# install arduino component
122-
./tools/install-arduino.sh
123+
./tools/install-arduino.sh >> log_instEnviroment.txt
123124
if [ $? -ne 0 ]; then exit 1; fi
124125

125126
# install esp-idf
126-
source ./tools/install-esp-idf.sh
127+
source ./tools/install-esp-idf.sh >> log_instEnviroment.txt
127128
if [ $? -ne 0 ]; then exit 1; fi
128129
else
129130
# $IDF_PATH/install.sh
130131
# source $IDF_PATH/export.sh
131-
source ./tools/config.sh
132+
source ./tools/config.sh >> log_instEnviroment.txt
132133
fi
133134

134135
if [ "$BUILD_TYPE" != "all" ]; then
@@ -169,7 +170,7 @@ if [ "$BUILD_TYPE" != "all" ]; then
169170

170171
echo "idf.py -DIDF_TARGET=\"$target\" -DSDKCONFIG_DEFAULTS=\"$configs\" $BUILD_TYPE"
171172
rm -rf build sdkconfig
172-
idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$configs" $BUILD_TYPE
173+
idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$configs" $BUILD_TYPE >> log_idfBuild.txt
173174
if [ $? -ne 0 ]; then exit 1; fi
174175
done
175176
exit 0
@@ -218,16 +219,16 @@ for target_json in `jq -c '.targets[]' configs/builds.json`; do
218219
# Build IDF Libs
219220
idf_libs_configs="$main_configs"
220221
for defconf in `echo "$target_json" | jq -c '.idf_libs[]' | tr -d '"'`; do
221-
idf_libs_configs="$idf_libs_configs;configs/defconfig.$defconf"
222+
idf_libs_configs="$idf_libs_configs;configs/defconfig.$defconf" >> log_idfBuild.txt
222223
done
223224

224225
echo "* Build IDF-Libs: $idf_libs_configs"
225226
rm -rf build sdkconfig
226-
idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$idf_libs_configs" idf-libs
227+
idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$idf_libs_configs" idf-libs >> log_idfBuild.txt
227228
if [ $? -ne 0 ]; then exit 1; fi
228229

229230
if [ "$target" == "esp32s3" ]; then
230-
idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$idf_libs_configs" srmodels_bin
231+
idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$idf_libs_configs" srmodels_bin >> log_idfBuild.txt
231232
if [ $? -ne 0 ]; then exit 1; fi
232233
AR_SDK="$AR_TOOLS/esp32-arduino-libs/$target"
233234
# sr model.bin
@@ -248,7 +249,7 @@ for target_json in `jq -c '.targets[]' configs/builds.json`; do
248249

249250
echo "* Build BootLoader: $bootloader_configs"
250251
rm -rf build sdkconfig
251-
idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$bootloader_configs" copy-bootloader
252+
idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$bootloader_configs" copy-bootloader >> log_idfBuild.txt
252253
if [ $? -ne 0 ]; then exit 1; fi
253254
done
254255

@@ -261,7 +262,7 @@ for target_json in `jq -c '.targets[]' configs/builds.json`; do
261262

262263
echo "* Build Memory Variant: $mem_configs"
263264
rm -rf build sdkconfig
264-
idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$mem_configs" mem-variant
265+
idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$mem_configs" mem-variant >> log_idfBuild.txt
265266
if [ $? -ne 0 ]; then exit 1; fi
266267
done
267268
done
@@ -300,8 +301,8 @@ done
300301
# update package_esp32_index.template.json
301302
if [ "$BUILD_TYPE" = "all" ]; then
302303
echo "* Generating package_esp32_index.template.json..."
303-
python3 ./tools/gen_tools_json.py -i "$IDF_PATH" -j "$AR_COMPS/arduino/package/package_esp32_index.template.json" -o "$AR_OUT/"
304-
python3 ./tools/gen_tools_json.py -i "$IDF_PATH" -o "$TOOLS_JSON_OUT/"
304+
python3 ./tools/gen_tools_json.py -i "$IDF_PATH" -j "$AR_COMPS/arduino/package/package_esp32_index.template.json" -o "$AR_OUT/" >> log_pythonBuild.txt
305+
python3 ./tools/gen_tools_json.py -i "$IDF_PATH" -o "$TOOLS_JSON_OUT/" >> log_pythonBuild.txt
305306
if [ $? -ne 0 ]; then exit 1; fi
306307
fi
307308

@@ -312,7 +313,7 @@ if [ "$BUILD_TYPE" = "all" ]; then
312313
ibr=$(git describe --all 2>/dev/null)
313314
ic=$(git -C "$IDF_PATH" rev-parse --short HEAD)
314315
popd
315-
python3 ./tools/gen_platformio_manifest.py -o "$TOOLS_JSON_OUT/" -s "$ibr" -c "$ic"
316+
python3 ./tools/gen_platformio_manifest.py -o "$TOOLS_JSON_OUT/" -s "$ibr" -c "$ic" >> log_pythonBuild.txt
316317
if [ $? -ne 0 ]; then exit 1; fi
317318
fi
318319

@@ -336,3 +337,4 @@ if [ $ARCHIVE_OUT -eq 1 ]; then
336337
./tools/archive-build.sh "$TARGET"
337338
if [ $? -ne 0 ]; then exit 1; fi
338339
fi
340+
./../addOns-esp32_AR_lib-builder/postBuild_AggregatedFolders.sh

0 commit comments

Comments
 (0)