Add or support a board
A board is a place where pins and buses are named. rohi-hal-esp is the single place for that; drivers, firmware tasks
and the portable crates never contain pin numbers. Existing example: rohi_hal_esp::board::altruist_urban
(Boards).
A new chip variant of an existing board (for example another ESP32 for the Altruist Urban):
- Add
esp32xx.rsnext toesp32c3.rs/esp32c6.rsinboard/altruist_urban/with the pin map and the peripheral types (Hardware), and select it with a Cargo feature forwarded by the firmware and byrohi-hal-esp,rohi-config-esp,rohi-net-espand the other platform crates. - Add the matching
rohi-net-esp/esp-radiofeature, a partition table (firmwares/altruist-urban/partitions-<chip>.csv) mirrored byrohi_config_esp::layout(a host test keeps them in sync), and the Cargo alias plus runner entry in.cargo/config.toml(check-*,build-*). - Add the chip to the CI matrix, and to Targets and features. Chips are never
validated together with
--all-features.
A new board revision with a different pin map gets its own module instead of an edit of the existing tables.
A new board (new product):
- Create
board/<name>/inrohi-hal-espexposing a chip independent API:Hardware::split(peripherals)and<Board>::new(hardware)returning configured buses (I²C, UART, I²S), ready for the sensor drivers. - Create
firmwares/<name>/composing the portable crates. Put its static resource sizes in its ownsrc/resources.rswith the documentation of Memory model; the product owns its budget. - Document the pin map and its verification status in Boards, marking anything that has not been verified on hardware.
Keep vendor types inside the platform crate and the portable APIs unchanged; if a portable crate needs to change for the new board, the seam was leaking (Portability).