Skip to content

Commit af36ab5

Browse files
authored
[esp32] Document automatic board config (#5084)
1 parent 2c2cd67 commit af36ab5

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

components/esp32.rst

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,32 @@ This component contains platform-specific options for the ESP32 platform.
1111
1212
# Example configuration entry
1313
esp32:
14-
board: esp32dev
14+
variant: esp32s3
1515
1616
Configuration variables:
1717
------------------------
1818

19-
- **board** (**Required**, string): The PlatformIO board ID that should be used. Choose the appropriate board from
19+
- **variant** (*Optional*, string): The ESP32 mcu/chip to use for this device configuration. One of ``esp32``,
20+
``esp32s2``, ``esp32s3``, ``esp32c2``, ``esp32c3``, ``esp32c5``, ``esp32c6``, ``esp32h2`` or ``esp32p4``.
21+
This must match the hardware in use, or it will fail to flash.
22+
- **board** (*Optional*, string): The PlatformIO board ID that should be used. Choose the appropriate board from
2023
`this list <https://registry.platformio.org/platforms/platformio/espressif32/boards?version=5.3.0>`__ (the icon next
21-
to the name can be used to copy the board ID). *This only affects pin aliases, flash size and some internal settings*;
22-
if unsure or you cannot find your exact board, using a generic board (from Espressif) such as ``esp32dev`` almost
23-
always works just fine.
24+
to the name can be used to copy the board ID). *This only affects pin aliases and some internal settings*;
25+
This setting is no longer recommended, ``variant`` should be used instead.
26+
27+
.. note::
28+
29+
At least one of ``board`` or ``variant`` must be specified. If ``variant`` alone is specified (the recommended practice),
30+
the board configuration will be automatically filled using a standard Espressif devkit board
31+
suitable for that variant. Both may be specified (for backwards compatibility) but they must define the same variant.
32+
2433
- **flash_size** (*Optional*, string): The amount of flash memory available on the ESP32 board/module. One of ``2MB``,
2534
``4MB``, ``8MB``, ``16MB`` or ``32MB``. Defaults to ``4MB``. **Warning: specifying a size larger than that available
2635
on your board will cause the ESP32 to fail to boot.**
2736
- **cpu_frequency** (*Optional*, string): The CPU frequency to use. One of ``40MHz``, ``80MHz``, ``160MHz``, ``240MHz``,
2837
``360MHz`` or ``400MHz``. Defaults to ``160MHz``. Not all values are available for all chips.
2938
- **partitions** (*Optional*, filename): The name of (optionally including the path to) the file containing the
3039
partitioning scheme to be used. When not specified, partitions are automatically generated based on ``flash_size``.
31-
- **variant** (*Optional*, string): The variant of the ESP32 that is used on this board. One of ``esp32``,
32-
``esp32s2``, ``esp32s3``, ``esp32c2``, ``esp32c3``, ``esp32c5``, ``esp32c6``, ``esp32h2`` and ``esp32p4``. Defaults
33-
to the variant that is detected from the board; if a board that's unknown to ESPHome is used, this option is mandatory.
3440
- **framework** (*Optional*): Options for the underlying framework used by ESPHome. See :ref:`esp32-arduino_framework`
3541
and :ref:`esp32-espidf_framework`.
3642

0 commit comments

Comments
 (0)