cancel
Showing results for 
Search instead for 
Did you mean: 

How does one generate a .hex file from STM32CubeIDE?

BCoch
Senior

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

1 ACCEPTED SOLUTION

Accepted Solutions
KnarfB
Principal III

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

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

View solution in original post

7 REPLIES 7
KnarfB
Principal III

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

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

SCobr.1
Associate

for google:

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

PR.4
Associate II

0693W00000BcoZuQAJ.jpg

PR.4
Associate II

This works for me.

(STM32CubeIDE, Version: 1.6.1, Build: 9958_20210326_1446 (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.

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

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