cancel
Showing results for 
Search instead for 
Did you mean: 

How to build TFM when your company IT tools remove the exe files installed in the package

Jocelyn RICARD
ST Employee

Sometimes, the windows exe file are not recognized as valid programs by internal IT tools.

The TFM uses windows exe file to build the image signature.

A way to solve this you need to use python:

Install python 3.7

Create a requirements.txt file containing:

cryptography 

pyasn1

pyyaml

jinja2

The launch in a command line:

pip3 install -r requirements

This will install the necessary modules. You need an external access to be able to do this.

One this is done, you need to edit

c:\STM32SecuWS\TFM\STM32Cube_FW_L5_V1.2.0\Projects\NUCLEO-L552ZE-Q\Applications\TFM_for_WS\TFM_Appli\STM32CubeIDE\postbuild.sh

and from line 23 to 33 you should have:

#line for window executeable

#echo Postbuild with windows executable

#imgtool=$basedir"/scripts/dist/imgtool/imgtool.exe"

#assemble=$basedir"/scripts/dist/assemble/assemble.exe"

#cmd=""

#line for python

echo Postbuild with python script

imgtool=$basedir"/scripts/imgtool.py"

assemble=$basedir"/scripts/assemble.py"

cmd="python"

Be careful, a tipo in original file on imgtool.py that was named impgtool.py

The posbuild.sh is launch at the end of secure and non secure image build to generate the signature.

Best regards

Jocelyn

1 REPLY 1
Frantz LEFRERE
ST Employee

Thanks Jocelyn ! All info are in your post