Board variants using Snippets
ESP32 boards can be assembled with different modules using multiple combinations of SPI flash sizes, PSRAM sizes and PSRAM modes.
The snippets under snippets/espressif
provide a modular way to apply these variations at build time without duplicating board definitions.
The following snippet-based variants are supported:
Snippet name |
Description |
---|---|
Flash memory size |
|
|
Board with 4MB of flash |
|
Board with 8MB of flash |
|
Board with 16MB of flash |
|
Board with 32MB of flash |
PSRAM memory size |
|
|
Board with 2MB of PSRAM |
|
Board with 4MB of PSRAM |
|
Board with 8MB of PSRAM |
PSRAM utilization |
|
|
Relocate flash to PSRAM |
|
Wi-Fi buffers in PSRAM |
To apply a board variant, use the -S
flag with west build:
west build -b <board> -S flash-32M -S psram-4M samples/hello_world
Note: These snippets are applicable to boards with compatible hardware support for the selected flash/PSRAM configuration.