forked from espressif/esp-idf
docs(psram): sync psram noinit description
This commit is contained in:
@@ -46,7 +46,7 @@ ESP-IDF fully supports the use of external RAM in applications. Once the externa
|
||||
* :ref:`external_ram_config_capability_allocator`
|
||||
* :ref:`external_ram_config_malloc` (default)
|
||||
* :ref:`external_ram_config_bss`
|
||||
:esp32: * :ref:`external_ram_config_noinit`
|
||||
* :ref:`external_ram_config_noinit`
|
||||
:SOC_SPIRAM_XIP_SUPPORTED: * :ref:`external_ram_config_instructions`
|
||||
:SOC_SPIRAM_XIP_SUPPORTED: * :ref:`external_ram_config_rodata`
|
||||
|
||||
@@ -116,16 +116,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
|
||||
|
||||
|
@@ -42,7 +42,7 @@ Constant data may also be placed into DRAM, for example if it is used in an non-
|
||||
|
||||
The macro ``__NOINIT_ATTR`` can be used as attribute to place data into ``.noinit`` section. The values placed into this section will not be initialized at startup and should keep its value after software restart.
|
||||
|
||||
.. only:: esp32
|
||||
.. only:: SOC_SPIRAM_SUPPORTED
|
||||
|
||||
By applying the ``EXT_RAM_NOINIT_ATTR`` macro, non-initialized value could also be placed in external RAM. To do this, the :ref:`CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY` needs to be enabled. See :ref:`external_ram_config_noinit`. If the :ref:`CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY` is not enabled, ``EXT_RAM_NOINIT_ATTR`` will behave just as ``__NOINIT_ATTR``, it will make data to be placed into ``.noinit`` segment in internal RAM.
|
||||
|
||||
|
@@ -46,7 +46,7 @@ ESP-IDF 完全支持将片外 RAM 集成到你的应用程序中。在启动并
|
||||
* :ref:`external_ram_config_capability_allocator`
|
||||
* :ref:`external_ram_config_malloc` (default)
|
||||
* :ref:`external_ram_config_bss`
|
||||
:esp32: * :ref:`external_ram_config_noinit`
|
||||
* :ref:`external_ram_config_noinit`
|
||||
:SOC_SPIRAM_XIP_SUPPORTED: * :ref:`external_ram_config_instructions`
|
||||
:SOC_SPIRAM_XIP_SUPPORTED: * :ref:`external_ram_config_rodata`
|
||||
|
||||
@@ -116,16 +116,14 @@ ESP-IDF 启动过程中,片外 RAM 被映射到数据虚拟地址空间,该
|
||||
|
||||
剩余的片外 RAM 也可以通过上述方法添加到堆分配器中。
|
||||
|
||||
.. only:: esp32
|
||||
.. _external_ram_config_noinit:
|
||||
|
||||
.. _external_ram_config_noinit:
|
||||
允许 .noinit 段放入片外存储器
|
||||
-------------------------------------
|
||||
|
||||
允许 .noinit 段放入片外存储器
|
||||
-------------------------------------
|
||||
通过勾选 :ref:`CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY` 启用该选项。启用该选项后,PSRAM 被映射到的数据虚拟地址空间将用于存储未初始化的数据。即使在启动或重新启动期间,放置在该段中的值也不会被初始化或修改。
|
||||
|
||||
通过勾选 :ref:`CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY` 启用该选项。启用该选项后,PSRAM 被映射到的数据虚拟地址空间将用于存储未初始化的数据。即使在启动或重新启动期间,放置在该段中的值也不会被初始化或修改。
|
||||
|
||||
通过应用 ``EXT_RAM_NOINIT_ATTR`` 宏,可以将数据从内部 NOINIT 段移到片外 RAM。剩余的片外 RAM 也可以通过上述方法添加到堆分配器中,具体请参考 :ref:`external_ram_config_capability_allocator`。
|
||||
通过应用 ``EXT_RAM_NOINIT_ATTR`` 宏,可以将数据从内部 NOINIT 段移到片外 RAM。剩余的片外 RAM 也可以通过上述方法添加到堆分配器中,具体请参考 :ref:`external_ram_config_capability_allocator`。
|
||||
|
||||
.. only:: SOC_SPIRAM_XIP_SUPPORTED
|
||||
|
||||
|
@@ -42,7 +42,7 @@ DRAM(数据 RAM)
|
||||
|
||||
可以将 ``__NOINIT_ATTR`` 宏用作属性,从而将数据放入 ``.noinit`` 部分。放入该部分的值在启动时不会被初始化,在软件重启后也会保持值不变。
|
||||
|
||||
.. only:: esp32
|
||||
.. only:: SOC_SPIRAM_SUPPORTED
|
||||
|
||||
通过使用 ``EXT_RAM_NOINIT_ATTR`` 宏,noinit 数据也可以放入外部 RAM 中。为此,需要启用 :ref:`CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY`,可参考 :ref:`external_ram_config_noinit`。如果没有启用 :ref:`CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY`, ``EXT_RAM_NOINIT_ATTR`` 会和 ``__NOINIT_ATTR`` 一样,将数据放入内部 RAM 的 ``.noinit`` 部分。
|
||||
|
||||
|
Reference in New Issue
Block a user