| Crates.io | cargo-board |
| lib.rs | cargo-board |
| version | 0.1.0 |
| created_at | 2017-08-25 11:33:29.752534+00 |
| updated_at | 2017-08-25 11:33:29.752534+00 |
| description | Cargo subcommand to manage embedded boards |
| homepage | |
| repository | https://github.com/steffengy/cargo-board.git |
| max_upload_size | |
| id | 28991 |
| size | 5,603 |
A cargo subcommand for managing embedded boards
The configuration for boards is specified in a boards.toml such as:
[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
enables the board_[board_name] feature of the compiled crate (passes --feature board_[board_name] to cargo)
passes --target [soc.arch] to cargo
sets CARGO_TARGET_DIR to target/[board_name]
(TODO: this leads to duplication of compiled shared crates)
exposes LD_FLASH_SIZE and LD_RAM_SIZE as environmental variables to cargo so it can be used in build scripts
(TODO: make this generic and not hardcoded attributes?)
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]")]