2020-03-12 09:15 AM
I am trying to build SBSFU V2.3.0 on STM32L496G-DISCOVERY board. I can build SeCoreBin and SBSFU. Flashed into board. All fine and it comes up over serial usb. However I am having trouble building the user app to exercise flashing. I am building on system workbench.
The build is fine but it fails running the post build scripts:
Building target: UserApp.elf
Invoking: MCU GCC Linker
arm-none-eabi-gcc -z max-page-size=8 -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -L"/ml/Users/MAGICLEAP/rabd/Downloads/STM32CubeExpansion_SBSFU_V2.3.0/Projects/32L496GDISCOVERY/Applications/2_Images/2_Images_SBSFU/SW4STM32/STM32L496G-Discovery_2_Images_SBSFU/Debug" -specs=nosys.specs -specs=nano.specs -Xlinker -L ../../../../Linker_Common/SW4STM32 -T"../STM32L496AGIx_FLASH.ld" -Wl,-Map=output.map -Wl,--gc-sections -o "UserApp.elf" @"objects.list" -l:se_interface_app.o -lm
Finished building target: UserApp.elf
make --no-print-directory post-build
Generating binary and Printing size information:
arm-none-eabi-objcopy -O binary "UserApp.elf" "../../UserApp.bin"
arm-none-eabi-size "UserApp.elf"
text data bss dec hex filename
27488 368 5288 33144 8178 UserApp.elf
"../../../../2_Images_SECoreBin/SW4STM32/postbuild.sh" "../.." "./UserApp.elf" "../../UserApp.bin" "1"
/bin/bash: - : invalid option
Usage: /bin/bash [GNU long option] [option] ...
/bin/bash [GNU long option] [option] script-file ...
makefile:53: recipe for target 'post-build' failed
GNU long options:
makefile:40: recipe for target 'UserApp.elf' failed
--debug
--debugger
--dump-po-strings
--dump-strings
--help
--init-file
--login
--noediting
--noprofile
--norc
--posix
--rcfile
--restricted
--verbose
--version
Shell options:
-ilrsD or -c command or -O shopt_option (invocation only)
-abefhkmnptuvxBCHP or -o option
make[1]: *** [post-build] Error 2
make: *** [UserApp.elf] Error 2
12:08:18 Build Finished (took 11s.774ms)
Any idea?
Thank you
2020-03-12 10:33 AM
Hi,
Can you try doing this from a terminal?
cd WHERE/YOU/PUT/THE/PACKAGE/2_Images_SECoreBin/SW4STM32/
dos2unix *.sh
Let us know if it worked!
Cheers,
Arno
2020-09-04 06:07 AM
Hi
Im also facing same issue while compiling UserApp project. Below is the error and it also shows on postbuild.sh . I haven't done any changes to the code just wanted to run as is. Im using STM32H7B3i-DK , and STM32CubeIDE on windows.
"../../../../2_Images_SECoreBin/STM32CubeIDE/postbuild.sh" "../.." "./UserApp.elf" "../../UserApp.bin" "1"
prepareimage with windows executeable
[11544] Failed to execute script prepareimage
Traceback (most recent call last):
File "prepareimage.py", line 759, in <module>
File "prepareimage.py", line 756, in args
File "prepareimage.py", line 123, in do_encrypt
File "keys.py", line 262, in load
FileNotFoundError: [Errno 2] No such file or directory: '../../../../2_Images_SECoreBin/STM32CubeIDE/../Binary/OEM_KEY_COMPANY1_key_AES_CBC.bin'
../../../../2_Images_SECoreBin/STM32CubeIDE/postbuild.sh: line 68: prepareimage.exe: No error
prepareimage.exe enc -k ../../../../2_Images_SECoreBin/STM32CubeIDE/../Binary/OEM_KEY_COMPANY1_key_AES_CBC.bin -i ../../../../2_Images_SECoreBin/STM32CubeIDE/../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.
2020-09-06 11:53 PM
Hi
I expanding the zip file of STM32CubeExpansion_SBSFU_V2.3.0 in C:\ and compiled all the project folders and also could build UserApp.
thanks