Skip to main content
RAltm
Senior
Mar 9, 2021 1:37 PM UTC
Solved

No binary or hex file output

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

This topic has been closed for replies.
mattias norlander
ST Technical Moderator
Apr 8, 2021 9:02 AM UTC

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! ;)

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.

20 replies

Tesla DeLorean
Guru
Mar 9, 2021 5:14 PM UTC

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
Pavel A.
Mar 9, 2021 5:20 PM UTC

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
RAltmAuthor
Senior
Mar 10, 2021 7:58 AM UTC

@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

Pavel A.
Mar 10, 2021 4:59 PM UTC

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
Visitor II
Mar 22, 2021 7:57 PM UTC

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

RAltm
RAltmAuthor
Senior
Mar 23, 2021 7:55 AM UTC

Hello @DShan.1​ ,

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

Regards

Cartu38 OpenDev
Graduate II
Mar 23, 2021 8:30 AM UTC

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 ???

DShan.1
Visitor II
Apr 7, 2021 12:56 PM UTC

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

RAltm
RAltmAuthor
Senior
Apr 7, 2021 1:45 PM UTC

It seems that ST didn't take notice of it... at least they didn't respond here.

Peter BENSCH
ST Technical Moderator
Apr 7, 2021 1:55 PM UTC

I just compiled a small project with CubeIDE 1.6.1... no problem creating bin and/or hex files.

Any way to recreate this issue?

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
DavidAlfa
Senior II
Apr 7, 2021 3:23 PM UTC

Working ok here.

mattias norlander
ST Technical Moderator
Apr 8, 2021 9:02 AM UTC

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! ;)

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
DShan.1
Visitor II
Apr 8, 2021 12:14 PM UTC

Does there exist somewhere a list of features of CubeIDE that are untested and/or unsupported?

This is a feature that worked properly on STM's previous IDE (Atollic). It's reasonable for customers moving projects from Atollic to CubeIDE to expect features that worked before to continue to work.

Cartu38 OpenDev
Graduate II
Apr 8, 2021 1:02 PM UTC

Sounds like you're asking something not realistic I guess.

Eclipse offer is so wide .... Pro and cons. of open source. I cannot imagine myself STM is validating back all Eclipse ecosystem ... Best case they can contribute to to improve it and validate their own addons but more ???

DShan.1
Visitor II
Apr 8, 2021 1:11 PM UTC

Nobody suggested that they "validate back all Eclipse ecosystem." But validating the software they provide to their customers seems like a good idea. Maybe I'm old fashioned.