source: Deliverables/D4.1/IntelHex.mli @ 138

Last change on this file since 138 was 138, checked in by sacerdot, 9 years ago

Several bug fixes and code clean-up.
New main file: test.ml to parse and execute an HEX file.
Usage: ./test.native foo.hex

File size: 744 bytes
Line 
1open BitVectors;;
2open ASM;;
3open Parser;;
4
5type intel_hex_entry_type =
6    Data
7  | End
8  | ExtendedSeg
9  | ExtendedLinear
10;;
11
12type intel_hex_entry =
13{
14  record_length: byte;
15  record_addr: word;
16  record_type: intel_hex_entry_type;
17  data_field: byte list;
18  data_checksum: byte
19}
20;;
21
22type intel_hex_format = intel_hex_entry list;;
23
24val string_of_intel_hex_format: intel_hex_format -> string;;
25val prs_intel_hex_format: intel_hex_format parser;;
26
27val vect_of_hex_string: string -> sizes -> sizes vect;;
28val hex_string_of_vect: 'a vect -> string;;
29
30exception WrongFormat of string
31
32val intel_hex_of_file: string -> intel_hex_format
33val process_intel_hex: intel_hex_format -> Physical.WordMap.map
34
35val checksum_valid: intel_hex_entry -> bool;;
Note: See TracBrowser for help on using the repository browser.