mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
fix initialization bug in statics
this unstucks the console when USB comes up.
This commit is contained in:
parent
a6769c46ba
commit
c1544ca5e7
2 changed files with 4 additions and 1 deletions
|
|
@ -56,6 +56,7 @@ pub unsafe extern "C" fn rust_entry() -> ! {
|
|||
let mut board_type =
|
||||
one_way.get_decoded::<bao1x_api::BoardTypeCoding>().expect("Board type coding error");
|
||||
|
||||
crate::println_d!("TX_IDLE: {:?}", crate::platform::usb::TX_IDLE.load(Ordering::SeqCst));
|
||||
board_type = crate::platform::early_init(board_type);
|
||||
crate::println!("\n~~Boot1 up!~~\n");
|
||||
|
||||
|
|
|
|||
|
|
@ -198,7 +198,9 @@ pub fn early_init(mut board_type: bao1x_api::BoardTypeCoding) -> bao1x_api::Boar
|
|||
data_ptr.add(i).write_volatile(0);
|
||||
}
|
||||
for &(offset, data) in &statics_in_rom.poke_table[..statics_in_rom.valid_pokes as usize] {
|
||||
data_ptr.add(offset as usize).write_volatile(data);
|
||||
let offset = u16::from_le_bytes(offset) as usize;
|
||||
let data = u32::from_le_bytes(data);
|
||||
data_ptr.add(offset / size_of::<u32>()).write_volatile(data);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue