Skip to main content
BCoch
Senior
Mar 17, 2020 6:33 PM UTC
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
Mar 17, 2020 8:09 PM UTC

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
Mar 17, 2020 8:09 PM UTC

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
Jul 30, 2023 9:58 PM UTC

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

SCobr.1
Visitor II
Feb 4, 2021 6:07 PM UTC

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
May 27, 2022 8:56 AM UTC

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
Jul 5, 2021 9:58 AM UTC

0693W00000BcoZuQAJ.jpg

PR.4
Associate II
Jul 5, 2021 9:58 AM UTC

This works for me.

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

RhSilicon
Lead
Jul 31, 2023 5:09 AM UTC

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