30

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.

Peter Mortensen
  • 1,679
  • 3
  • 17
  • 23
Seidleroni
  • 1,684
  • 2
  • 14
  • 19

15 Answers15

7

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.

Peter Mortensen
  • 1,679
  • 3
  • 17
  • 23
Scott Murphy
  • 923
  • 6
  • 10
  • 3
    This also works on windows. It's part of the KDE for windows package. – Connor Wolf Aug 19 '10 at 04:59
  • 1
    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. – Morty Mar 27 '23 at 07:10
6

you can use objdump, example:

objdump -s file.hex

Ever
  • 1
  • 1
  • 1
  • 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. – mckenzm Jul 04 '20 at 01:06
4

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.

Peter Mortensen
  • 1,679
  • 3
  • 17
  • 23
Mark
  • 111
  • 3
3

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.

rdtsc
  • 16,238
  • 4
  • 32
  • 70
3

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

Peter Mortensen
  • 1,679
  • 3
  • 17
  • 23
markrages
  • 20,015
  • 7
  • 60
  • 97
1

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).

sktpin
  • 171
  • 1
  • 7
0

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

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

Bort
  • 5,142
  • 5
  • 33
  • 57
0
  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.

Peter Mortensen
  • 1,679
  • 3
  • 17
  • 23
jpc
  • 5,302
  • 1
  • 25
  • 45
  • 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. – JustJeff Aug 21 '10 at 20:12
  • 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) – jpc Aug 22 '10 at 20:29
0

For Linux systems you have:

  • Okteta (KDE-based)
  • GHex / GHex 2 (GNOME)
Peter Mortensen
  • 1,679
  • 3
  • 17
  • 23
Johan
  • 2,385
  • 2
  • 25
  • 27
  • 7
    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. – James Waldby - jwpat7 Sep 26 '16 at 03:35
0

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.

mckenzm
  • 175
  • 5
0

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

Brian Carlton
  • 13,312
  • 5
  • 44
  • 65
-1

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.

Robert Harvey
  • 1,066
  • 1
  • 10
  • 22
-1

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

mjh2007
  • 3,899
  • 25
  • 50
-3

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.

Peter Mortensen
  • 1,679
  • 3
  • 17
  • 23
Amos
  • 2,893
  • 3
  • 27
  • 26
-3

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.

Peter Mortensen
  • 1,679
  • 3
  • 17
  • 23
Robert Atkins
  • 2,165
  • 5
  • 23
  • 38