runtime: reorganize to support DRTIO satellite firmware

This commit is contained in:
Sebastien Bourdeauducq 2016-12-16 19:05:26 +08:00
parent 6b998581cc
commit 9967dfc5ca
51 changed files with 17 additions and 16 deletions

View File

@ -1,5 +1,5 @@
graft artiq/runtime
graft artiq/runtime.rs
graft artiq/firmware
graft artiq/examples
include artiq/gui/logo*.svg
include versioneer.py

View File

@ -8,16 +8,16 @@ extern crate std_artiq as std;
extern crate libc;
extern crate byteorder;
#[path = "../src/board.rs"]
#[path = "../libbsp/board.rs"]
mod board;
#[path = "../src/mailbox.rs"]
#[path = "../runtime/mailbox.rs"]
mod mailbox;
#[path = "../src/proto.rs"]
#[path = "../runtime/proto.rs"]
mod proto;
#[path = "../src/kernel_proto.rs"]
#[path = "../runtime/kernel_proto.rs"]
mod kernel_proto;
#[path = "../src/rpc_proto.rs"]
#[path = "../runtime/rpc_proto.rs"]
mod rpc_proto;
mod dyld;
@ -110,7 +110,7 @@ macro_rules! println {
($fmt:expr, $($arg:tt)*) => (print!(concat!($fmt, "\n"), $($arg)*));
}
#[path = "../src/rpc_queue.rs"]
#[path = "../runtime/rpc_queue.rs"]
mod rpc_queue;
#[lang = "panic_fmt"]

View File

@ -1,4 +1,4 @@
#[path = "../src/kernel_proto.rs"]
#[path = "../runtime/kernel_proto.rs"]
mod kernel_proto;
use board::csr;

View File

@ -1,5 +1,5 @@
[package]
authors = ["The ARTIQ Project Developers"]
authors = ["M-Labs"]
name = "runtime"
version = "0.0.0"
build = "build.rs"
@ -10,11 +10,11 @@ walkdir = "0.1"
[lib]
name = "runtime"
crate-type = ["staticlib"]
path = "src/lib.rs"
path = "lib.rs"
[dependencies]
std_artiq = { path = "libstd_artiq", features = ["alloc"] }
lwip = { path = "liblwip", default-features = false }
std_artiq = { path = "../libstd_artiq", features = ["alloc"] }
lwip = { path = "../liblwip", default-features = false }
fringe = { version = "= 1.1.0", default-features = false, features = ["alloc"] }
log = { version = "0.3", default-features = false, features = ["max_level_debug"] }
log_buffer = { version = "1.0" }

View File

@ -18,8 +18,8 @@ fn main() {
let id = format!("{}+{}.{}", id[0], id[1], id[2]);
writeln!(f, "const GIT_COMMIT: &'static str = {:?};", id).unwrap();
println!("cargo:rerun-if-changed=../../.git/HEAD");
for entry in WalkDir::new("../../.git/refs") {
println!("cargo:rerun-if-changed=../../../.git/HEAD");
for entry in WalkDir::new("../../../.git/refs") {
let entry = entry.unwrap();
println!("cargo:rerun-if-changed={}", entry.path().display());
}

View File

@ -55,6 +55,7 @@ extern fn panic_fmt(args: self::core::fmt::Arguments, file: &'static str, line:
}
}
#[path = "../libbsp/board.rs"]
mod board;
mod config;
mod clock;

View File

@ -35,7 +35,7 @@ all: runtime.bin runtime.fbi
$(RUSTOUT_DIRECTORY)/libruntime.a: ksupport.elf
CARGO_TARGET_DIR=$(realpath .)/cargo \
cargo rustc --verbose \
--manifest-path $(realpath $(RUNTIME_DIRECTORY)/../runtime.rs/Cargo.toml) \
--manifest-path $(realpath $(RUNTIME_DIRECTORY)/../firmware/runtime/Cargo.toml) \
--target=or1k-unknown-none -- \
$(shell cat $(BUILDINC_DIRECTORY)/generated/rust-cfg) \
-C target-feature=+mul,+div,+ffl1,+cmov,+addc -C opt-level=s \
@ -53,7 +53,7 @@ runtime.elf: $(OBJECTS) $(RUSTOUT_DIRECTORY)/libruntime.a
$(RUSTOUT_DIRECTORY)/libksupport.a:
CARGO_TARGET_DIR=$(realpath .)/cargo \
cargo rustc --verbose \
--manifest-path $(realpath $(RUNTIME_DIRECTORY)/../runtime.rs/libksupport/Cargo.toml) \
--manifest-path $(realpath $(RUNTIME_DIRECTORY)/../firmware/libksupport/Cargo.toml) \
--target=or1k-unknown-none -- \
$(shell cat $(BUILDINC_DIRECTORY)/generated/rust-cfg) \
--cfg ksupport \