cancel
Showing results for 
Search instead for 
Did you mean: 

Version 2.2 bug 'mergesbsfu' bug

ADi M.507
Associate

Hi,

Upgrading to version 2.2.0 i get this error using the option " --mergesbsfu" (Add a binary header and a sbsfu segment to an elf file):

arm-none-eabi-gcc -o "STM32F769I-Discovery_AWS.elf" @"objects.list"   -mcpu=cortex-m7 -T"../STM32F769NIHx_FLASH.ld" --specs=nosys.specs -Wl,-Map="STM32F769I-Discovery_AWS.map" -Wl,--gc-sections -static -L../../../../../BootLoader_OSC/2_Images_SBSFU/SW4STM32/STM32F769I_Discovery_2_Images_SBSFU/Debug -Xlinker -L../../../../../BootLoader_OSC/Linker_Common/SW4STM32 --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -u _printf_float -Wl,--start-group -lc -lm -Wl,--end-group
Finished building target: STM32F769I-Discovery_AWS.elf
 
arm-none-eabi-size   STM32F769I-Discovery_AWS.elf 
   text	   data	    bss	    dec	    hex	filename
 248680	  13240	 242064	 503984	  7b0b0	STM32F769I-Discovery_AWS.elf
Finished building: default.size.stdout
 
arm-none-eabi-objdump -h -S  STM32F769I-Discovery_AWS.elf  > "STM32F769I-Discovery_AWS.list"
Finished building: STM32F769I-Discovery_AWS.list
 
arm-none-eabi-objcopy -O binary "STM32F769I-Discovery_AWS.elf" "STM32F769I-Discovery_AWS.bin"
arm-none-eabi-size "STM32F769I-Discovery_AWS.elf"
   text	   data	    bss	    dec	    hex	filename
 248680	  13240	 242064	 503984	  7b0b0	STM32F769I-Discovery_AWS.elf
"../../../../../BootLoader_OSC/2_Images_SECoreBin/SW4STM32/postbuild.sh" "../.." "./STM32F769I-Discovery_AWS.elf" "./STM32F769I-Discovery_AWS.bin" "1" "bigelf"
prepareimage with windows executeable
Generating the global elf file SBSFU and userApp
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
STM32_Programmer_CLI.exe -ms ./STM32F769I-Discovery_AWS.elf ../../PostBuild/STM32F769I-Discovery_AWSsfuh.bin C:/dev/Cloud_AWS/Projects/STM32F769I-Discovery/Applications/BootLoader_OSC/2_Images_SBSFU/SW4STM32/STM32F769I_Discovery_2_Images_SBSFU/Debug/SBSFU.elf : failed
make[1]: *** [makefile:90: post-build] Error 1
make: *** [makefile:57: all] Error 2
"make all" terminated with exit code 2. Build might be incomplete.

with 2.1 it works fine..

can you fix this?

Thank you in advance, regards

Alessio DM

1 REPLY 1
alister
Lead

I noticed it doesn't work too in the postbuild,bat version. But I didn't need the elf of the combined SBSFU and app, and just removed the 5th argument to the script in the app's post-build step.

If you need the elf, another method is convert the preceding prepareimage merge's binary out using arm-atollic-eabi-objcopy.exe.

If ST answer please explain the rationale for adding -ms to STM32_Programmer_CLI.exe.