NUCLEO-L152RE_2_Images_UserApp post build fails
I have the nucleo l152RE board and am trying to use this for following the mooc on sbsfu. It is possible for me to build (in cube IDE) both SECoreBin and SBSFU images. however, when building the UserApp it fails on the postbuild script. During build, I can see the UserApp.elf being created and showing up in my file explorer, but when the post-build script fails, the .elf file is also removed from my system.
According to the build output, the file "OEM_KEY_COMPANY1_key_AES_CBC.bin" can not be found, but I can see it in my directory structure.
I have the following build output:
11:19:33 **** Incremental Build of configuration Debug for project NUCLEO-L152RE_2_Images_UserApp ****
make all
arm-none-eabi-gcc -z max-page-size=1 -o "UserApp.elf" @"objects.list" -l:se_interface_app.o -mcpu=cortex-m3 -T"../STM32L152RETx.ld" --specs=nosys.specs -Wl,-Map="NUCLEO-L152RE_2_Images_UserApp.map" -Wl,--gc-sections -static -L../../../../2_Images_SBSFU/SW4STM32/NUCLEO-L152RE_2_Images_SBSFU/Debug -Xlinker -L ../../../../Linker_Common/SW4STM32 --specs=nano.specs -mfloat-abi=soft -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
Finished building target: UserApp.elf
arm-none-eabi-size UserApp.elf
text data bss dec hex filename
18240 144 5920 24304 5ef0 UserApp.elf
Finished building: default.size.stdout
arm-none-eabi-objdump -h -S UserApp.elf > "UserApp.list"
Finished building: UserApp.list
arm-none-eabi-objcopy -O binary UserApp.elf "UserApp.bin"
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
18240 144 5920 24304 5ef0 UserApp.elf
"../../../../2_Images_SECoreBin/SW4STM32/postbuild.sh" "../.." "./UserApp.elf" "../../UserApp.bin" "1" "1"
prepareimage with windows executable
[23428] Failed to execute script prepareimage
Traceback (most recent call last):
File "prepareimage.py", line 861, in <module>
File "prepareimage.py", line 858, 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 70: 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:85: post-build] Error 1
make: *** [makefile:51: all] Error 2
"make all" terminated with exit code 2. Build might be incomplete.
11:19:49 Build Failed. 2 errors, 0 warnings. (took 15s.343ms)