After successful compilation I tried to provision B-U585I-IOT02A board following the steps described here: STM32U5 provisioning.

Process did not succeed due to the errors described below.

What am I missing?

 

postbuild.sh results in:

Thomas@AMDMINIATX MINGW64 /c/Temp/tf-m/trusted-firmware-m/platform/ext/target/stm/common/scripts (main)

$ ./postbuild.sh

./postbuild.sh: line 22: /c/Temp/tf-m/trusted-firmware-m/platform/ext/target/stm/common/scripts/preprocess.sh: No such file or directory

preprocess bl2 file

./postbuild.sh: line 36: preprocess: command not found

C:\Python312\python.exe: can't open file 'C:\\Temp\\tf-m\\trusted-firmware-m\\platform\\ext\\target\\stm\\common\\scripts\\scripts\\stm_tool.py': [Errno 2] No such file or directory

postbuild.sh failed

 

There are 3 versions of preprocess.sh script, it is compiler specific.

 

TFM_UPDATE.sh has some syntax errors which reveal themselves under GitBash

Thomas@AMDMINIATX MINGW64 /c/Temp/tf-m/trusted-firmware-m/platform/ext/target/stm/common/scripts (main)

$ ./TFM_UPDATE.sh

TFM UPDATE started

./TFM_UPDATE.sh: line 52: [: ==: unary operator expected

./TFM_UPDATE.sh: line 56: [: ==: unary operator expected

./TFM_UPDATE.sh: line 59: [: ==: unary operator expected

 

These are easy to fix.
Eg. if [ $encrypted == "0x1" ]; then
-> if [ "$encrypted" == "0x1" ]; then

 

It looks postbuild.sh and TFM_UPDATE.sh take two additional parameters which are not documented.

regression.sh takes one undocumented parameter.