feat(psram): add psram noinit segment support on S2/S3/P4/C5

Closes https://github.com/espressif/esp-idf/issues/14253
This commit is contained in:
Chen Jichang
2024-09-03 11:50:40 +08:00
parent 87c9fb8d40
commit 9e3fca8d71
16 changed files with 98 additions and 24 deletions

View File

@@ -123,16 +123,14 @@ This option reduces the internal static memory used by the BSS segment.
Remaining external RAM can also be added to the capability heap allocator using the method shown above.
.. only:: esp32
.. _external_ram_config_noinit:
.. _external_ram_config_noinit:
Allow .noinit Segment to Be Placed in External Memory
--------------------------------------------------------------
Allow .noinit Segment to Be Placed in External Memory
--------------------------------------------------------------
Enable this option by checking :ref:`CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY`. If enabled, the region of the data virtual address space where the PSRAM is mapped to will be used to store non-initialized data. The values placed in this segment will not be initialized or modified even during startup or restart.
Enable this option by checking :ref:`CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY`. If enabled, the region of the data virtual address space where the PSRAM is mapped to will be used to store non-initialized data. The values placed in this segment will not be initialized or modified even during startup or restart.
By applying the macro ``EXT_RAM_NOINIT_ATTR``, data could be moved from the internal NOINIT segment to external RAM. Remaining external RAM can still be added to the capability heap allocator using the method shown above, :ref:`external_ram_config_capability_allocator`.
By applying the macro ``EXT_RAM_NOINIT_ATTR``, data could be moved from the internal NOINIT segment to external RAM. Remaining external RAM can still be added to the capability heap allocator using the method shown above, :ref:`external_ram_config_capability_allocator`.
.. only:: SOC_SPIRAM_XIP_SUPPORTED