Where is my hex file on STM32?

 On STM32 there isn’t a special “HEX storage” on the chip—your .hex file is generated on your PC by the build toolchain, and its location depends on the IDE/build config.



If you use STM32CubeIDE (most common)

  • Build Debug → typically here:
    <your_project>/Debug/
    Example: ...\workspace\<project>\Debug\<project>.hex

  • Build Release → typically here:
    <your_project>/Release/

Important: CubeIDE always creates an .elf. The .hex/.bin may not appear unless enabled.

  • Enable it in CubeIDE:
    Project Properties → C/C++ Build → Settings → MCU Post build outputs → check “Convert to Intel Hex” (and/or Bin).

If you use Keil µVision

  • Usually in: <project>\Objects\ (or whatever you set in Options for Target).

If you use IAR EWARM

  • In the project output directory you configured (often under Debug/Exe or similar), depending on settings.

Quick way to find it (any IDE)

Search your project/workspace folder for: *.hex.

评论

此博客中的热门博文

Detailed Explanation of STM32 HAL Library Clock System

How do you set up ADC (Analog-to-Digital Converter) in STM32?

How To Connect Stm32 To PC?