cancel
Showing results for 
Search instead for 
Did you mean: 

Can a hex file or a bin file be read back from the controller?

Kavana shree
Associate II

Can a hex and bin files be generated from each other?

2 REPLIES 2
AvaTar
Lead

Not in a strict sense. After downloading it, it is not a HEX file anymore, just binary Flash contents.

But yes, if no readout-protection is enabled, you can read it back, and save it to a file.

Consult the help documentation of your toolchain.

I think the ST-Link utility can do this as well.

.HEX .S19 or .BIN files can be used to describe the same data. The hex files tend to be larger, but can be sparse (not describe empty locations), and out-of-order.

Several tools can convert between formats, ie BIN2HEX, HEX2BIN, SRECORDS, etc. The formats are not inherently complicated.

ST-LINK and DFU tools can be used to pull the data from a device that isn't protected. STM32 CubeProgrammer GUI seems to lack the feature to save by command line version can.

Keil debugger have SAVE command.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..