2021-11-19 12:57 PM
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!
2021-12-16 09:54 AM
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