Started building BINLens
Initial Modules
Added headers and implementation files for the planned architecture:
clidiagnosticfirmware_imagehex_parserbin_loadermemmapentropyvector_tableformatmain
Most analysis modules are still scaffolded. The implemented path at this point is Intel HEX parsing and basic CLI summary output.
Firmware Image Model
Implemented an owned source-chunk model:
-
BlFirmwareImagenow owns parsed chunks. -
BlSourceChunkstores:- start address,
- end address,
- byte length,
- copied byte buffer,
- origin path,
- origin line.
- The firmware image tracks:
- chunk count,
- total loaded bytes,
- lowest loaded address,
- highest loaded address.
This gives later work enough structure for memory reconstruction, overlap detection, entropy analysis, and vector table detection.
Intel HEX Parser
Implemented parsing for the Week 1 record scope:
-
00data record. -
01end-of-file record. -
02extended segment address. -
04extended linear address. -
05start linear address.
Parser behavior now includes:
- required leading colon validation,
- header and data hex validation,
- record length validation,
- checksum validation,
- EOF validation,
- data-after-EOF rejection,
- unsupported record type diagnostics,
- line-numbered error messages,
- start linear address metadata capture.
Checksum failures now report both the record checksum and computed checksum.
CLI Progress
The CLI now:
- parses
--help, - parses
--version, - accepts
--format,--base,--entropy-chunk,--heatmap,--no-color, and--verbose, - infers
.hexand.ihexas Intel HEX, - runs the Intel HEX parser,
- prints a basic input summary.
Example successful output from a real STM32 demo HEX file:
BINLens 0.1.0-dev
Input
File: ..\testfiles\STM32-DEMO.hex
Format: Intel HEX
Records: 486
Data records: 483
Bytes loaded: 7728
Chunks: 483
Address span: 0x08000000 - 0x08001E2F
Start linear: 0x08000131
--heatmap is currently accepted but does not produce heatmap output yet.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.