From e90a19d3a2c414f31c3bb8df7818591856b1e0de Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Thu, 5 Dec 2024 18:04:26 -0600 Subject: [PATCH] z --- .cargo/config.toml | 7 ++++--- Cargo.lock | 49 ++++++++++++++++++++++++++++++++++++++++++++++ Cargo.toml | 1 + src/main.rs | 2 +- 4 files changed, 55 insertions(+), 4 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 7455ae8..f90a77b 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -3,8 +3,8 @@ target = "riscv64gc-unknown-none-elf" [target.riscv64gc-unknown-none-elf] rustflags = [ - "--print", - "link-args", + # Turn this on to see the linker args + # "--print", "link-args", "-C", "link-arg=--script", "-C", @@ -12,4 +12,5 @@ rustflags = [ ] [term] -verbose = true +# Turn this on to see detailed information about compile commands +# verbose = true diff --git a/Cargo.lock b/Cargo.lock index 0dd1539..63e2d9d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,55 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "contracts" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1d1429e3bd78171c65aa010eabcdf8f863ba3254728dbfb0ad4b1545beac15c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "kernel" version = "0.1.0" +dependencies = [ + "contracts", +] + +[[package]] +name = "proc-macro2" +version = "1.0.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "unicode-ident" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" diff --git a/Cargo.toml b/Cargo.toml index 4b648f0..76d55ef 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,3 +10,4 @@ panic = "abort" panic = "abort" [dependencies] +contracts = "0.6.3" diff --git a/src/main.rs b/src/main.rs index 24b1100..5da22a2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,7 +11,7 @@ fn panic_handler(_: &PanicInfo) -> ! { } const UART0: usize = 0x10000000; -static HELLO: &[u8] = b"Hello World!\n"; +static HELLO: &[u8] = b"meow\n"; #[no_mangle] pub unsafe extern "C" fn start() -> ! {