A cargo subcommand for managing embedded boards
The configuration for boards is specified in a boards.toml
such as:
```toml [soc] STM32F2XXXB = { arch = "thumbv7m-none-eabi", flash = "128K", ram = "64K" } STM32F2XXXE = { arch = "thumbv7m-none-eabi", flash = "512K", ram = "128K" }
[board] flexperiment_mini = { soc = "STM32F2XXXB" } netboard = { soc = "STM32F2XXXE" } ```
cargo board [board_name] <ARGUMENTS TO CARGO>
e.g. cargo board netboard build -p blink
board_[board_name]
feature of the compiled crate (passes --feature board_[board_name]
to cargo)--target [soc.arch]
to cargoCARGO_TARGET_DIR
to target/[board_name]
LD_FLASH_SIZE
and LD_RAM_SIZE
as environmental variables to cargo so it can be used in build scripts exposes BOARD_FEATURES
so we can expose the following features
(exposed using rustc, so only available in code and not in cargo-configuration):
soc_[soc_name]
feature, you can check for a specific soc using #[cfg(feature="soc_[soc_name]")]