soft_panic: print the reason
This commit is contained in:
parent
0e6bf61034
commit
3d6b80b94d
|
@ -494,11 +494,11 @@ pub fn main(timer: GlobalTimer, cfg: Config) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pub fn soft_panic_setup(timer: GlobalTimer, cfg: Config) {
|
pub fn soft_panic_setup(timer: GlobalTimer, cfg: Config, reason: &'static str) {
|
||||||
let net_addresses = net_settings::get_addresses(&cfg);
|
let net_addresses = net_settings::get_addresses(&cfg);
|
||||||
info!("network addresses: {}", net_addresses);
|
info!("network addresses: {}", net_addresses);
|
||||||
|
|
||||||
error!("There has been an error configuring the device. Only mgmt interface will be available.");
|
error!("There has been an error configuring the device: {}. Only mgmt interface will be available.", reason);
|
||||||
#[cfg(feature = "target_kasli_soc")]
|
#[cfg(feature = "target_kasli_soc")]
|
||||||
{
|
{
|
||||||
let mut err_led = ErrorLED::error_led();
|
let mut err_led = ErrorLED::error_led();
|
||||||
|
|
|
@ -124,6 +124,6 @@ pub fn main_core0() {
|
||||||
|
|
||||||
match rtio_clocking::init(&mut timer, &cfg) {
|
match rtio_clocking::init(&mut timer, &cfg) {
|
||||||
Ok(()) => { comms::main(timer, cfg); }
|
Ok(()) => { comms::main(timer, cfg); }
|
||||||
Err(_) => { comms::soft_panic_setup(timer, cfg)}
|
Err(reason) => { comms::soft_panic_setup(timer, cfg, reason); }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue