[arch|board]/risc-v: Allow BSS segments on PSRAM for ESP32-P4#18874
Merged
Conversation
This commits enables moving BSS data segments to the external PSRAM on ESP32-P4. This is controlled by a Kconfig option. Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
xiaoxiang781216
approved these changes
May 13, 2026
fdcavalcanti
approved these changes
May 13, 2026
eren-terzioglu
approved these changes
May 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Impact
Impact on user: No.
Impact on build: Yes. Allows .bss specific segments to the external PSRAM.
Impact on hardware: No.
Impact on documentation: No.
Impact on security: No.
Impact on compatibility: No.
Testing
We need to force a specific segment to check if it's being properly moved to the external PSRAM.
ext_ram.bss.*segments are located at the external PSRAM. To test it, it's possible to enable theFS_HEAPSIZEand setFS_HEAPBUF_SECTION=".ext_ram.bss.buf". Considering theesp32p4-function-ev-board:psram_usrheapdefconfig as a starting point:Building
Running
Check
freeto ensure that the fs_heap has 2MiB and user heap is less than the expected 32MiB - 2MiB (the difference is now part of the fs heap).Also, check NuttX's
nuttx.mapto check if.ext_ram.bss.bufis properly assigned to the external RAM.Results
freenuttx.map