@@ -10,6 +10,9 @@ if ! [ -x "$(command -v git)" ]; then
1010 exit 1
1111fi
1212
13+ # Fixes building some components. See https://github.com/espressif/arduino-esp32/issues/10167
14+ export IDF_COMPONENT_OVERWRITE_MANAGED_COMPONENTS=1
15+
1316TARGET=" all"
1417BUILD_TYPE=" all"
1518BUILD_DEBUG=" default"
@@ -115,15 +118,6 @@ else
115118 source ./tools/config.sh
116119fi
117120
118- function clear_component_hashes(){
119- if [ -f " $AR_MANAGED_COMPS /espressif__esp-sr/.component_hash" ]; then
120- rm -rf $AR_MANAGED_COMPS /espressif__esp-sr/.component_hash
121- fi
122- if [ -f " $AR_MANAGED_COMPS /espressif__esp-dsp/.component_hash" ]; then
123- rm -rf $AR_MANAGED_COMPS /espressif__esp-dsp/.component_hash
124- fi
125- }
126-
127121if [ " $BUILD_TYPE " != " all" ]; then
128122 if [ " $TARGET " = " all" ]; then
129123 echo " ERROR: You need to specify target for non-default builds"
@@ -162,7 +156,6 @@ if [ "$BUILD_TYPE" != "all" ]; then
162156
163157 echo " idf.py -DIDF_TARGET=\" $target \" -DSDKCONFIG_DEFAULTS=\" $configs \" $BUILD_TYPE "
164158 rm -rf build sdkconfig
165- clear_component_hashes
166159 idf.py -DIDF_TARGET=" $target " -DSDKCONFIG_DEFAULTS=" $configs " $BUILD_TYPE
167160 if [ $? -ne 0 ]; then exit 1; fi
168161 done
@@ -217,12 +210,10 @@ for target_json in `jq -c '.targets[]' configs/builds.json`; do
217210
218211 echo " * Build IDF-Libs: $idf_libs_configs "
219212 rm -rf build sdkconfig
220- clear_component_hashes
221213 idf.py -DIDF_TARGET=" $target " -DSDKCONFIG_DEFAULTS=" $idf_libs_configs " idf-libs
222214 if [ $? -ne 0 ]; then exit 1; fi
223215
224216 if [ " $target " == " esp32s3" ]; then
225- clear_component_hashes
226217 idf.py -DIDF_TARGET=" $target " -DSDKCONFIG_DEFAULTS=" $idf_libs_configs " srmodels_bin
227218 if [ $? -ne 0 ]; then exit 1; fi
228219 AR_SDK=" $AR_TOOLS /esp32-arduino-libs/$target "
@@ -244,7 +235,6 @@ for target_json in `jq -c '.targets[]' configs/builds.json`; do
244235
245236 echo " * Build BootLoader: $bootloader_configs "
246237 rm -rf build sdkconfig
247- clear_component_hashes
248238 idf.py -DIDF_TARGET=" $target " -DSDKCONFIG_DEFAULTS=" $bootloader_configs " copy-bootloader
249239 if [ $? -ne 0 ]; then exit 1; fi
250240 done
@@ -258,7 +248,6 @@ for target_json in `jq -c '.targets[]' configs/builds.json`; do
258248
259249 echo " * Build Memory Variant: $mem_configs "
260250 rm -rf build sdkconfig
261- clear_component_hashes
262251 idf.py -DIDF_TARGET=" $target " -DSDKCONFIG_DEFAULTS=" $mem_configs " mem-variant
263252 if [ $? -ne 0 ]; then exit 1; fi
264253 done
0 commit comments