intel_hex library

This library provides the functionality to read and write Intel HEX files.

Intel HEX is a file format that stores binary data as ASCII text files. The primary interface to use this library is the class IntelHexFile. The hex file may contain multiple instances of MemorySegment that describe the binary layout of the memory. The segments are managed via the base class of the file: MemorySegmentContainer.

Classes

IntelHexFile
This class represents the interface to read and write Intel hex files.
MemorySegment
The class that represents a memory segment of an Intel Hex file.
MemorySegmentContainer
This class represents multiple memory segments.
SegmentByte
Wrapper for the return value of the iterator.
SegmentIterator
Iterator for all mutations in a given text.
StartSegmentAddress
Data type representing the start segment address. For 80x86 CPUs, this is the start address of the execution.

Functions

appendChecksum(Uint8List data) Uint8List
Appends the checksum to the given data.
computeChecksum(Iterable<int> data, [bool isTwosComplement = true]) int
Computes a checksum for the given data. All values are summed with overflow and then the ones or twos complement of the sum is selected, depending on isTwosComplement.
segmentToI16FileContents(MemorySegment seg, String startCode, int lineLength) String
Converts the segment seg to an Intel Hex file record block with a max size of 1 MB.
segmentToI32FileContents(MemorySegment seg, String startCode, int lineLength) String
Converts the segment seg to an Intel Hex file record block.
segmentToI8FileContents(MemorySegment seg, String startCode, int lineLength) String
Converts the segment seg to an Intel Hex file record block with a max of 16 bit addresses.
validateChecksum(Iterable<int> data, [int target = 0]) bool
Validates that the byte data read from an Intel Hex record is correct by computing the checksum and comparing the result to a target value.

Enums

IntelHexFormat
The format that is used to print the intel hex file.