diff --git a/Cargo.lock b/Cargo.lock index e99c7b09..d552949c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -45,9 +45,6 @@ checksum = "0f8cb7306107e4b10e64994de6d3274bd08996a7c1322a27b86482392f96be0a" [[package]] name = "dyld" version = "0.1.0" -dependencies = [ - "libboard_zynq", -] [[package]] name = "libasync" @@ -185,6 +182,7 @@ dependencies = [ "libboard_zynq", "libcortex_a9", "libsupport_zynq", + "log", "num-derive", "num-traits", ] diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 04f5e514..1b062660 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -13,6 +13,7 @@ default = ["target_zc706"] num-traits = { version = "0.2", default-features = false } num-derive = "0.3" cslice = "0.3" +log = "0.4" libboard_zynq = { git = "https://git.m-labs.hk/M-Labs/zc706.git" } libsupport_zynq = { git = "https://git.m-labs.hk/M-Labs/zc706.git" } libcortex_a9 = { git = "https://git.m-labs.hk/M-Labs/zc706.git" } diff --git a/runtime/src/main.rs b/runtime/src/main.rs index 773b3612..835c326a 100644 --- a/runtime/src/main.rs +++ b/runtime/src/main.rs @@ -2,6 +2,7 @@ #![no_main] extern crate alloc; +extern crate log; use core::{cmp, str}; @@ -9,7 +10,7 @@ use libboard_zynq::{ println, self as zynq, clocks::Clocks, clocks::source::{ClockSource, ArmPll, IoPll}, }; -use libsupport_zynq::ram; +use libsupport_zynq::{logger, ram}; mod comms; mod pl; @@ -33,6 +34,8 @@ fn identifier_read(buf: &mut [u8]) -> &str { #[no_mangle] pub fn main_core0() { println!("ARTIQ runtime starting..."); + let _ = logger::init(); + log::set_max_level(log::LevelFilter::Debug); const CPU_FREQ: u32 = 800_000_000;