make config demo errors non-fatal
This commit is contained in:
parent
654d65a6d5
commit
507edb5a78
@ -6,7 +6,7 @@
|
||||
extern crate alloc;
|
||||
|
||||
use core::{cmp, str};
|
||||
use log::info;
|
||||
use log::{info, error};
|
||||
|
||||
use libboard_zynq::{timer::GlobalTimer, logger, devc};
|
||||
use libsupport_zynq::ram;
|
||||
@ -46,7 +46,8 @@ pub fn main_core0() {
|
||||
|
||||
ram::init_alloc_linker();
|
||||
|
||||
let mut cfg = config::Config::new().unwrap();
|
||||
match config::Config::new() {
|
||||
Ok(mut cfg) => {
|
||||
match cfg.read_str("FOO") {
|
||||
Ok(val) => info!("FOO = {}", val),
|
||||
Err(error) => info!("failed to read config FOO: {}", error),
|
||||
@ -59,6 +60,9 @@ pub fn main_core0() {
|
||||
Ok(val) => info!("read FOOBAR = {}", val),
|
||||
Err(error) => info!("failed to read config FOOBAR: {}", error),
|
||||
}
|
||||
},
|
||||
Err(error) => error!("config failed: {}", error)
|
||||
}
|
||||
|
||||
if devc::DevC::new().is_done() {
|
||||
info!("gateware already loaded");
|
||||
|
Loading…
Reference in New Issue
Block a user