From e1c07cbf0b7608ee383f00f0de81a0ff06e9da45 Mon Sep 17 00:00:00 2001 From: bunnie Date: Tue, 21 Oct 2025 04:16:45 +0800 Subject: [PATCH] cleanup some debug output & fix ref link --- bao1x-boot/boot1/Cargo.toml | 2 +- bao1x-boot/boot1/src/platform/bao1x/usb/glue.rs | 2 ++ bao1x-boot/boot1/src/platform/bao1x/usb/handlers.rs | 4 +++- baremetal/src/repl.rs | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/bao1x-boot/boot1/Cargo.toml b/bao1x-boot/boot1/Cargo.toml index 5c93b7dbc..7f0a48683 100644 --- a/bao1x-boot/boot1/Cargo.toml +++ b/bao1x-boot/boot1/Cargo.toml @@ -34,7 +34,7 @@ bao1x = [ "utralib/bao1x", "linked_list_allocator", "bao1x-hal/loader-baosec", - "bao1x-hal/debug-print-duart", + # "bao1x-hal/debug-print-duart", "bao1x-api", # needed for the boot logo "ux-api/loader-baosec", diff --git a/bao1x-boot/boot1/src/platform/bao1x/usb/glue.rs b/bao1x-boot/boot1/src/platform/bao1x/usb/glue.rs index 6ae8e08e9..f4f154e19 100644 --- a/bao1x-boot/boot1/src/platform/bao1x/usb/glue.rs +++ b/bao1x-boot/boot1/src/platform/bao1x/usb/glue.rs @@ -186,11 +186,13 @@ impl Uf2Sector { /// Takes in a slice of incoming data, and a notional "disk address" into which it should be writing pub fn extend_from_slice(&mut self, address: usize, slice: &[u8]) -> (Option, Option) { if address != self.address + self.progress { + /* crate::println!( "Resetting sector address tracker, expected {:x} got {:x}", self.address + self.progress, address ); + */ self.address = address % 512; } diff --git a/bao1x-boot/boot1/src/platform/bao1x/usb/handlers.rs b/bao1x-boot/boot1/src/platform/bao1x/usb/handlers.rs index b987a3028..f5f00f4e9 100644 --- a/bao1x-boot/boot1/src/platform/bao1x/usb/handlers.rs +++ b/bao1x-boot/boot1/src/platform/bao1x/usb/handlers.rs @@ -437,7 +437,9 @@ pub fn flush_tx(this: &mut CorigineUsb) { { timeout += 1; if timeout % 20_000 == 0 { - crate::println!("txw {}", timeout); + // suppress this unless actively debugging because this can pollute the + // tx queue with data and eventually cause an overflow + // crate::println!("txw {}", timeout); } } diff --git a/baremetal/src/repl.rs b/baremetal/src/repl.rs index 870db1837..6bba5124c 100644 --- a/baremetal/src/repl.rs +++ b/baremetal/src/repl.rs @@ -1010,7 +1010,7 @@ impl Repl { crate::dabao_selftest::dabao_selftest(); } "actest" => { - let slot_man = bao1x_hal::protected_rram::SlotManager::new(); + let slot_man = bao1x_hal::acram::SlotManager::new(); crate::println!( "Slot 0(d): {:x?}", slot_man.read(&bao1x_api::offsets::SlotIndex::Data(