pflib v3.14.3-4-g3289bd3
Pretty Fine HGCROC Interaction Library
Loading...
Searching...
No Matches
pflib::utility::intel_hex Namespace Reference

A reader/writer implemeting a subset of the Intel HEX format. More...

Classes

class  DataRecord
 a record of data from/to the IntelHex format More...
 
class  Reader
 reader for the IntelHex format More...
 
class  Writer
 writer for the IntelHexFormat More...
 

Variables

::pflib::logging::logger the_log_ {::pflib::logging::get("intel_hex")}
 
static const char * EOF_LINE = ":00000001FF"
 

Detailed Description

A reader/writer implemeting a subset of the Intel HEX format.

After a brief survey of the available options online, it appears like the format is simple enough that there is no maintained C++ library for interacting with it. This implementation follows the description given on Wikipedia and only supports record types 0x00 (Data) and 0x01 (EoF). This is okay for our purposes since both the ECONs and the ROCs use 16 bit addressing for their registers.

A few other specializations

  • the lines are always separated by a newline
  • empty lines are ignored
  • lines beginning with '//' are comments and ignored
  • lines beginning with ':' are records and parsed,
  • all other lines are errors