Intel HEX Record Generator

Serialize explicit bytes as one Intel HEX record with a computed byte count and checksum, enforcing control-record shapes.

Description

Intel HEX records serialize firmware bytes with a count, address, type and two’s-complement checksum.

Intel HEX records serialize firmware bytes with a count, address, type and two’s-complement checksum. Control records have shapes distinct from ordinary data records.1

Serialize explicit bytes as one Intel HEX record with a computed byte count and checksum, enforcing control-record shapes.

When to use Intel HEX Record Generator

Use this tool to serialize explicit bytes as one Intel HEX record with a computed byte count and checksum, enforcing control-record shapes.

Prepare the single firmware record, sampled digital states or effective timing/register parameters requested. Confirm byte order, bit numbering, units and device-specific limits before interpreting the calculation.

How to use Intel HEX Record Generator and understand its results

  1. Prepare the single firmware record, sampled digital states or effective timing/register parameters requested. Confirm byte order, bit numbering, units and device-specific limits before interpreting the calculation.
  2. Enter recordType, address, data using the field table and calculation rules, then run the tool.
  3. Read line. The explanation below defines the units, signs, ordering and any flags or placeholder values.
  4. If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
Input fieldMeaningValue type; see rules belowRequirement
recordTypeRecord type from 0 through 5.integer; minimum: 0; maximum: 5Required
addressSixteen-bit record address.integer; minimum: 0; maximum: 65535Required
dataRecord payload bytes.list of integer; minimum: 0; maximum: 255; minimum entries: 0; maximum entries: 255Required

Enter type 0–5, 16-bit address and at most 255 byte integers. Data type 0 permits any allowed address/length. Types 1–5 require address zero with lengths 0,2,4,2,4 respectively. Return one uppercase colon-prefixed record with two hex digits per byte.

checksum=−sum(count,addressHigh,addressLow,type,data) mod256

Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.

Output fieldMeaningValue type
lineUppercase Intel HEX record.string; maximum length: 1000000
json
{
  "input": {
    "recordType": 0,
    "address": 256,
    "data": [
      1,
      2,
      3,
      4
    ]
  },
  "output": {
    "line": ":0401000001020304F1"
  }
}

Limitations and assumptions

The tool does not split an image, track extended addresses or program hardware. Correct checksum does not authenticate firmware.

Numeric inputs must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors.

Alternative or Complementary methods

Use Intel HEX Record Parser: Parse one Intel HEX record and verify its byte count, two-complement checksum, record type, and control-record shape. For a complementary task, use Motorola S-Record Parser: Parse a Motorola S-record, checking its count, address width, ones-complement checksum, and record-type payload constraints.

References

  1. Intel HEX Record Generator — tool.io

Similar or alternative tools

  • Intel HEX Record Parser

    Parse one Intel HEX record and verify its byte count, two-complement checksum, record type, and control-record shape.

  • Motorola S-Record Parser

    Parse a Motorola S-record, checking its count, address width, ones-complement checksum, and record-type payload constraints.

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies