Skip to main content
BCoch
Senior
Solved

How does one generate a .hex file from STM32CubeIDE?

... ideally automatically as part of a normal Debug or Release build.

This topic has been closed for replies.
KnarfB
KnarfBBest answer
Super User

Project Properties > C/C++ Build > Settings > Build steps > Post-build steps > Command:

arm-none-eabi-objcopy -O ihex ${ProjName}.elf ${ProjName}.hex

8 replies

KnarfB
KnarfBBest answer
Super User

Project Properties > C/C++ Build > Settings > Build steps > Post-build steps > Command:

arm-none-eabi-objcopy -O ihex ${ProjName}.elf ${ProjName}.hex

olezhandr
Associate III

the developers didn't bother to make it convenient at all. But thanks those who answered

SCobr.1
Visitor II

for google:

Project -> Properties -> C/C++ Build: Settings -> Tools Settings : MCU Post build outputs: "Convert to Intel Hex file (-O ihex)" 0693W000007E15DQAS.png

Mucahit.Hamarat
Associate II

If someone wants to locate the hex file inside project... Find your workspace file--> project file --> Debug. You will find the .hex file inside Debug folder.

PR.4
Associate II

0693W00000BcoZuQAJ.jpg

PR.4
Associate II

This works for me.

(STM32CubeIDE, Version: 1.6.1, Build: 9958_20210326_1446 (UTC))

RhSilicon
Lead

In case anyone wants to know how to generate the file with the calculated CRC (this post was made with my other user who was BANNED from this forum for reasons I don't know):

https://community.st.com/t5/security-mcu/how-to-use-hal-crc-accumulate-bufferlength-does-not-accept-the/td-p/252363

https://github.com/ethanhuanginst/STM32CubeIDE-Workshop-2019/issues/4