You are browsing as a guest. Sign up (or log in) to start making projects!

2h 31m 25s logged

Started building BINLens

Initial Modules

Added headers and implementation files for the planned architecture:

  • cli
  • diagnostic
  • firmware_image
  • hex_parser
  • bin_loader
  • memmap
  • entropy
  • vector_table
  • format
  • main

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:

  • BlFirmwareImage now owns parsed chunks.
  • BlSourceChunk stores:
    • 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:

  • 00 data record.
  • 01 end-of-file record.
  • 02 extended segment address.
  • 04 extended linear address.
  • 05 start 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 .hex and .ihex as 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.

0
1

Comments 0

No comments yet. Be the first!