improve error messages

This commit is contained in:
bunnie 2025-10-26 19:30:18 +08:00
parent 72e8c1a6fa
commit 2f957d3f35
3 changed files with 3 additions and 3 deletions

View file

@ -3,4 +3,4 @@ pub use bao1x::*;
pub mod debug;
pub mod irq;
pub const UART_BAUD: u32 = 1_000_000;
pub const UART_BAUD: u32 = bao1x_api::UART_BAUD;

View file

@ -7,4 +7,4 @@ pub mod slots;
pub mod trng;
pub mod usb;
pub const UART_BAUD: u32 = 1_000_000;
pub const UART_BAUD: u32 = bao1x_api::UART_BAUD;

View file

@ -334,7 +334,7 @@ impl Repl {
const COLUMNS: usize = 4;
if args.len() == 1 || args.len() == 2 {
let addr = usize::from_str_radix(&args[0], 16)
.map_err(|_| Error::help("Peek address is in hex"))?;
.map_err(|_| Error::help("Peek address is in hex, no leading 0x"))?;
if addr >= utralib::HW_RERAM_MEM + bao1x_api::RRAM_STORAGE_LEN
&& addr < utralib::HW_RERAM_MEM + utralib::HW_RERAM_MEM_LEN