cancel
Showing results for 
Search instead for 
Did you mean: 

Pre-Image Processing for Sample User App with "2_Image" variant of SBSFU v2.5.0

RKher.1
Associate III

Hi I am trying to get the the SBSFU v 2.5.0 package to work on NUCLEO-G071RB I am getting the following error after the compilation of the User App and during the preimage execution step (this is all occurring within CUBE-IDE): 

 ----------------------------------------------

Traceback (most recent call last):

 

 File "prepareimage.py", line 966, in <module>

 

 File "prepareimage.py", line 963, in args

 

 File "prepareimage.py", line 124, in do_encrypt

 

 File "keys.py", line 262, in load

 

FileNotFoundError: [Errno 2] No such file or directory: '../../../../2_Images_SECoreBin/SW4STM32/../Binary/OEM_KEY_COMPANY1_key_AES_CBC.bin'

 

../../../../2_Images_SECoreBin/SW4STM32/postbuild.sh: line 74: prepareimage.exe: No error

 

prepareimage.exe enc -k ../../../../2_Images_SECoreBin/SW4STM32/../Binary/OEM_KEY_COMPANY1_key_AES_CBC.bin -i ../../../../2_Images_SECoreBin/SW4STM32/../Binary/iv.bin ../../UserApp.bin ../../../Binary/UserApp.sfu : failed

 

make[1]: *** [makefile:97: post-build] Error 1

 

make: *** [makefile:63: all] Error 2

-------------------------------------------------------------------- 

 I went ahead and generated the AES key in a file called _AES_CBC.bin file with following python command as instructed in one of the README's

:

python prepareimage.py keygen -k AES_CBC.bin -t aes-cbc

I subsequently copied the generated AES_CBC.bin file over to the appropriate location and renamed it to OEM_KEY_COMPANY1_key_AES_CBC.bin as required by the process (the build process seems to require that this file is located in the following directory relative to the root directory for the package - STM32CubeExpansion_SBSFU_V2.5.0/Projects/NUCLEO-G071RB/Applications/2_Images/2_Images_SECoreBin/Binary). Moreover, the file lists correctly and has the right permissions as depicted in the screen shot below. What am I doing wrong? Thanks! 

0693W00000GYGtsQAH.jpg

1 REPLY 1
Jocelyn RICARD
ST Employee

Hello @RKher.1​ 

One possible cause could be the too long path.

Could you try again installing in a shorted directory ?

Also, the package is provided with keys by default so you shouldn't have such issue on first build

Best regards

Jocelyn