Skip to content

Commit

Permalink
Merge branch 'docs/ulp_docs_incorrect_notes' into 'master'
Browse files Browse the repository at this point in the history
docs: Ulpdated ULP docs to have the correct notes directive

Closes IDF-2522

See merge request espressif/esp-idf!22415
  • Loading branch information
sudeep-mohanty committed Feb 24, 2023
2 parents 8538f16 + 449ea7c commit 6c1a544
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/en/api-reference/system/ulp-risc-v.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The ULP RISC-V coprocessor code is written in C (assembly is also possible) and

If you have already set up ESP-IDF with CMake build system according to the :doc:`Getting Started Guide <../../../get-started/index>`, then the toolchain should already be installed.

.. note: In earlier versions of ESP-IDF, RISC-V toolchain had a different prefix: `riscv-none-embed-gcc`.
.. note:: In earlier versions of ESP-IDF, RISC-V toolchain had a different prefix: `riscv-none-embed-gcc`.

Compiling the ULP RISC-V Code
-----------------------------
Expand All @@ -20,7 +20,7 @@ To compile the ULP RISC-V code as part of the component, the following steps mus

1. The ULP RISC-V code, written in C or assembly (must use the `.S` extension), must be placed in a separate directory inside the component directory, for instance, `ulp/`.

.. note: When registering the component (via ``idf_component_register``), this directory should not be added to the ``SRC_DIRS`` argument as it is currently done for the ULP FSM. See the step below for how to properly add ULP source files.
.. note:: When registering the component (via ``idf_component_register``), this directory should not be added to the ``SRC_DIRS`` argument as it is currently done for the ULP FSM. See the step below for how to properly add ULP source files.

2. Call ``ulp_embed_binary`` from the component CMakeLists.txt after registration. For example::

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api-reference/system/ulp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ To compile the ULP FSM code as part of the component, the following steps must b

1. The ULP FSM code, written in assembly, must be added to one or more files with `.S` extension. These files must be placed into a separate directory inside the component directory, for instance, `ulp/`.

.. note: When registering the component (via ``idf_component_register``), this directory should not be added to the ``SRC_DIRS`` argument. The logic behind this is that the ESP-IDF build system will compile files found in ``SRC_DIRS`` based on their extensions. For ``.S`` files, ``{IDF_TARGET_TOOLCHAIN_PREFIX}-as`` assembler is used. This is not desirable for ULP FSM assembly files, so the easiest way to achieve the distinction is by placing ULP FSM assembly files into a separate directory. The ULP FSM assembly source files should also **not** be added to ``SRCS`` for the same reason. See the step below for how to properly add ULP FSM assembly source files.
.. note:: When registering the component (via ``idf_component_register``), this directory should not be added to the ``SRC_DIRS`` argument. The logic behind this is that the ESP-IDF build system will compile files found in ``SRC_DIRS`` based on their extensions. For ``.S`` files, ``{IDF_TARGET_TOOLCHAIN_PREFIX}-as`` assembler is used. This is not desirable for ULP FSM assembly files, so the easiest way to achieve the distinction is by placing ULP FSM assembly files into a separate directory. The ULP FSM assembly source files should also **not** be added to ``SRCS`` for the same reason. See the step below for how to properly add ULP FSM assembly source files.

2. Call ``ulp_embed_binary`` from the component CMakeLists.txt after registration. For example::

Expand Down
4 changes: 2 additions & 2 deletions docs/zh_CN/api-reference/system/ulp-risc-v.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ULP RISC-V 协处理器代码以 C 语言(或汇编语言)编写,使用基

如果您已依照 :doc:`快速入门指南 <../../../get-started/index>` 中的介绍安装好了 ESP-IDF 及其 CMake 构建系统,那么 ULP RISC-V 工具链已经被默认安装到了您的开发环境中。

.. note: 在早期版本的 ESP-IDF 中,RISC-V 工具链具有不同的名称:`riscv-none-embed-gcc`。
.. note:: 在早期版本的 ESP-IDF 中,RISC-V 工具链具有不同的名称:`riscv-none-embed-gcc`。

编译 ULP RISC-V 代码
-----------------------------
Expand All @@ -20,7 +20,7 @@ ULP RISC-V 协处理器代码以 C 语言(或汇编语言)编写,使用基

1. ULP RISC-V 代码以 C 语言或汇编语言编写(必须使用 `.S` 扩展名),必须放在组件目录中一个独立的目录中,例如 `ulp/`。

.. note: 当注册组件时(通过 ``idf_component_register``),该目录不应被添加至 ``SRC_DIRS`` 参数,因为目前该步骤需用于 ULP FSM。如何正确添加 ULP 源文件,请见以下步骤。
.. note:: 当注册组件时(通过 ``idf_component_register``),该目录不应被添加至 ``SRC_DIRS`` 参数,因为目前该步骤需用于 ULP FSM。如何正确添加 ULP 源文件,请见以下步骤。

2. 注册后从组件 CMakeLists.txt 中调用 ``ulp_embed_binary`` 示例如下::

Expand Down
2 changes: 1 addition & 1 deletion docs/zh_CN/api-reference/system/ulp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ULP FSM 协处理器代码由汇编语言编写,使用 `binutils-esp32ulp 工

1. 用汇编语言编写的 ULP FSM 代码必须导入到一个或多个 `.S` 扩展文件中,且这些文件必须放在组件目录中一个独立的目录中,例如 `ulp/`。

.. note: 在注册组件(通过 ``idf_component_register``)时,不应将该目录添加到 ``SRC_DIRS`` 参数中。因为 ESP-IDF 构建系统将基于文件扩展名编译在 ``SRC_DIRS`` 中搜索到的文件。对于 ``.S`` 文件,使用的是 ``{IDF_TARGET_TOOLCHAIN_PREFIX}-as`` 汇编器。但这并不适用于 ULP FSM 程序集文件,因此体现这种区别最简单的方式就是将 ULP FSM 程序集文件放到单独的目录中。同样,ULP FSM 程序集源文件也 **不应该** 添加到 ``SRCS`` 中。请参考如下步骤,查看如何正确添加 ULP FSM 程序集源文件。
.. note:: 在注册组件(通过 ``idf_component_register``)时,不应将该目录添加到 ``SRC_DIRS`` 参数中。因为 ESP-IDF 构建系统将基于文件扩展名编译在 ``SRC_DIRS`` 中搜索到的文件。对于 ``.S`` 文件,使用的是 ``{IDF_TARGET_TOOLCHAIN_PREFIX}-as`` 汇编器。但这并不适用于 ULP FSM 程序集文件,因此体现这种区别最简单的方式就是将 ULP FSM 程序集文件放到单独的目录中。同样,ULP FSM 程序集源文件也 **不应该** 添加到 ``SRCS`` 中。请参考如下步骤,查看如何正确添加 ULP FSM 程序集源文件。

2. 注册后从组件 CMakeLists.txt 中调用 ``ulp_embed_binary`` 示例如下::

Expand Down

0 comments on commit 6c1a544

Please sign in to comment.