How to convert UF2 to HEX
- Add your .UF2 file - drop it in the box above or click to browse.
- Convert it to .HEX in a few seconds.
- Download your new .HEX file.
What to expect
- There is no one-command UF2-to-HEX; the raw
.binin the middle loses the address, so you must re-supply the flash base offset in the objcopy/srec step. - Get the offset wrong and the
.hexwill place code at the wrong memory address, which can brick or fail to boot the device. - Some objcopy versions had regressions converting binary to ihex; SRecord is the recommended fallback for exact offsets.
Frequently asked questions
Why two steps?
uf2conv.py only outputs raw .bin and C arrays, not Intel HEX. You convert UF2 to .bin, then use objcopy or SRecord to make the .hex.What offset do I use?
Use the flash base address the firmware is meant to run at (often the app region past the bootloader). Pass it via
--change-addresses or srec -offset.Where do I get objcopy?
It ships with GNU binutils; for ARM MCUs use the
arm-none-eabi-objcopy from the GNU Arm Embedded toolchain.What if objcopy gives wrong addresses?
Use SRecord's
srec_cat with an explicit -offset, which handles binary-to-Intel-HEX address placement reliably.