diff --git a/loader/src/platform/cramium/cramium.rs b/loader/src/platform/cramium/cramium.rs index e93f910b0..482fc9b73 100644 --- a/loader/src/platform/cramium/cramium.rs +++ b/loader/src/platform/cramium/cramium.rs @@ -178,7 +178,7 @@ pub fn early_init() { // the address of the UART buffer is "hard-allocated" at an offset one page from the top of // IFRAM0. This is a convention that must be respected by the UDMA UART library implementation // for things to work. - let uart_buf_addr = UART_IFRAM_ADDR; + let uart_buf_addr = loader::UART_IFRAM_ADDR; let mut udma_uart = unsafe { // safety: this is safe to call, because we set up clock and events prior to calling new. udma::Uart::get_handle(utra::udma_uart_1::HW_UDMA_UART_1_BASE, uart_buf_addr, uart_buf_addr) diff --git a/loader/src/swap.rs b/loader/src/swap.rs index e8a4a99f0..8b8314480 100644 --- a/loader/src/swap.rs +++ b/loader/src/swap.rs @@ -69,17 +69,10 @@ pub struct SwapSpec { pub mac_len: u32, } -// Locate the hard-wired IFRAM allocations for UDMA -#[allow(dead_code)] -#[cfg(feature = "cramium-soc")] -pub const UART_IFRAM_ADDR: usize = utralib::HW_IFRAM0_MEM + utralib::HW_IFRAM0_MEM_LEN - 4096; // RAM needs two buffers of 1k + 16 bytes = 2048 + 16 = 2064 bytes; round up to one page #[allow(dead_code)] #[cfg(feature = "cramium-soc")] pub const SPIM_RAM_IFRAM_ADDR: usize = utralib::HW_IFRAM0_MEM + utralib::HW_IFRAM0_MEM_LEN - 2 * 4096; -#[allow(dead_code)] -#[cfg(feature = "cramium-soc")] -pub const APP_UART_IFRAM_ADDR: usize = utralib::HW_IFRAM0_MEM + utralib::HW_IFRAM0_MEM_LEN - 3 * 4096; // Flash will be released after the loader is done: it's only accessed to copy the IniS sectors into swap, // then abandoned. It needs 4096 bytes for Rx, and 0 bytes for Tx + 16 bytes for cmd. #[allow(dead_code)]