forked from M-Labs/artiq
runtime: reorganize to support DRTIO satellite firmware
This commit is contained in:
parent
6b998581cc
commit
9967dfc5ca
|
@ -1,5 +1,5 @@
|
||||||
graft artiq/runtime
|
graft artiq/runtime
|
||||||
graft artiq/runtime.rs
|
graft artiq/firmware
|
||||||
graft artiq/examples
|
graft artiq/examples
|
||||||
include artiq/gui/logo*.svg
|
include artiq/gui/logo*.svg
|
||||||
include versioneer.py
|
include versioneer.py
|
||||||
|
|
|
@ -8,16 +8,16 @@ extern crate std_artiq as std;
|
||||||
extern crate libc;
|
extern crate libc;
|
||||||
extern crate byteorder;
|
extern crate byteorder;
|
||||||
|
|
||||||
#[path = "../src/board.rs"]
|
#[path = "../libbsp/board.rs"]
|
||||||
mod board;
|
mod board;
|
||||||
#[path = "../src/mailbox.rs"]
|
#[path = "../runtime/mailbox.rs"]
|
||||||
mod mailbox;
|
mod mailbox;
|
||||||
|
|
||||||
#[path = "../src/proto.rs"]
|
#[path = "../runtime/proto.rs"]
|
||||||
mod proto;
|
mod proto;
|
||||||
#[path = "../src/kernel_proto.rs"]
|
#[path = "../runtime/kernel_proto.rs"]
|
||||||
mod kernel_proto;
|
mod kernel_proto;
|
||||||
#[path = "../src/rpc_proto.rs"]
|
#[path = "../runtime/rpc_proto.rs"]
|
||||||
mod rpc_proto;
|
mod rpc_proto;
|
||||||
|
|
||||||
mod dyld;
|
mod dyld;
|
||||||
|
@ -110,7 +110,7 @@ macro_rules! println {
|
||||||
($fmt:expr, $($arg:tt)*) => (print!(concat!($fmt, "\n"), $($arg)*));
|
($fmt:expr, $($arg:tt)*) => (print!(concat!($fmt, "\n"), $($arg)*));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[path = "../src/rpc_queue.rs"]
|
#[path = "../runtime/rpc_queue.rs"]
|
||||||
mod rpc_queue;
|
mod rpc_queue;
|
||||||
|
|
||||||
#[lang = "panic_fmt"]
|
#[lang = "panic_fmt"]
|
|
@ -1,4 +1,4 @@
|
||||||
#[path = "../src/kernel_proto.rs"]
|
#[path = "../runtime/kernel_proto.rs"]
|
||||||
mod kernel_proto;
|
mod kernel_proto;
|
||||||
|
|
||||||
use board::csr;
|
use board::csr;
|
|
@ -1,5 +1,5 @@
|
||||||
[package]
|
[package]
|
||||||
authors = ["The ARTIQ Project Developers"]
|
authors = ["M-Labs"]
|
||||||
name = "runtime"
|
name = "runtime"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
|
@ -10,11 +10,11 @@ walkdir = "0.1"
|
||||||
[lib]
|
[lib]
|
||||||
name = "runtime"
|
name = "runtime"
|
||||||
crate-type = ["staticlib"]
|
crate-type = ["staticlib"]
|
||||||
path = "src/lib.rs"
|
path = "lib.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
std_artiq = { path = "libstd_artiq", features = ["alloc"] }
|
std_artiq = { path = "../libstd_artiq", features = ["alloc"] }
|
||||||
lwip = { path = "liblwip", default-features = false }
|
lwip = { path = "../liblwip", default-features = false }
|
||||||
fringe = { version = "= 1.1.0", default-features = false, features = ["alloc"] }
|
fringe = { version = "= 1.1.0", default-features = false, features = ["alloc"] }
|
||||||
log = { version = "0.3", default-features = false, features = ["max_level_debug"] }
|
log = { version = "0.3", default-features = false, features = ["max_level_debug"] }
|
||||||
log_buffer = { version = "1.0" }
|
log_buffer = { version = "1.0" }
|
|
@ -18,8 +18,8 @@ fn main() {
|
||||||
let id = format!("{}+{}.{}", id[0], id[1], id[2]);
|
let id = format!("{}+{}.{}", id[0], id[1], id[2]);
|
||||||
writeln!(f, "const GIT_COMMIT: &'static str = {:?};", id).unwrap();
|
writeln!(f, "const GIT_COMMIT: &'static str = {:?};", id).unwrap();
|
||||||
|
|
||||||
println!("cargo:rerun-if-changed=../../.git/HEAD");
|
println!("cargo:rerun-if-changed=../../../.git/HEAD");
|
||||||
for entry in WalkDir::new("../../.git/refs") {
|
for entry in WalkDir::new("../../../.git/refs") {
|
||||||
let entry = entry.unwrap();
|
let entry = entry.unwrap();
|
||||||
println!("cargo:rerun-if-changed={}", entry.path().display());
|
println!("cargo:rerun-if-changed={}", entry.path().display());
|
||||||
}
|
}
|
|
@ -55,6 +55,7 @@ extern fn panic_fmt(args: self::core::fmt::Arguments, file: &'static str, line:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[path = "../libbsp/board.rs"]
|
||||||
mod board;
|
mod board;
|
||||||
mod config;
|
mod config;
|
||||||
mod clock;
|
mod clock;
|
|
@ -35,7 +35,7 @@ all: runtime.bin runtime.fbi
|
||||||
$(RUSTOUT_DIRECTORY)/libruntime.a: ksupport.elf
|
$(RUSTOUT_DIRECTORY)/libruntime.a: ksupport.elf
|
||||||
CARGO_TARGET_DIR=$(realpath .)/cargo \
|
CARGO_TARGET_DIR=$(realpath .)/cargo \
|
||||||
cargo rustc --verbose \
|
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 -- \
|
--target=or1k-unknown-none -- \
|
||||||
$(shell cat $(BUILDINC_DIRECTORY)/generated/rust-cfg) \
|
$(shell cat $(BUILDINC_DIRECTORY)/generated/rust-cfg) \
|
||||||
-C target-feature=+mul,+div,+ffl1,+cmov,+addc -C opt-level=s \
|
-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:
|
$(RUSTOUT_DIRECTORY)/libksupport.a:
|
||||||
CARGO_TARGET_DIR=$(realpath .)/cargo \
|
CARGO_TARGET_DIR=$(realpath .)/cargo \
|
||||||
cargo rustc --verbose \
|
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 -- \
|
--target=or1k-unknown-none -- \
|
||||||
$(shell cat $(BUILDINC_DIRECTORY)/generated/rust-cfg) \
|
$(shell cat $(BUILDINC_DIRECTORY)/generated/rust-cfg) \
|
||||||
--cfg ksupport \
|
--cfg ksupport \
|
||||||
|
|
Loading…
Reference in New Issue