feat(esp32): add esp32-s3-N4R2 build environment - #150
Conversation
998992b to
0cda87e
Compare
Waveshare ESP32-S3-Zero and the other ESP32-S3FH4R2 mini boards need their
own environment on two counts:
- PSRAM is quad, not octal. Every other S3 env here is an R8 part and sets
memory_type = qio_opi / psram_type = qspi_opi; an R2 part must use
qio_qspi / qspi or PSRAM never comes up.
- 4 MB flash. huge_app gives one 3 MB app slot (no OTA); default_4MB's
paired 1.25 MB slots are too small for this firmware.
FastEPD is deliberately omitted: it only serves the parallel/IT8951 panel
path, SPI panels go through bb_epaper, and leaving it out keeps the image
inside 4 MB (1.48 MB / 3 MB used).
Registered in the release matrix and in default_envs, so neither CI nor a
bare `pio run` silently skips it.
0cda87e to
50a2d77
Compare
|
Thank you for you contribution. I will merge the PR after the tests pass. Is this profile for a commercially avaliable board or something custom built? |
|
Custom built — it is a DIY device, not a commercial product. The profile is not specific to my one unit, though. The MCU board is an What pushed me to add an env at all is that none of the existing ones will run |


Why
The Waveshare ESP32-S3-Zero and the other S3 mini boards built on the
ESP32-S3FH4R2 have no environment they can use. Every existing S3 env is an R8
part with 8 MB or more of flash, and two of those settings are fatal on an R2:
memory_type = qio_opi/psram_type = qspi_opi. An R2 part needsqio_qspi/qspior PSRAM nevercomes up.
default_4MB's paired 1.25 MB app slots are too small — thisfirmware is ~1.5 MB with WiFi + BLE.
huge_appgives a single 3 MB slot, atthe cost of OTA.
What
New
[env:esp32-s3-N4R2], modelled onesp32-s3-N8R8with those two changes,plus:
parallel/IT8951 path (ED103TC2 10.3", Inkplate 5 V2, Inkplate 10). Their
2.6 MB framebuffer does not fit in 2 MB of PSRAM, and the Inkplate ones also
want a parallel bus this class of board has no pins for. SPI panels go
through bb_epaper. Worth being precise that this is a PSRAM limit and not a
flash one: linking FastEPD in builds fine and costs only ~51 KB, 48.5% of the
slot instead of 46.9%.
.github/firmware-targets.jsonand indefault_envs, soneither CI nor a bare
pio runsilently skips it.Testing
Built and flashed on a Waveshare ESP32-S3-Zero. The image is 1.47 MB of the
3 MB slot (46.9%), RAM 29.8%. PSRAM comes up and is used — the PIPE reorder
queue and the 16 KB LAN RX buffer both allocate there — and BLE and the
WiFi/LAN transport both work.