cancel
Showing results for 
Search instead for 
Did you mean: 

No binary or hex file output

RAltm
Senior

Hello,

I've a strange problem with CubeIDE 1.6.0, there's no binary or hex file output even if the corresponding outputs are activated under MCU post build outputs. Any ideas what might be the issue there?

Regards

1 ACCEPTED SOLUTION

Accepted Solutions
mattias norlander
ST Employee

External builder is the recommended way in CubeIDE as in many other Eclipse/CDT based tools. We chose External rather than Internal because it was more actively support by the Eclipse community and it makes sense to move with the OSS community. So, please consider Internal Builder untested by us, so things like hex/bin/srec generation may not be supported at all.

Thanks @Cartu38 OpenDev​ for creative work-arounds! 😉

View solution in original post

20 REPLIES 20

The build failed in some fashion, either at the linker or make level? Review log files, check for .MAP or .ELF as evidence that the linker got closure/completion.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Pavel A.
Evangelist III

Same here, after importing Atollic projects to v. 1.6.0

Has to use a post-build script for binary file. Are your projects imported?

-- pa

RAltm
Senior

@Community member​ 

The map and elf files are created well. Which log files do you mean?

@Pavel A.​ 

No, I didn't import the project. It was made with CubeIDE 1.5.x and F4 HAL v1.25.2. Then I updated to CubeIDE 1.6.0 and F4 HAL 1.26.0 a few days ago.

I'm not sure if I activated the binary file output when the project was created, so I can't say for sure that it's related to the CubeIDE or the F4 HAL update.

Regards

While they are pondering on yet another problem , here is a postbuild script to plug the hole.

For Linux _and_ Windows. Not tested on OSX.

-- pa

#!/bin/sh
# Add this command as postbuild action:  
# sh postbuild.sh ${BuildArtifactFileBaseName}
EXENAME=$1
[ "$HOMEDRIVE" = "" ] || BUSYBOX="busybox "
 
# Print memory sizes:
arm-none-eabi-size $EXENAME.elf || exit 1
# Convert to bin
arm-none-eabi-objcopy -O binary $EXENAME.elf $EXENAME.bin
#  and print size of the .bin 
$BUSYBOX stat -L -c "%N size=%s" $EXENAME.bin
 
# Produce .list :
arm-none-eabi-objdump -h -S $EXENAME.elf > $EXENAME.list
 
echo "POSTBUILD DONE"

DShan.1
Associate II

It appears that the MCU Post build outputs step is run only when Builder Type (on Builder tab in Properties->C/C++ Build) is External builder. When I set Builder Type to Internal builder, the MCU Post build outputs step is not run.

This appears to be a bug in STCubeIDE 1.6.0

Hello @DShan.1​ ,

thank you for reporting it. I hope ST will take notice of this issue.

Regards

Fact is STM32CubeIDE default is external builder not internal one.

I confirm if internal builder usage post build step leading to have following UI settings not active

0693W000008xdpSQAQ.jpg 

But still possible if internal builder to rely by yourself on post build steps

0693W000008xdpwQAA.jpg 

Why are you moving to internal builder ???

> Why are you moving to internal builder ???

It just feels cleaner, does not litter all these makefiles and does not run external make program.

Though recently ST supplies improved version of make and other gnu tools for Windows, that support very long paths.

So maybe there's no longer a reason to use internal builder.

--pa

DShan.1
Associate II

This issue does not appear to have been resolved in the just released update to STM32CubeIDE, version 1.61.