Merge branch 'docs/update_CN_trans_api-guides' into 'master'

docs: updated CN trans for linker-script-generation and external-ram

Closes DOC-2803

See merge request espressif/esp-idf!17510
This commit is contained in:
morris
2022-04-07 11:15:16 +08:00
3 changed files with 22 additions and 13 deletions

View File

@@ -71,6 +71,7 @@ Placing object files
""""""""""""""""""""
Suppose the entirety of ``my_src1.o`` is performance-critical, so it is desirable to place it in RAM. On the other hand, the entirety of ``my_src2.o`` contains symbols needed coming out of deep sleep, so it needs to be put under RTC memory.
In the linker fragment file, we can write:
.. code-block:: none

View File

@@ -137,12 +137,18 @@ ESP-IDF 启动过程中,片外 RAM 被映射到以 {IDF_TARGET_PSRAM_ADDR_STAR
* 片外 RAM 与片外 flash 使用相同的 cache 区域,这意味着频繁在片外 RAM 访问的变量可以像在片上 RAM 中一样快速读取和修改。但访问大块数据时(大于 32 KBcache 空间可能会不足,访问速度将回落到片外 RAM 访问速度。此外,访问大块数据会挤出 flash cache可能降低代码执行速度。
* 一般来说,片外 RAM 不用作任务堆栈存储器。因此 :cpp:func:`xTaskCreate` 及类似函数始终为堆栈和任务 TCB 分配片上储存器,而 :cpp:func:`xTaskCreateStatic` 类型的函数将检查传递的 Buffer 是否属于片上存储器
* 一般来说,片外 RAM 不用作任务堆栈存储器。:cpp:func:`xTaskCreate` 及类似函数始终为堆栈和任务 TCB 分配片上储存器。
.. only:: esp32
可以使用 :ref:`CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY` 选项将任务堆栈放入片外存储器。这时,必须使用 :cpp:func:`xTaskCreateStatic` 指定从片外存储器分配的任务堆栈缓冲区,否则任务堆栈将会从片上存储器分配。
.. only:: not esp32
可以使用 :cpp:func:`xTaskCreateStatic` 显式地将任务堆栈放入片外存储器。
初始化失败
=====================

View File

@@ -71,6 +71,7 @@
""""""""""""
假设整个 ``my_src1.o`` 目标文件对性能至关重要,所以最好把该文件放在 RAM 中。另外,``my_src2.o`` 目标文件包含从深度睡眠唤醒所需的符号,因此需要将其存放到 RTC 存储器中。
在链接器片段文件中可以写入以下内容:
.. code-block:: none
@@ -125,6 +126,7 @@
entries:
* (rtc)
.. _ldgen-conditional-placements :
根据具体配置存放
@@ -227,8 +229,8 @@
- 名称:片段名称,指定片段类型的片段名称应唯一。
- 键值:片段内容。每个片段类型可支持不同的键值和不同的键值语法。
-``````协议`` 中,仅支持 ``entries`` 键。
-``映射`` 中,支持 ``archive````entries``
-:ref:`段 <ldgen-sections-fragment>`:ref:`协议 <ldgen-scheme-fragment>` 中,仅支持 ``entries`` 键。
-:ref:`映射 <ldgen-mapping-fragment>` 中,支持 ``archive````entries`` 键。
.. note::