mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
utra: add real package in
This does not use a submodule. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
d3d055ff4b
commit
bcbfec466e
3 changed files with 25 additions and 0 deletions
12
utra/Cargo.toml
Normal file
12
utra/Cargo.toml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
[package]
|
||||
name = "utra"
|
||||
version = "0.1.0"
|
||||
authors = ["Sean Cross <sean@xobs.io>"]
|
||||
edition = "2018"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
|
||||
[build-dependencies]
|
||||
svd2utra = { path = "../svd2utra" }
|
||||
11
utra/build.rs
Normal file
11
utra/build.rs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
use std::env;
|
||||
|
||||
fn main() {
|
||||
let svd_file = env::var("XOUS_SVD_FILE").unwrap_or("../example.svd".to_owned());
|
||||
println!("cargo:rerun-if-env-changed=XOUS_SVD_FILE");
|
||||
println!("cargo:rerun-if-env-changed={}", svd_file);
|
||||
|
||||
let src_file = std::fs::File::open(svd_file).expect("couldn't open src file");
|
||||
let mut dest_file = std::fs::File::create("src/generated.rs").expect("couldn't open dest file");
|
||||
svd2utra::generate(src_file, &mut dest_file).unwrap();
|
||||
}
|
||||
2
utra/src/lib.rs
Normal file
2
utra/src/lib.rs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
mod generated;
|
||||
pub use generated::*;
|
||||
Loading…
Reference in a new issue