diff options
author | Christian Cunningham <cc@localhost> | 2022-08-20 13:09:05 -0700 |
---|---|---|
committer | Christian Cunningham <cc@localhost> | 2022-08-20 13:09:05 -0700 |
commit | bbbde8fd0dca7d0248da04dae12221ed1043afd4 (patch) | |
tree | aca2bfcb0cbc643bf84f1091f42b30620fefc47d | |
parent | 017de6704afd94d8681ecceab5397f6e3de1e466 (diff) |
Output Initialization info
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | src/kernel.rs | 5 |
2 files changed, 6 insertions, 3 deletions
@@ -29,10 +29,10 @@ doc: @RUSTFLAGS="$(RUSTFLAGS_PEDANTIC)" cargo doc $(COMPILER_ARGS) clean: - rm -rf target + -@rm -rf target run: build - qemu-system-arm -cpu cortex-a7 -m 1G -kernel target/armv7a-none-eabi/release/kernel -machine raspi2b -serial mon:stdio -nographic + @qemu-system-arm -cpu cortex-a7 -m 1G -kernel target/armv7a-none-eabi/release/kernel -machine raspi2b -serial mon:stdio -nographic init: rustup target install $(TARGET) diff --git a/src/kernel.rs b/src/kernel.rs index c25e148..e0cd343 100644 --- a/src/kernel.rs +++ b/src/kernel.rs @@ -27,6 +27,7 @@ mod print; mod sync; mod uart; use crate::console::console; +use crate::console::interface::Statistics; use crate::mem::alloc::*; /// # Initialization Code @@ -47,11 +48,13 @@ unsafe fn kernel_init() -> ! { /// /// TODO: Figure out what to do here fn kernel_main() -> ! { - println!("I should be able to print {} here!", 5); + println!("Initialized \x1b[92m{}\x1b[0m \x1b[93m{}\x1b[0m!", env!("CARGO_PKG_NAME"), env!("CARGO_PKG_VERSION")); + println!("Testing out allocations!"); { let a: Box<u8> = Box::new(u8::MAX); let b: Box<u8> = Box::new(5); println!("{:?} {:?}", a, b); } + println!("Characters written to UART: {}", console().chars_written()); loop { } } |