Skip to main content
2 of 7
added 4 characters in body
Light123
  • 195
  • 1
  • 1
  • 7

Clarification about .hex and .bin file

I am newbie to this field. I would like to understand how these things work and what these file contains (and if I'm in the rigth way).

To explain my doubts, I use the .hex file posted in a similar question: How can I decompile an ARM Cortex-M0 .hex file to C++?

Link to .hex file: http://www.3fvape.com/images/3fvape-blog-img/20150806-4384-xcubeII-upgrade/SMOK_X_CUBE_II_firmware_v1.07.hex

The .hex file contains the instructions that will be executed by the microcroller, and the format used is http://www.keil.com/support/docs/1584/ , am I right?

Now I've tried to extract some information from this file (just for learning); I've converted the .hex file into .bin file with hex2bin (as suggested in the first answer); then I've run the command "strings file.bin", and I've found some readable strings.

What does it mean? Why can I read only some strings and not all the data? Exacly what happen when I convert .hex file to .bin file? Is there a way to extract the code in which these strings are used?

Maybe this question is too silly, but I hope that someone could explain what these files are,and what they represent. Any good resource will be appreciate. Thanks in adavantage.

Light123
  • 195
  • 1
  • 1
  • 7