Skip to content

tomrford/mint

Repository files navigation

mint

Build flash blocks from a layout file (TOML) and a data source (Excel or JSON), then emit hex files.

img

Install from crates.io with cargo install mint-cli or via nix flakes. From a checkout, install the CLI with cargo install --path crates/mint-cli.

Repository Layout

mint is a Cargo workspace:

  • crates/mint-core provides the library API for layouts, data sources, build artifacts, and output rendering.
  • crates/mint-cli provides the mint binary, CLI argument parsing, file writing, and terminal summaries.

Documentation

Quick Start

# Excel data source
mint block.toml --xlsx data.xlsx -v Default --stats

# JSON data source
mint layout.toml -j data.json -v Debug/Default

# Multiple blocks with options
mint layout.toml#config layout.toml#data --xlsx data.xlsx -v Default --stats

Layout Example

[mint]
endianness = "little"

[config.header]
start_address = 0x8000
length = 0x100

[config.data]
device.id = { value = 0x1234, type = "u32" }
device.name = { name = "DeviceName", type = "u8", size = 16 }
version = { name = "Version", type = "u16" }
gain = { value = 1.5, type = "uq8.8" }
coefficients = { name = "Coefficients", type = "f32", size = 4 }
matrix = { name = "Matrix", type = "i16", size = [2, 2] }

[data.header]
start_address = 0x8100
length = 0x100

[data.data]
counter = { name = "Counter", type = "u64" }
message = { value = "Hello", type = "u8", size = 16 }

See doc/examples/block.toml for full examples.

About

A CLI tool for building hex files from excel data and a layout definition.

Resources

License

Stars

Watchers

Forks

Contributors

Languages