Skip to content

Commit ad3f665

Browse files
committed
docs(ci): Add documentation about FQBNs in CI
1 parent 7999f08 commit ad3f665

File tree

1 file changed

+43
-3
lines changed

1 file changed

+43
-3
lines changed

docs/en/contributing.rst

+43-3
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,47 @@ And in the ``README.md`` file:
166166
167167
Currently, this example requires Wi-Fi and supports the following targets.
168168
169-
| Supported Targets | ESP32 | ESP32-H2 | ESP32-S3 | ESP32-C3 | ESP32-C6 |
170-
| ----------------- | ----- | -------- | -------- | -------- | -------- |
169+
| Supported Targets | ESP32 | ESP32-S3 | ESP32-C3 | ESP32-C6 |
170+
| ----------------- | ----- | -------- | -------- | -------- |
171+
172+
By default, the CI system will use the FQBNs specified in the ``.github/scripts/sketch_utils.sh`` file to compile the sketches.
173+
Currently, the default FQBNs are:
174+
175+
* ``espressif:esp32:esp32:PSRAM=enabled,FlashMode=dio``
176+
* ``espressif:esp32:esp32s2:PSRAM=enabled,FlashMode=dio``
177+
* ``espressif:esp32:esp32s3:PSRAM=opi,USBMode=default,FlashMode=dio``
178+
* ``espressif:esp32:esp32c3:FlashMode=dio``
179+
* ``espressif:esp32:esp32c6:FlashMode=dio``
180+
* ``espressif:esp32:esp32h2:FlashMode=dio``
181+
182+
There are two ways to alter the FQBNs used to compile the sketches: by using the ``fqbn`` or ``fqbn_append`` fields in the ``ci.json`` file.
183+
184+
If you just want to append a string to the default FQBNs, you can use the ``fqbn_append`` field. For example, to add the ``DebugLevel=debug`` to the FQBNs, you would use:
185+
186+
.. code-block:: json
187+
188+
{
189+
"fqbn_append": "DebugLevel=debug"
190+
}
191+
192+
If you want to override the default FQBNs, you can use the ``fqbn`` field. It is a dictionary where the key is the target name and the value is a list of FQBNs.
193+
The FQBNs in the list will be used in sequence to compile the sketch. For example, to compile a sketch for ESP32-S2 with and without PSRAM enabled, you would use:
194+
195+
.. code-block:: json
196+
197+
{
198+
"fqbn": {
199+
"esp32s2": [
200+
"espressif:esp32:esp32s2:PSRAM=enabled,FlashMode=dio",
201+
"espressif:esp32:esp32s2:PSRAM=disabled,FlashMode=dio"
202+
]
203+
}
204+
}
205+
206+
.. note::
207+
208+
The FQBNs specified in the ``fqbn`` field will also override the options specified in the ``fqbn_append`` field.
209+
That means that if the ``fqbn`` field is specified, the ``fqbn_append`` field will be ignored and will have no effect.
171210

172211
Example Template
173212
****************
@@ -376,9 +415,10 @@ The ``ci.json`` file is used to specify how the test suite and sketches will han
376415
* ``platforms``: A dictionary that specifies the supported platforms. The key is the platform name and the value is a boolean that specifies if
377416
the platform is supported. By default, all platforms are assumed to be supported.
378417
* ``extra_tags``: A list of extra tags that the runner will require when running the test suite in hardware. By default, no extra tags are required.
418+
* ``fqbn_append``: A string to be appended to the default FQBNs. By default, no string is appended. This has no effect if ``fqbn`` is specified.
379419
* ``fqbn``: A dictionary that specifies the FQBNs that will be used to compile the sketch. The key is the target name and the value is a list
380420
of FQBNs. The `default FQBNs <https://github.com/espressif/arduino-esp32/blob/a31a5fca1739993173caba995f7785b8eed6b30e/.github/scripts/sketch_utils.sh#L86-L91>`_
381-
are used if this field is not specified.
421+
are used if this field is not specified. This overrides the default FQBNs and the ``fqbn_append`` field.
382422

383423
The ``wifi`` test suite is a good example of how to use the ``ci.json`` file:
384424

0 commit comments

Comments
 (0)