~ruther/avr-device

b11ae9830db37524d0e44f335cbb920c6f39c8b3 — Rahix 5 years ago 00e0564
Add build-script to auto-generate chip-defs

Signed-off-by: Rahix <rahix@rahix.de>
2 files changed, 23 insertions(+), 0 deletions(-)

M Cargo.toml
A build.rs
M Cargo.toml => Cargo.toml +1 -0
@@ 3,6 3,7 @@ name = "avr-device"
version = "0.1.0"
authors = ["Rahix <rahix@rahix.de>"]
edition = "2018"
build = "build.rs"

[features]
atmega1280 = []

A build.rs => build.rs +22 -0
@@ 0,0 1,22 @@
use std::process;

fn main() {
    // Just run `make` to generate the chip definitions
    if !process::Command::new("make").status().unwrap().success() {
        eprintln!("
avr-device: Running `make` resulted in a failure.

    Please make sure, you have all dependencies
    installed.  They are:
        - atdf2svd
        - svd2rust
        - form
        - rustfmt (for the toolchain you are using!)
        - PyYAML

    For more info, look at README file:
        https://github.com/Rahix/avr-device/blob/master/README.md
");
        panic!("make failed");
    }
}

Do not follow this link