docs: adding migration guide about esp_driver_xyz components

This commit is contained in:
morris
2023-11-03 13:39:29 +08:00
parent 2ef14fe55e
commit f2304a5f73
6 changed files with 80 additions and 0 deletions

View File

@@ -12,3 +12,4 @@ ESP-IDF 5.x Migration Guide
release-5.x/5.0/index
release-5.x/5.1/index
release-5.x/5.2/index
release-5.x/5.3/index

View File

@@ -0,0 +1,9 @@
Migration from 5.2 to 5.3
-------------------------
:link_to_translation:`zh_CN:[中文]`
.. toctree::
:maxdepth: 1
peripherals

View File

@@ -0,0 +1,30 @@
Peripherals
===========
:link_to_translation:`zh_CN:[中文]`
In order to control the dependence of other components on drivers at a smaller granularity, the original peripheral drivers under the `driver`` component were split into separate components:
- `esp_driver_gptimer` - Driver for general purpose timers
- `esp_driver_pcnt` - Driver for pulse counter
- `esp_driver_gpio` - Driver for GPIO
For compatibility, the original `driver`` component is still treated as an all-in-one component by registering these `esp_driver_xyz`` components as its public dependencies. In other words, you do not need to modify the CMake file of an existing project, but you now have a way to specify the specific peripheral driver that your project depends on.
Originally, you may have used **linker.lf** to specify the link location of some driver functions in memory space, but now, because the location of the driver files have been moved, you need to make changes your **linker.lf** file accordingly. For example, a linker.lf file with the following entries:
.. code-block:: none
[mapping:my_mapping_scheme]
archive: libdriver.a
entries:
gpio (noflash)
Should be changed to:
.. code-block:: none
[mapping:my_mapping_scheme]
archive: libesp_driver_gpio.a
entries:
gpio (noflash)

View File

@@ -12,3 +12,4 @@
release-5.x/5.0/index
release-5.x/5.1/index
release-5.x/5.2/index
release-5.x/5.3/index

View File

@@ -0,0 +1,9 @@
从 5.2 迁移到 5.3
-----------------
:link_to_translation:`en:[English]`
.. toctree::
:maxdepth: 1
peripherals

View File

@@ -0,0 +1,30 @@
外设
====
:link_to_translation:`en:[English]`
为了细粒度地控制其他组件对外设驱动的依赖,原先位于 `driver` 组件下的驱动程序被拆分到了各自独立的组件中。这些组件包括:
- `esp_driver_gptimer` - 通用定时器驱动
- `esp_driver_pcnt` - 脉冲计数器驱动
- `esp_driver_gpio` - GPIO 驱动
为了兼容性,原来的 `driver` 组件仍然存在,并作为一个 “all-in-one" 的组件,将以上这些 `esp_driver_xyz` 组件注册成自己的公共依赖。换句话说,你无需修改既有项目的 CMake 文件,但是你现在多了一个途径去指定你项目依赖的具体的外设驱动。
原来你可能使用 **linker.lf** 指定了一些驱动函数在内存空间的链接位置,但是现在,因为驱动文件的位置发生了挪动,就需要你对 **linker.lf** 文件做出相应的改动的。假如,你的 linker.lf 文件里面有以下的条目:
.. code-block:: none
[mapping:my_mapping_scheme]
archive: libdriver.a
entries:
gpio (noflash)
现在需要修改成:
.. code-block:: none
[mapping:my_mapping_scheme]
archive: libesp_driver_gpio.a
entries:
gpio (noflash)