soft_panic: print the reason

This commit is contained in:
mwojcik 2022-09-01 12:02:44 +08:00
parent 0e6bf61034
commit 3d6b80b94d
2 changed files with 3 additions and 3 deletions

View File

@ -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);
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")]
{
let mut err_led = ErrorLED::error_led();

View File

@ -124,6 +124,6 @@ pub fn main_core0() {
match rtio_clocking::init(&mut timer, &cfg) {
Ok(()) => { comms::main(timer, cfg); }
Err(_) => { comms::soft_panic_setup(timer, cfg)}
Err(reason) => { comms::soft_panic_setup(timer, cfg, reason); }
};
}