1
0
Fork 0

debug msgs, to be removed

This commit is contained in:
Simon Renblad 2024-10-09 17:11:30 +08:00
parent 579ae79ea3
commit ddbeef1284
1 changed files with 7 additions and 2 deletions

View File

@ -7,6 +7,7 @@ extern crate log;
mod netboot; mod netboot;
use alloc::rc::Rc; use alloc::rc::Rc;
use libboard_zynq::sdio::sd_card::CardInitializationError;
use core::mem; use core::mem;
use core::ptr::{addr_of_mut, addr_of}; use core::ptr::{addr_of_mut, addr_of};
use libboard_zynq::{ use libboard_zynq::{
@ -78,7 +79,7 @@ pub fn main_core0() {
(C) 2020-2022 M-Labs (C) 2020-2022 M-Labs
"# "#
); );
info!("Simple Zynq Loader starting..."); info!("Modified Simple Zynq Loader starting...");
#[cfg(not(any(feature = "target_kasli_soc", feature = "target_ebaz4205")))] #[cfg(not(any(feature = "target_kasli_soc", feature = "target_ebaz4205")))]
const CPU_FREQ: u32 = 800_000_000; const CPU_FREQ: u32 = 800_000_000;
@ -99,7 +100,11 @@ pub fn main_core0() {
let sdio0 = sdio::Sdio::sdio0(true); let sdio0 = sdio::Sdio::sdio0(true);
let fs = if sdio0.is_card_inserted() { let fs = if sdio0.is_card_inserted() {
info!("Card inserted. Mounting file system."); info!("Card inserted. Mounting file system.");
let sd = sdio::sd_card::SdCard::from_sdio(sdio0).unwrap(); let sd = match sdio::sd_card::SdCard::from_sdio(sdio0) {
Ok(sd) => sd,
Err(_) => { debug!("failed to get sd card"); panic!() }
}
debug!("got sd card");
let reader = sd_reader::SdReader::new(sd); let reader = sd_reader::SdReader::new(sd);
reader reader
.mount_fatfs(sd_reader::PartitionEntry::Entry1) .mount_fatfs(sd_reader::PartitionEntry::Entry1)