You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ESP-AT project supports multiple modules, and provides configuration for them in the :component_file:`factory_param_data.csv <customized_partitions/raw_data/factory_param/factory_param_data.csv>` table and the files in the :project:`module_config` folder. See the table below for the supported platforms (chip series) and modules, as well as locations of the default configuration files.
6
+
The ESP-AT project supports multiple modules, and provides configuration for them in the :component_file:`factory_param_data.csv <customized_partitions/raw_data/factory_param/factory_param_data.csv>` table and the files in the :project:`module_config` folder. If you want to add support for an {IDF_TARGET_NAME} module in your ESP-AT project, you need to modify those configuration files. The "{IDF_TARGET_NAME} module" here means:
- Modules that the ESP-AT project has not supported yet, including those of supported platform and not supported platform. However, adding support for the latter requires extra huge work, thus not recommended and not explained in this document.
48
9
49
-
- When the ``silence mode`` in ``./build.py menuconfig`` is ``0``, the default sdkconfig corresponding to the module is ``sdkconfig.defaults``.
50
-
- When the ``silence mode`` in ``./build.py menuconfig`` is ``1``, the default sdkconfig corresponding to the module is ``sdkconfig_silence.defaults``.
10
+
- Modules that the ESP-AT project supports, but you want to modify the default configuration.
51
11
52
-
If you want to add support for an {IDF_TARGET_NAME} module in your ESP-AT project, you need to modify those configuration files. The "{IDF_TARGET_NAME} module" here means:
12
+
.. only:: esp32c2 or esp32c3 or esp32c6
53
13
54
-
- Modules that the ESP-AT project has not supported yet, including those of supported platform and not supported platform. However, adding support for the latter requires extra huge work, thus not recommended and not explained in this document.
14
+
The document uses an example to explain how to add support for an {IDF_TARGET_NAME} module in the ESP-AT project. The example module is {IDF_TARGET_NAME}-MINI-1 that uses SPI instead of the default UART interface.
55
15
56
-
- Modules that the ESP-AT project supports, but you want to modify the default configuration.
16
+
.. only:: esp32 or esp32s2
57
17
58
-
The document uses an example to explain how to add support for an {IDF_TARGET_NAME} module in the ESP-AT project. The example module is ESP32-WROOM-32 that uses SDIO instead of the default UART interface.
18
+
This document will explain how to add new module support for a {IDF_TARGET_NAME} chip/module that ESP-AT already supports in the ESP-AT project. The following example will enable the default :ref:`FileSystem AT commands <FS-AT>` and add support for a new module.
59
19
60
20
.. contents::
61
21
:local:
62
22
:depth: 1
63
23
64
-
Add Module to factory_param_data.csv
65
-
------------------------------------
24
+
Step 1: Configure the Factory Parameters for the New Module
Open your local :component_file:`factory_param_data.csv <customized_partitions/raw_data/factory_param/factory_param_data.csv>`, insert a new row at the end, set the parameters as needed. In the example, we set ``platform`` to ``PLATFORM_ESP32``, ``module_name`` to ``WROOM32-SDIO``, as well as other parameters as follows (see :ref:`factory-param-intro` for what each parameter represents):
27
+
Open your local :component_file:`factory_param_data.csv <customized_partitions/raw_data/factory_param/factory_param_data.csv>`, insert a new row at the end, and set the relevant parameters as needed. In this example, we set ``platform`` to ``PLATFORM_{IDF_TARGET_CFG_PREFIX}`` and ``module_name`` to ``{IDF_TARGET_CFG_PREFIX}-USER-DEFINED``. The values for other parameters are shown in the table below (for parameter meanings, please refer to :ref:`factory-param-intro`).
The ESP-AT project supports multiple platforms, each of which supports multiple module configurations and provides configuration files for each module configuration: :component_file:`factory_param_data.csv <customized_partitions/raw_data/factory_param/factory_param_data.csv>` and :project:`module_config`. The table below lists the names of the platforms (i.e., chip series) supported by the ESP-AT project, the names of the module configurations, and the locations of the corresponding configuration files for each module configuration.
- When the ``silence mode`` in :ref:`python build.py install <esp-at-install-env>` is ``0``, the default sdkconfig corresponding to the module is ``sdkconfig.defaults``.
170
+
- When the ``silence mode`` in :ref:`python build.py install <esp-at-install-env>` is ``1``, the default sdkconfig corresponding to the module is ``sdkconfig_silence.defaults``.
140
171
141
-
Firstly, enter ``module_config`` folder, and create a new folder to store all the configuration files for your module. Note that the folder name should be in lower case. Then, add the configuration files in the new folder: IDF_VERSION, at_customize.csv, partitions_at.csv, sdkconfig.defaults, and sdkconfig_silence.defaults.
172
+
Firstly, enter ``module_config`` folder, and create a new folder to store all the configuration files for your module. Note that the folder name should be in lower case. Then, add the configuration files in the new folder: IDF_VERSION, patch, at_customize.csv, partitions_at.csv, sdkconfig.defaults, and sdkconfig_silence.defaults.
142
173
143
-
In this example, we copy the ``module_esp32_default`` folder as well as the files within it and rename it as ``module_wroom32-sdio``. The copied IDF_VERSION, at_customize.csv, and partitions_at.csv do not need any modification in our case. We only need to modify the sdkconfig.defaults and sdkconfig_silence.defaults:
174
+
In this example, we copy the ``module_{IDF_TARGET_PATH_NAME}_default`` folder as well as the files within it and rename it as ``module_{IDF_TARGET_PATH_NAME}-user-defined``. The copied IDF_VERSION, patch, at_customize.csv, and partitions_at.csv do not need any modification in our case. We only need to modify the sdkconfig.defaults and sdkconfig_silence.defaults:
144
175
145
-
- Modify the two files to use the partition table in the ``module_wroom32-sdio`` folder as follows:
176
+
- Modify the two files to use the partition table in the ``module_{IDF_TARGET_PATH_NAME}-user-defined`` folder as follows:
- Modify the two files to use the SDIO configuration and remove the UART configuration as follows:
184
+
.. only:: esp32c2 or esp32c3 or esp32c6
154
185
155
-
- Remove the UART configuration
186
+
- Modify the two files to use the SPI configuration and remove the UART configuration as follows:
156
187
157
-
::
188
+
- Remove the UART configuration
189
+
190
+
::
191
+
192
+
CONFIG_AT_BASE_ON_UART=n
193
+
194
+
- Add the SPI configuration
195
+
196
+
::
158
197
159
-
CONFIG_AT_BASE_ON_UART=n
198
+
CONFIG_AT_BASE_ON_SPI=y
199
+
CONFIG_SPI_STANDARD_MODE=y
200
+
CONFIG_SPI_SCLK_PIN=6
201
+
CONFIG_SPI_MOSI_PIN=7
202
+
CONFIG_SPI_MISO_PIN=2
203
+
CONFIG_SPI_CS_PIN=10
204
+
CONFIG_SPI_HANDSHAKE_PIN=3
205
+
CONFIG_SPI_NUM=1
206
+
CONFIG_SPI_MODE=0
207
+
CONFIG_TX_STREAM_BUFFER_SIZE=4096
208
+
CONFIG_RX_STREAM_BUFFER_SIZE=4096
160
209
161
-
- Add the SDIO configuration
210
+
.. only:: esp32 or esp32s2
162
211
163
-
::
212
+
- Add support for :ref:`FileSystem AT commands <FS-AT>` configuration
164
213
165
-
CONFIG_AT_BASE_ON_SDIO=y
214
+
::
215
+
216
+
CONFIG_AT_FS_COMMAND_SUPPORT=y
166
217
167
-
After finishing the above steps, you can recompile the ESP-AT project to generate the firmware for your module. In this example, we choose ``PLATFORM_ESP32`` and ``WROOM32-SDIO`` when configuring the project to generate the firmware for it.
218
+
After completing the above steps, you can recompile the ESP-AT project to generate the module firmware. In this example, when we compile the AT firmware locally during :ref:`Step 3: Install Environment <esp-at-install-env>`, we can select ``PLATFORM_{IDF_TARGET_CFG_PREFIX}`` and ``{IDF_TARGET_CFG_PREFIX}-USER-DEFINED`` to generate the AT firmware.
0 commit comments