30
\$\begingroup\$

Lately I've been doing a lot of work with Intel HEX files. I want a program that can import an Intel HEX file and allow me to view the byte contents at each address.

There are a handful of programs I've seen that do this, but are there any that are good which are free and also allow you to see the contents at an absolute address, not a relative address to the start of the hex file (for example, if the Intel HEX file starts writing at address 200, the application should signify that addresses 0-199 are blank and not show as if it starts at address 0)?

The best tool I've found is not really a tool meant to view HEX files, but Segger's J-Link Flash programming software. It's really meant to program chips, but it reads HEX files beautifully. Find it at J-Link / J-Trace Downloads.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ Not merely a binary file editor that displays in hex, but an actual hex-record editor? that would be cool. Wants one. \$\endgroup\$
    – JustJeff
    Commented Aug 18, 2010 at 22:14
  • 7
    \$\begingroup\$ make your edit that says your solution an answer, it should not be part of the question. \$\endgroup\$
    – Kortuk
    Commented Feb 2, 2011 at 21:38
  • 1
    \$\begingroup\$ Found this searching for the same util, and agree that the Segger jlink flash tool is a great solution. And agree with Kortuk's comment here as well. \$\endgroup\$ Commented Jan 22, 2014 at 1:22

15 Answers 15

7
\$\begingroup\$

If you have access to a KDE computer you should try Okteta. It interprets hex in three or four formats at once. It is very very nice, especially if you are looking at mixed meaning hex code.

\$\endgroup\$
2
  • 3
    \$\begingroup\$ This also works on windows. It's part of the KDE for windows package. \$\endgroup\$ Commented Aug 19, 2010 at 4:59
  • 1
    \$\begingroup\$ It seems like Okteta can export Intel Hex, but I have found no way to import it. Opening a `.hex' just opens the file a binary. \$\endgroup\$
    – Morty
    Commented Mar 27, 2023 at 7:10
6
\$\begingroup\$

you can use objdump, example:

objdump -s file.hex

\$\endgroup\$
1
  • \$\begingroup\$ Ideally we all need something that goes as far as automating the checksums. We had tools for recalculating CRC for hex edited files over 30 years ago for the Amiga say. \$\endgroup\$
    – mckenzm
    Commented Jul 4, 2020 at 1:06
4
\$\begingroup\$

WinHex will convert (Ctrl + R) to/from Intel format, and uses 0xFF as the empty data value (as Binex does). It's also a fantastic tool if you need to do anything else with binaries or hard drive structures.

Hexplorer is a bit clunky, and strangely complains if there isn't a start address.

\$\endgroup\$
3
\$\begingroup\$

For Emacs, there is a mode, Mode for Intel Hex files.

\$\endgroup\$
3
\$\begingroup\$

The converter I wrote answers your requests. Written in Lazarus, with source. Download it at Intel Hex to binary and vice-versa Windows converter for AVR developers + Hex editor.

\$\endgroup\$
1
  • \$\begingroup\$ This looks like a fine tool. You ought to give it a name... \$\endgroup\$ Commented Apr 16, 2017 at 13:52
1
\$\begingroup\$

On Windows: Hxd has, since a few years, an option: File -> import Intel Hex (also Motorola S-rec). Note: It's important to use the import function, not drag+drop, for such files, or it will not split it up into sections that you can collapse/expand, for efficient viewing (and presumably, not properly interpret the content, but just show the raw file content).

\$\endgroup\$
0
\$\begingroup\$

Emacs, specifically with hexview-mode. Unfortunately it doesn't meet your offset viewer requirement.

\$\endgroup\$
0
\$\begingroup\$

Try intelHex: https://github.com/micha2070/intelHex

It's new, simple, and free. No installation needed.

\$\endgroup\$
0
\$\begingroup\$

Visual Studio Code handles this now, with checksum recalculation. This allows direct editing of constants without recompilation, and possibly patch application by line replacement.

It is an extension. I was previously using Synwrite and calculating checksums externally.

\$\endgroup\$
-1
\$\begingroup\$
  1. You could try converting the file to a plain old binary blob and then edit it with an ordinary "hex editor". It is suboptimal, but since typical hex files contain less than a megabyte of data it should work.

  2. For my simple needs, the Vim built-in syntax highlighting was sufficient. It colors different parts of the line so you won't mistake the address, type or checksum with data. Maybe it could be enhanced with the new 7.3 "conceal" feature to decode record types on the fly.

\$\endgroup\$
3
  • \$\begingroup\$ i've used vim on hex files, too, and you know, if there was some way to make a vim macro/plug-in/something that could recalculate the checksum, that would be a 99% solution. \$\endgroup\$
    – JustJeff
    Commented Aug 21, 2010 at 20:12
  • \$\begingroup\$ JustJeff: That's an interesting idea. It should be easy, I will try looking into it. (will have to learn some vimscript for this, but I wished to learn it anyway) \$\endgroup\$
    – jpc
    Commented Aug 22, 2010 at 20:29
  • \$\begingroup\$ "You could try converting the file to a plain old binary blob" Then you get the addresses in ASCII codes which is completely useless and much worse than just opening the file in a text editor. \$\endgroup\$
    – Lundin
    Commented Oct 8 at 6:00
-1
\$\begingroup\$

For Linux systems you have:

  • Okteta (KDE-based)
  • GHex / GHex 2 (GNOME)
\$\endgroup\$
1
  • 7
    \$\begingroup\$ Those are both totally irrelevant to the question. Both can edit binary files using hexadecimal notation for bytes of the file. However, Intel HEX files are files of ascii characters that represent object file data. \$\endgroup\$ Commented Sep 26, 2016 at 3:35
-2
\$\begingroup\$

I use Hex Editor Neo. It has some unique properties that make it useful for my particular brand of work, such as the ability to handle large files, unlimited undo/redo, and the ability to create patches. It can display data as bytes, words, double words, and floating point numbers.

I don't believe it has any awareness of the Intel Hex File format. It can make relative jumps, however. So if your file starts at address 200, you can jump absolute to your specified address, and then jump relative minus 200, and that should take you to the exact byte.

\$\endgroup\$
-2
\$\begingroup\$

I'm not familiar with the format of Intel hex files, but when I need to modify/view a binary I use XVI32.

\$\endgroup\$
-4
\$\begingroup\$

I've not used any of these, so I'm not sure if they meet your requirements or not:

Hexplorer

WinHex

There also seem to be some links at the bottom of the Intel HEX page on Wikipedia.

\$\endgroup\$
1
  • 2
    \$\begingroup\$ These are hex editors, not .hex viewers. \$\endgroup\$
    – Timmmm
    Commented Oct 24, 2016 at 14:04
-4
\$\begingroup\$

For completeness, if you're on a Mac Hex Fiend is very good. It works well with very large files (~100 GB) and allows all sorts of tricky editing.

\$\endgroup\$
1
  • 2
    \$\begingroup\$ Hex Fiend does not support Intel HEX files \$\endgroup\$ Commented Jan 6, 2016 at 2:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.