diff --git a/MANIFEST.in b/MANIFEST.in index 3fb533874..5f0c4245c 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -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 diff --git a/artiq/runtime.rs/liballoc_artiq/Cargo.toml b/artiq/firmware/liballoc_artiq/Cargo.toml similarity index 100% rename from artiq/runtime.rs/liballoc_artiq/Cargo.toml rename to artiq/firmware/liballoc_artiq/Cargo.toml diff --git a/artiq/runtime.rs/liballoc_artiq/lib.rs b/artiq/firmware/liballoc_artiq/lib.rs similarity index 100% rename from artiq/runtime.rs/liballoc_artiq/lib.rs rename to artiq/firmware/liballoc_artiq/lib.rs diff --git a/artiq/runtime.rs/src/board.rs b/artiq/firmware/libbsp/board.rs similarity index 100% rename from artiq/runtime.rs/src/board.rs rename to artiq/firmware/libbsp/board.rs diff --git a/artiq/runtime.rs/libksupport/Cargo.lock b/artiq/firmware/libksupport/Cargo.lock similarity index 100% rename from artiq/runtime.rs/libksupport/Cargo.lock rename to artiq/firmware/libksupport/Cargo.lock diff --git a/artiq/runtime.rs/libksupport/Cargo.toml b/artiq/firmware/libksupport/Cargo.toml similarity index 100% rename from artiq/runtime.rs/libksupport/Cargo.toml rename to artiq/firmware/libksupport/Cargo.toml diff --git a/artiq/runtime.rs/libksupport/ad9154.rs b/artiq/firmware/libksupport/ad9154.rs similarity index 100% rename from artiq/runtime.rs/libksupport/ad9154.rs rename to artiq/firmware/libksupport/ad9154.rs diff --git a/artiq/runtime.rs/libksupport/api.rs b/artiq/firmware/libksupport/api.rs similarity index 100% rename from artiq/runtime.rs/libksupport/api.rs rename to artiq/firmware/libksupport/api.rs diff --git a/artiq/runtime.rs/libksupport/dyld.rs b/artiq/firmware/libksupport/dyld.rs similarity index 100% rename from artiq/runtime.rs/libksupport/dyld.rs rename to artiq/firmware/libksupport/dyld.rs diff --git a/artiq/runtime.rs/libksupport/i2c.rs b/artiq/firmware/libksupport/i2c.rs similarity index 100% rename from artiq/runtime.rs/libksupport/i2c.rs rename to artiq/firmware/libksupport/i2c.rs diff --git a/artiq/runtime.rs/libksupport/lib.rs b/artiq/firmware/libksupport/lib.rs similarity index 97% rename from artiq/runtime.rs/libksupport/lib.rs rename to artiq/firmware/libksupport/lib.rs index 1843e3c31..79c3ed82d 100644 --- a/artiq/runtime.rs/libksupport/lib.rs +++ b/artiq/firmware/libksupport/lib.rs @@ -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"] diff --git a/artiq/runtime.rs/libksupport/rtio.rs b/artiq/firmware/libksupport/rtio.rs similarity index 99% rename from artiq/runtime.rs/libksupport/rtio.rs rename to artiq/firmware/libksupport/rtio.rs index fb49cef31..b7e8cafd0 100644 --- a/artiq/runtime.rs/libksupport/rtio.rs +++ b/artiq/firmware/libksupport/rtio.rs @@ -1,4 +1,4 @@ -#[path = "../src/kernel_proto.rs"] +#[path = "../runtime/kernel_proto.rs"] mod kernel_proto; use board::csr; diff --git a/artiq/runtime.rs/liblwip-sys/Cargo.toml b/artiq/firmware/liblwip-sys/Cargo.toml similarity index 100% rename from artiq/runtime.rs/liblwip-sys/Cargo.toml rename to artiq/firmware/liblwip-sys/Cargo.toml diff --git a/artiq/runtime.rs/liblwip-sys/lib.rs b/artiq/firmware/liblwip-sys/lib.rs similarity index 100% rename from artiq/runtime.rs/liblwip-sys/lib.rs rename to artiq/firmware/liblwip-sys/lib.rs diff --git a/artiq/runtime.rs/liblwip/Cargo.toml b/artiq/firmware/liblwip/Cargo.toml similarity index 100% rename from artiq/runtime.rs/liblwip/Cargo.toml rename to artiq/firmware/liblwip/Cargo.toml diff --git a/artiq/runtime.rs/liblwip/lib.rs b/artiq/firmware/liblwip/lib.rs similarity index 100% rename from artiq/runtime.rs/liblwip/lib.rs rename to artiq/firmware/liblwip/lib.rs diff --git a/artiq/runtime.rs/libstd_artiq/Cargo.toml b/artiq/firmware/libstd_artiq/Cargo.toml similarity index 100% rename from artiq/runtime.rs/libstd_artiq/Cargo.toml rename to artiq/firmware/libstd_artiq/Cargo.toml diff --git a/artiq/runtime.rs/libstd_artiq/error.rs b/artiq/firmware/libstd_artiq/error.rs similarity index 100% rename from artiq/runtime.rs/libstd_artiq/error.rs rename to artiq/firmware/libstd_artiq/error.rs diff --git a/artiq/runtime.rs/libstd_artiq/io/buffered.rs b/artiq/firmware/libstd_artiq/io/buffered.rs similarity index 100% rename from artiq/runtime.rs/libstd_artiq/io/buffered.rs rename to artiq/firmware/libstd_artiq/io/buffered.rs diff --git a/artiq/runtime.rs/libstd_artiq/io/cursor.rs b/artiq/firmware/libstd_artiq/io/cursor.rs similarity index 100% rename from artiq/runtime.rs/libstd_artiq/io/cursor.rs rename to artiq/firmware/libstd_artiq/io/cursor.rs diff --git a/artiq/runtime.rs/libstd_artiq/io/error.rs b/artiq/firmware/libstd_artiq/io/error.rs similarity index 100% rename from artiq/runtime.rs/libstd_artiq/io/error.rs rename to artiq/firmware/libstd_artiq/io/error.rs diff --git a/artiq/runtime.rs/libstd_artiq/io/impls.rs b/artiq/firmware/libstd_artiq/io/impls.rs similarity index 100% rename from artiq/runtime.rs/libstd_artiq/io/impls.rs rename to artiq/firmware/libstd_artiq/io/impls.rs diff --git a/artiq/runtime.rs/libstd_artiq/io/memchr.rs b/artiq/firmware/libstd_artiq/io/memchr.rs similarity index 100% rename from artiq/runtime.rs/libstd_artiq/io/memchr.rs rename to artiq/firmware/libstd_artiq/io/memchr.rs diff --git a/artiq/runtime.rs/libstd_artiq/io/mod.rs b/artiq/firmware/libstd_artiq/io/mod.rs similarity index 100% rename from artiq/runtime.rs/libstd_artiq/io/mod.rs rename to artiq/firmware/libstd_artiq/io/mod.rs diff --git a/artiq/runtime.rs/libstd_artiq/io/prelude.rs b/artiq/firmware/libstd_artiq/io/prelude.rs similarity index 100% rename from artiq/runtime.rs/libstd_artiq/io/prelude.rs rename to artiq/firmware/libstd_artiq/io/prelude.rs diff --git a/artiq/runtime.rs/libstd_artiq/io/util.rs b/artiq/firmware/libstd_artiq/io/util.rs similarity index 100% rename from artiq/runtime.rs/libstd_artiq/io/util.rs rename to artiq/firmware/libstd_artiq/io/util.rs diff --git a/artiq/runtime.rs/libstd_artiq/lib.rs b/artiq/firmware/libstd_artiq/lib.rs similarity index 100% rename from artiq/runtime.rs/libstd_artiq/lib.rs rename to artiq/firmware/libstd_artiq/lib.rs diff --git a/artiq/runtime.rs/Cargo.lock b/artiq/firmware/runtime/Cargo.lock similarity index 100% rename from artiq/runtime.rs/Cargo.lock rename to artiq/firmware/runtime/Cargo.lock diff --git a/artiq/runtime.rs/Cargo.toml b/artiq/firmware/runtime/Cargo.toml similarity index 72% rename from artiq/runtime.rs/Cargo.toml rename to artiq/firmware/runtime/Cargo.toml index 5a459d204..e67cd848a 100644 --- a/artiq/runtime.rs/Cargo.toml +++ b/artiq/firmware/runtime/Cargo.toml @@ -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" } diff --git a/artiq/runtime.rs/src/analyzer.rs b/artiq/firmware/runtime/analyzer.rs similarity index 100% rename from artiq/runtime.rs/src/analyzer.rs rename to artiq/firmware/runtime/analyzer.rs diff --git a/artiq/runtime.rs/src/analyzer_proto.rs b/artiq/firmware/runtime/analyzer_proto.rs similarity index 100% rename from artiq/runtime.rs/src/analyzer_proto.rs rename to artiq/firmware/runtime/analyzer_proto.rs diff --git a/artiq/runtime.rs/build.rs b/artiq/firmware/runtime/build.rs similarity index 90% rename from artiq/runtime.rs/build.rs rename to artiq/firmware/runtime/build.rs index 39403d146..36a05671d 100644 --- a/artiq/runtime.rs/build.rs +++ b/artiq/firmware/runtime/build.rs @@ -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()); } diff --git a/artiq/runtime.rs/src/cache.rs b/artiq/firmware/runtime/cache.rs similarity index 100% rename from artiq/runtime.rs/src/cache.rs rename to artiq/firmware/runtime/cache.rs diff --git a/artiq/runtime.rs/src/clock.rs b/artiq/firmware/runtime/clock.rs similarity index 100% rename from artiq/runtime.rs/src/clock.rs rename to artiq/firmware/runtime/clock.rs diff --git a/artiq/runtime.rs/src/config.rs b/artiq/firmware/runtime/config.rs similarity index 100% rename from artiq/runtime.rs/src/config.rs rename to artiq/firmware/runtime/config.rs diff --git a/artiq/runtime.rs/src/kernel.rs b/artiq/firmware/runtime/kernel.rs similarity index 100% rename from artiq/runtime.rs/src/kernel.rs rename to artiq/firmware/runtime/kernel.rs diff --git a/artiq/runtime.rs/src/kernel_proto.rs b/artiq/firmware/runtime/kernel_proto.rs similarity index 100% rename from artiq/runtime.rs/src/kernel_proto.rs rename to artiq/firmware/runtime/kernel_proto.rs diff --git a/artiq/runtime.rs/src/lib.rs b/artiq/firmware/runtime/lib.rs similarity index 99% rename from artiq/runtime.rs/src/lib.rs rename to artiq/firmware/runtime/lib.rs index cfc623de8..8d4506721 100644 --- a/artiq/runtime.rs/src/lib.rs +++ b/artiq/firmware/runtime/lib.rs @@ -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; diff --git a/artiq/runtime.rs/src/logger.rs b/artiq/firmware/runtime/logger.rs similarity index 100% rename from artiq/runtime.rs/src/logger.rs rename to artiq/firmware/runtime/logger.rs diff --git a/artiq/runtime.rs/src/mailbox.rs b/artiq/firmware/runtime/mailbox.rs similarity index 100% rename from artiq/runtime.rs/src/mailbox.rs rename to artiq/firmware/runtime/mailbox.rs diff --git a/artiq/runtime.rs/src/moninj.rs b/artiq/firmware/runtime/moninj.rs similarity index 100% rename from artiq/runtime.rs/src/moninj.rs rename to artiq/firmware/runtime/moninj.rs diff --git a/artiq/runtime.rs/src/moninj_proto.rs b/artiq/firmware/runtime/moninj_proto.rs similarity index 100% rename from artiq/runtime.rs/src/moninj_proto.rs rename to artiq/firmware/runtime/moninj_proto.rs diff --git a/artiq/runtime.rs/src/proto.rs b/artiq/firmware/runtime/proto.rs similarity index 100% rename from artiq/runtime.rs/src/proto.rs rename to artiq/firmware/runtime/proto.rs diff --git a/artiq/runtime.rs/src/rpc_proto.rs b/artiq/firmware/runtime/rpc_proto.rs similarity index 100% rename from artiq/runtime.rs/src/rpc_proto.rs rename to artiq/firmware/runtime/rpc_proto.rs diff --git a/artiq/runtime.rs/src/rpc_queue.rs b/artiq/firmware/runtime/rpc_queue.rs similarity index 100% rename from artiq/runtime.rs/src/rpc_queue.rs rename to artiq/firmware/runtime/rpc_queue.rs diff --git a/artiq/runtime.rs/src/rtio_mgt.rs b/artiq/firmware/runtime/rtio_mgt.rs similarity index 100% rename from artiq/runtime.rs/src/rtio_mgt.rs rename to artiq/firmware/runtime/rtio_mgt.rs diff --git a/artiq/runtime.rs/src/sched.rs b/artiq/firmware/runtime/sched.rs similarity index 100% rename from artiq/runtime.rs/src/sched.rs rename to artiq/firmware/runtime/sched.rs diff --git a/artiq/runtime.rs/src/session.rs b/artiq/firmware/runtime/session.rs similarity index 100% rename from artiq/runtime.rs/src/session.rs rename to artiq/firmware/runtime/session.rs diff --git a/artiq/runtime.rs/src/session_proto.rs b/artiq/firmware/runtime/session_proto.rs similarity index 100% rename from artiq/runtime.rs/src/session_proto.rs rename to artiq/firmware/runtime/session_proto.rs diff --git a/artiq/runtime.rs/src/urc.rs b/artiq/firmware/runtime/urc.rs similarity index 100% rename from artiq/runtime.rs/src/urc.rs rename to artiq/firmware/runtime/urc.rs diff --git a/artiq/runtime/Makefile b/artiq/runtime/Makefile index a8387466b..a19738e8d 100644 --- a/artiq/runtime/Makefile +++ b/artiq/runtime/Makefile @@ -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 \