Intel_hexSourceThe Intel HEX manipulating library for OCaml provides functions for reading, writing, and creating.
You can use the high-level interface (via the Record.t module) to construct Intel HEX files. Here is an example:
let ihex =
Intel_hex.Record.
[
Data { offset = 0; payload = "hello " };
Data { offset = 7; payload = "world" };
(* ... *)
]of_channel ic read Intel HEX record from input channel.
output_to_buffer buf ihex output string representation of Intel HEX to buf buffer.