Sometimes you have an Intel HEX file, but you want to view the contents as if it were raw sequential binary. This command-line utility does just that. It's basically hexdump
for actual .hex files!
python view-hex.py my-hex-file.hex
The output will always be a table where the left-most hex value is the memory address of the data which is printed in the right-most column. This is basically just a hexdump!
The other columns indicate the length of the data and the type of hex
Parsing firmware.hex
0x0 (2) (extended linear address)
0x0 (32) (data) 0050002051080000B1080000B5080000B9080000B9080000B908000000000000
0x20 (32) (data) 000000000000000000000000B9080000B908000000000000B9080000B9080000
0x40 (32) (data) B9080000B9080000B9080000B9080000B9080000B9080000B9080000B9080000
0x60 (32) (data) B9080000B9080000B9080000B9080000B9080000B9080000B9080000B9080000
0x80 (32) (data) B9080000B9080000B9080000B9080000B9080000B9080000B9080000B9080000
0xa0 (32) (data) B9080000B9080000B9080000B9080000B9080000B9080000B9080000B9080000
0xc0 (32) (data) B9080000B908000008B501F005F90346002B14BF01230023DBB2184608BD00BF
0xe0 (32) (data) 08B501F0F1F80346002B14BF01230023DBB2184608BD00BF014B01221A607047
0x100 (32) (data) 28200860054B1B6803F00203002B14BF01230023DBB21846704700BF28200840
0x120 (32) (data) 08B501F0D1F8024B01221A60FEE700BFFC00204308B5084B1B6814331B680420
0x140 (32) (data) 984700BF044B1B6834331B68042098470346012BF6D108BDB801001000B583B0
0x160 (32) (data) FFF7BEFF03468DF80730FFF7E3FF104B1B681C331B684FF4A0609847FFF7BCFF
0x180 (32) (data) 00BFFFF7BFFF034683F00103DBB2002BF7D100F0C5F99DF8073083F00103DBB2
0x1a0 (32) (data) 002B01D0FFF790FF03B05DF804FB00BFB801001000B58BB0FFF7D0FF05AB1846
.
. (skipping a bunch of data for brevity)
.
0x6fe0 (32) (data) B0000800EC2A0020142B00200C0014009C300020C8300020000000000C000000
0x7000 (32) (data) 00000000703200200C0008006033002070330020380002003434002038340020
0x7020 (32) (data) 0C00080068330020D43300200000000000000000000000000000000004000000
0x7040 (32) (data) 00000000A0680100251E0100000000000000000080FF0000ED24010000000000
0x7060 (32) (data) 81FF0000DD230100200002008435002040350020000000000800000000000000
0x7080 (32) (data) 8C3500208006002028001400083A00203036002008001400F439002050390020
0x70a0 (32) (data) B00600200000000012000000000000001C3A0020EC68010000000020CDABFFF0
0x70c0 (12) (data) 01FFFFFF48DCFF7F01000000
0xffa8 (32) (data) 00008001100082FFFDFF58003AFFBFF3FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
0xffc8 (32) (data) FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC5FFFFFFFFC5FFFFFFC5C5C5FF
0xffe8 (24) (data) C5C5C5FF00000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
0x0 (4) (start linear address)
0x0 (0) (end of file)