3 ms·
>As far as I can gather, Intel HEX files are meant to make binary images less opaque I know this is getting away from the main point of the article, but they'r
by gmiller123456 8y ago
>As far as I can gather, Intel HEX files are meant to make binary images less opaque
I know this is getting away from the main point of the article, but they're purpose is more to have a standard format that compilers can generate and eprom/device programmers could read without being concerned with the machine's endianness. Pretty much any embedded compiler can produce a .hex file, and pretty much any programmer will read one.
- keithnz 8y agoIt amused me that the hex file was described as esoteric given how prolific they are in the embeded world.
- copperx 8y agoThat brought back memories. When I was a kid I liked to poke around executables in the MS-DOS world. Hex editors were limited in the sense that they wouldn't let me insert bytes into the file, just edit existing ones. Because I didn't have access to an disassembler or an assembler (they were sold at stores but they were too expensive for me), I wrote a simple program that would convert a binary file into a text file full of hex codes, then I could edit that, change jumps to different addresses, change strings, and then I would reassemble the executable with another program to see the effect. I used this to translate programs and games to Spanish by changing the strings in the executable. Messages in Spanish are in average longer than English ones, so I couldn't just use a hex editor. It's funny to me that the hex file format is a real thing.
- keithnz 8y agoit's a bit more involved than just hex.... it specifies address ranges and data that goes into those address ranges + more see https://en.wikipedia.org/wiki/Intel_HEX https://en.wikipedia.org/wiki/Intel_HEX
- phyllostachys 8y agoAnd, unfortunately, it is a destructive process going from elf to hex, as I've discovered a few times. Intel HEX is just the data at what addresses so one looses the section info and metadata from an elf. I'm always happen to see when a uC vendor IDE keeps the elfs and the programmer takes elfs.
- JdeBP 8y agoOne of the things that would have benefitted MS-DOS that came out of the box with OS/2 1.x was a PATCH.EXE , a tool for applying binary patches.
- gumby 8y agoAnd designed to use only printable ASCII characters so the file would not get mangled as it was moved around. Intel hex was one of the original file formats I targeted for gnu bfd (after a.out and coff of course)