Board Support Package for ssh-stamp-esp32.
Board definitions live in boards/*.toml (one file per board, containing
pin mappings and an optional documentation URL). The build.rs reads
those TOML files and generates all Rust code — board structs, the
[take_uart_pins!] macro, and the [select_board!] macro — into
OUT_DIR/boards_gen.rs, which is included here.
The TOML files are the single source of truth for pin numbers. No human writes or edits the generated Rust code.
Adding a board
- Create
boards/{board-name}.tomlwith a[pins]section (uart_rxanduart_tx, pluscan_tx/can_rxandi2c_sda/i2c_sclfor the buses the board breaks out), a[build]section naming its chip, and an optionalurl. - Add
board-{name} = []to[features]inCargo.toml.
No .rs file, no macro editing, no binary changes. The build.rs
validates that selected features have matching TOML files, and the board
shows up in the catalog above on the next cargo xtask <board> doc.