Skip to content

Commit 646866a

Browse files
committed
esp32p4: use only up to bank 3
Banks 4 and 5 appear to be unavailable when booting fresh out of the stage 1 bootloader. Signed-off-by: Sean Cross <sean@xobs.io>
1 parent 0f3cbdd commit 646866a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

ld/esp32p4.x

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ MEMORY {
55
}
66

77
PROVIDE ( esp_rom_spiflash_attach = spi_flash_attach );
8+
PROVIDE ( uart_tx_one_char = usb_serial_device_tx_one_char );
89

910
/*
1011
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
@@ -41,7 +42,7 @@ ets_update_cpu_frequency = 0x4fc00044;
4142
ets_install_lock = 0x4fc00048;
4243
UartRxString = 0x4fc0004c;
4344
UartGetCmdLn = 0x4fc00050;
44-
uart_tx_one_char = 0x4fc00054;
45+
/*uart_tx_one_char = 0x4fc00054;*/
4546
uart_tx_one_char2 = 0x4fc00058;
4647
uart_tx_one_char3 = 0x4fc0005c;
4748
uart_rx_one_char = 0x4fc00060;

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const _: [u8; 43776] = [0; core::mem::size_of::<Decompressor>()];
3333
// ESP32-C6 | 0x4081_0000 | 0x4081_0000 | 0x4084_0000 | 0x4085_0000 | 0x4086_0000
3434
// ESP32-C61 | 0x4081_0000 | 0x4081_0000 | 0x4082_0000 | 0x4083_0000 | 0x4083_8000 !! ROM data use starts at 0x4083EA70, so let's use H2's memory layout
3535
// ESP32-H2 | 0x4081_0000 | 0x4081_0000 | 0x4082_0000 | 0x4083_0000 | 0x4083_8000 !! has smaller RAM, only reserve 32K for data
36-
// ESP32-P4 | 0x4FF1_0000 | 0x4FF1_0000 | 0x4FFA_0000 | 0x4FFB_0000 | 0x4FFC_0000
36+
// ESP32-P4 | 0x4FF1_0000 | 0x4FF1_0000 | 0x4FF6_0000 | 0x4FF7_0000 | 0x4FFC_0000
3737

3838
// "State" base address
3939
#[cfg(feature = "esp32")]
@@ -55,7 +55,7 @@ const STATE_ADDR: usize = 0x4082_0000;
5555
#[cfg(feature = "esp32h2")]
5656
const STATE_ADDR: usize = 0x4082_0000;
5757
#[cfg(feature = "esp32p4")]
58-
const STATE_ADDR: usize = 0x4FFA_0000;
58+
const STATE_ADDR: usize = 0x4FF6_0000;
5959

6060
// End of target memory configuration
6161

0 commit comments

Comments
 (0)