@@ -115,9 +115,14 @@ else
115115 source ./tools/config.sh
116116fi
117117
118- if [ -f " $AR_MANAGED_COMPS /espressif__esp-sr/.component_hash" ]; then
119- rm -rf $AR_MANAGED_COMPS /espressif__esp-sr/.component_hash
120- fi
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+ }
121126
122127if [ " $BUILD_TYPE " != " all" ]; then
123128 if [ " $TARGET " = " all" ]; then
@@ -157,6 +162,7 @@ if [ "$BUILD_TYPE" != "all" ]; then
157162
158163 echo " idf.py -DIDF_TARGET=\" $target \" -DSDKCONFIG_DEFAULTS=\" $configs \" $BUILD_TYPE "
159164 rm -rf build sdkconfig
165+ clear_component_hashes
160166 idf.py -DIDF_TARGET=" $target " -DSDKCONFIG_DEFAULTS=" $configs " $BUILD_TYPE
161167 if [ $? -ne 0 ]; then exit 1; fi
162168 done
@@ -209,16 +215,14 @@ for target_json in `jq -c '.targets[]' configs/builds.json`; do
209215 idf_libs_configs=" $idf_libs_configs ;configs/defconfig.$defconf "
210216 done
211217
212- if [ -f " $AR_MANAGED_COMPS /espressif__esp-sr/.component_hash" ]; then
213- rm -rf $AR_MANAGED_COMPS /espressif__esp-sr/.component_hash
214- fi
215-
216218 echo " * Build IDF-Libs: $idf_libs_configs "
217219 rm -rf build sdkconfig
220+ clear_component_hashes
218221 idf.py -DIDF_TARGET=" $target " -DSDKCONFIG_DEFAULTS=" $idf_libs_configs " idf-libs
219222 if [ $? -ne 0 ]; then exit 1; fi
220223
221224 if [ " $target " == " esp32s3" ]; then
225+ clear_component_hashes
222226 idf.py -DIDF_TARGET=" $target " -DSDKCONFIG_DEFAULTS=" $idf_libs_configs " srmodels_bin
223227 if [ $? -ne 0 ]; then exit 1; fi
224228 AR_SDK=" $AR_TOOLS /esp32-arduino-libs/$target "
@@ -238,12 +242,9 @@ for target_json in `jq -c '.targets[]' configs/builds.json`; do
238242 bootloader_configs=" $bootloader_configs ;configs/defconfig.$defconf " ;
239243 done
240244
241- if [ -f " $AR_MANAGED_COMPS /espressif__esp-sr/.component_hash" ]; then
242- rm -rf $AR_MANAGED_COMPS /espressif__esp-sr/.component_hash
243- fi
244-
245245 echo " * Build BootLoader: $bootloader_configs "
246246 rm -rf build sdkconfig
247+ clear_component_hashes
247248 idf.py -DIDF_TARGET=" $target " -DSDKCONFIG_DEFAULTS=" $bootloader_configs " copy-bootloader
248249 if [ $? -ne 0 ]; then exit 1; fi
249250 done
@@ -255,12 +256,9 @@ for target_json in `jq -c '.targets[]' configs/builds.json`; do
255256 mem_configs=" $mem_configs ;configs/defconfig.$defconf " ;
256257 done
257258
258- if [ -f " $AR_MANAGED_COMPS /espressif__esp-sr/.component_hash" ]; then
259- rm -rf $AR_MANAGED_COMPS /espressif__esp-sr/.component_hash
260- fi
261-
262259 echo " * Build Memory Variant: $mem_configs "
263260 rm -rf build sdkconfig
261+ clear_component_hashes
264262 idf.py -DIDF_TARGET=" $target " -DSDKCONFIG_DEFAULTS=" $mem_configs " mem-variant
265263 if [ $? -ne 0 ]; then exit 1; fi
266264 done
0 commit comments