feat(esp32s3): add PSRAM support - #5554
Conversation
Add runtime initialization, MMU layout, linker script mappings, and targets for ESP32-S3 Quad and Octal PSRAM.
141f8e7 to
c163bd8
Compare
8d9dea3 to
39c1a4c
Compare
|
I am removing QSPI support for now. The boards I got also have PSRAM connected via Octo-SPI. Apparently all ESP32-S3 boards with 8M PSRAM use OctoSPI. OctoSPI is verified on 2 different ESP32-S3 boards now. |
39c1a4c to
dad7399
Compare
|
works fine with XIAO ESP32S3 |
|
@deadprogram I believe this is ready |
|
#5567 changes how ESP32-S3 IROM/DROM are placed in flash and mapped through the MMU, in order to support larger flash images. This PR also changes the ESP32-S3 MMU and linker layout for PSRAM, and as far as I can tell it still assumes the current flash mapping (see Since both touch the same memory-layout area, @deadprogram would it make sense to settle #5567 first, and then review this one against the resulting layout? Happy to help with the rebase either way. @digitalentity does that match your reading, or do you think the two are independent enough to review separately? |
|
I tested #5554 with the same large-DROM reproduction case used for #5567. It still fails in the ROM bootloader before TinyGo startup is reached: So #5554 does not appear to fix the large image boot issue. #5567 still seems to be needed to change how the IROM/DROM segments are laid out in the ESP image. |
|
@rdon-key how do you test? Is it sufficient to put 1M data into the DROM to make it fail? I suspect it's merely the image layout issue. The #5567 is still needed to fix it, but I'm wondering if changes to the linker script and the image builder would be sufficient. I'll try blending our changes together and see what happens. |
|
@digitalentity I haven't tested the exact minimum failing size separately. It appears to be around 1 MiB. If you're testing it, I'd also try a case near the flash limit. |
PSRAM support for ESP32-S3. Enabled via
numa_psram_qspiandnuma_psram_octalbuild tags.Test on QSPI board with:
./build/tinygo flash -size=short -serial=uart -target=esp32s3-psram-qspi -monitor -panic=trap examples/psramTest on OPI board with:
./build/tinygo flash -size=short -serial=uart -target=esp32s3-psram-octal -monitor -panic=trap examples/psram, should be getting something like this:Partly fixes #3772