Intel HEX Viewer — parse, verify and map

Parse Intel HEX and Motorola SREC files, verify checksums and view the resulting memory map.

Example: 3 records, 32 bytes of data from 0x100 to 0x120 — checksums all valid.

Check it against real silicon

Chiprun runs your firmware on an emulated microcontroller and hands back the UART output, so you can confirm these numbers rather than trusting them.

Chiprun docs

Formula

checksum = two's complement of the sum of all preceding bytes

Worked example

3 records, 32 bytes of data from 0x100 to 0x120 — checksums all valid.

  1. checksum = two's complement of the sum of preceding bytes

    record on line 1: sum & 0xFF, negated

    0x40 (file has 0x40)

    Every byte of a valid record, checksum included, sums to zero modulo 256.

Frequently asked questions

What is the Intel HEX checksum?

The two's complement of the sum of every preceding byte in the record. A neat consequence: add up all the bytes of a valid record including the checksum and you get zero modulo 256, which makes verification a single loop.

Why does a HEX file have addresses above 64 KB?

The address field is only 16 bits, so extended-address records set the upper bits for everything that follows. Type 04 records supply the upper 16 bits of a 32-bit linear address; type 02 is the older segmented form.

Why are there gaps in the address range?

Because the linker placed sections apart — vectors at the bottom of flash, code after it, and configuration bytes somewhere else entirely. HEX files only describe the bytes that exist, so gaps are normal, and anything consuming them must handle non-contiguous data.

Related tools