Intel_hexSourceA Intel HEX manipulation library for parsing and generating Intel HEX (also known as IHEX) objects. This format is commonly used to represent compiled program code and data that is loaded into a microcontroller, flash memory, or ROM in embedded systems programming.
Example
utop # Intel_hex.Object.from_string ~block_size:5 "Hello World!"
|> Intel_hex.Encode.to_string
|> print_endline;;:0500000048656C6C6F07
:0500050020576F726C32
:02000A0064216F
:00000001FFutop # Intel_hex.Decode.from_string ihex_text;;- : Intel_hex.Object.t =
[Intel_hex.Record.Data(0x0000, "Hello");
Intel_hex.Record.Data(0x0005, " Worl");
Intel_hex.Record.Data(0x000A, "d!");
Intel_hex.Record.End_of_file]