2021-12-13 09:52 PM
Following Error Occurs
11:12:01 **** Incremental Build of configuration Debug for project STM32F769I_Discovery_2_Images_UserApp ****
make -j8 all
arm-none-eabi-gcc -z max-page-size=1 -o "UserApp.elf" @"objects.list" ../../../../2_Images_SBSFU/SW4STM32/STM32F769I_Discovery_2_Images_SBSFU/Debug/se_interface_app.o -mcpu=cortex-m7 -T"../STM32F769NIHx.ld" --specs=nosys.specs -Wl,-Map="UserApp.map" -Wl,--gc-sections -static -Xlinker -L ../../../../Linker_Common/SW4STM32 --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
Finished building target: UserApp.elf
arm-none-eabi-size UserApp.elf
arm-none-eabi-objdump -h -S UserApp.elf > "UserApp.list"
arm-none-eabi-objcopy -O binary UserApp.elf "UserApp.bin"
text data bss dec hex filename
21536 208 6040 27784 6c88 UserApp.elf
Finished building: default.size.stdout
Finished building: UserApp.bin
Finished building: UserApp.list
arm-none-eabi-objcopy -O binary "UserApp.elf" "../../UserApp.bin"
arm-none-eabi-size "UserApp.elf"
text data bss dec hex filename
21536 208 6040 27784 6c88 UserApp.elf
"../../../../2_Images_SECoreBin/SW4STM32/postbuild.sh" "../.." "./UserApp.elf" "../../UserApp.bin" "1" "1"
prepareimage with windows executable
[6020] Failed to execute script prepareimage
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
"make -j8 all" terminated with exit code 2. Build might be incomplete.
11:12:07 Build Failed. 2 errors, 0 warnings. (took 6s.448ms)
2021-12-13 11:03 PM
I assume you've already checked if the file
[...]/STM32CubeExpansion_SBSFU_V2.5.0/Projects/STM32F769I-Discovery/Applications/2_Images/2_Images_SECoreBin/Binary/OEM_KEY_COMPANY1_key_AES_CBC.bin
exists and is readable?
2021-12-13 11:07 PM
I also see in this line
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
that it refers to iv.bin and there is no iv.bin. I believe I've run into this issue before and ended up using an iv.bin from another project, simply placing it in the Binary directory.
I suppose they meant to use the nonce.bin and to fix that, you would need to change your postbuild.sh script (SECBOOT_ECCDSA_WITH_AES128_CBC_SHA256.sh) to use the nonce instead of the iv (thus changing the -i to -n in the prepareimage calls with the path to the nonce)
2021-12-14 02:45 AM
Hello
Are you using STM32CubeIDE ? which version ? which platform (Windows/Linux/Mac) ?
2021-12-14 03:19 AM
Hi Arno, Thanks for your reply, I checked the iv.bin in other projects and used the same still facing the same issue ,But I am not able to locate the UserApp.sfu file in Binary Folder.
16:46:27 **** Incremental Build of configuration Debug for project STM32F769I_Discovery_2_Images_UserApp ****
make -j8 all
arm-none-eabi-gcc -z max-page-size=1 -o "UserApp.elf" @"objects.list" ../../../../2_Images_SBSFU/SW4STM32/STM32F769I_Discovery_2_Images_SBSFU/Debug/se_interface_app.o -mcpu=cortex-m7 -T"../STM32F769NIHx.ld" --specs=nosys.specs -Wl,-Map="UserApp.map" -Wl,--gc-sections -static -Xlinker -L ../../../../Linker_Common/SW4STM32 --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
Finished building target: UserApp.elf
arm-none-eabi-size UserApp.elf
arm-none-eabi-objdump -h -S UserApp.elf > "UserApp.list"
arm-none-eabi-objcopy -O binary UserApp.elf "UserApp.bin"
text data bss dec hex filename
21536 208 6040 27784 6c88 UserApp.elf
Finished building: default.size.stdout
Finished building: UserApp.list
Finished building: UserApp.bin
arm-none-eabi-objcopy -O binary "UserApp.elf" "../../UserApp.bin"
arm-none-eabi-size "UserApp.elf"
text data bss dec hex filename
21536 208 6040 27784 6c88 UserApp.elf
"../../../../2_Images_SECoreBin/SW4STM32/postbuild.sh" "../.." "./UserApp.elf" "../../UserApp.bin" "1" "1"
prepareimage with windows executable
[14540] Failed to execute script prepareimage
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
"make -j8 all" terminated with exit code 2. Build might be incomplete.
16:46:40 Build Failed. 2 errors, 0 warnings. (took 13s.163ms)
2021-12-14 04:52 AM
Yes I am using STM32CubeIDE
Version: 1.6.1
Build: 9958_20210326_1446 (UTC)
Platform/OS: Windows 10 Enterprise