psram_allocator macro resulting in panic on ESP32-S3
Posted: Fri Dec 19, 2025 9:21 pm
I have enabled psram in Cargo.toml:
Dutifully following the instructions at https://docs.espressif.com/projects/rus ... index.html, I have put:
in my code. This results in a panic. I tracked down the source of the panic to this line within the aforementioned macro:
I have also tried to configure:
to no avail.
Curiously, I see the following output after I run:
Could this be related to my problem? I have replicated this on 3 different ESP32-S3 boards from 3 different manufacturers.
Thank you for your time.
Code: Select all
esp-hal = { version = "1.0.0", features = ["defmt", "esp32s3", "unstable", "psram"] Code: Select all
esp_alloc::psram_allocator!(&peripherals.PSRAM, esp_hal::psram);Code: Select all
let (start, size) = _psram::psram_raw_parts(&$peripheral);Code: Select all
CONFIG_SPIRAM_MODE_OCT=yCuriously, I see the following output after I run:
Code: Select all
cargo run --releaseCode: Select all
[INFO ] chip id = ffffff (esp_hal src/psram/esp32s3.rs:218)
[INFO ] size is 0 (esp_hal src/psram/esp32s3.rs:241)
[INFO ] PSRAM core_clock SpiTimingConfigCoreClock80m, flash_div = 1, psram_div = 2 (esp_hal src/psram/esp32s3.rs:385)Thank you for your time.