Skip to main content
BCoch
Senior
March 17, 2020
Solved

How does one generate a .hex file from STM32CubeIDE?

  • March 17, 2020
  • 4 replies
  • 49239 views

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

Best answer by KnarfB

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

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

4 replies

KnarfB
KnarfBBest answer
Super User
March 17, 2020

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
July 30, 2023

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

SCobr.1
Visitor II
February 4, 2021

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

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
July 5, 2021

0693W00000BcoZuQAJ.jpg

PR.4
Associate II
July 5, 2021

This works for me.

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

RhSilicon
Lead
July 31, 2023

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