Skip to content

ports/esp32s3: add target for ESP32-S3 with Octal PSRAM and 16MB flash - #9

Merged
schikani merged 3 commits into
tinydesk-project:mainfrom
SanjayG-xls:port-esp32s3
Oct 30, 2026
Merged

schikani merged 3 commits into
tinydesk-project:mainfrom
SanjayG-xls:port-esp32s3

Conversation

@SanjayG-xls

@SanjayG-xls SanjayG-xls commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Adds an official target for the ESP32-S3 (ports/esp32s3) with 16 MB Quad-SPI flash and 8 MB Octal PSRAM (OPI), serving the TinyDesk desktop over UART0 at 921,600 baud.

tinydeskpr

TinyDesk desktop and System Monitor running on physical ESP32-S3 Pro hardware (240 MHz Dual-Core Xtensa LX7, 8 MB Octal PSRAM, 16 MB Flash) over UART0 at 921,600 baud.


What changed

  • New port (ports/esp32s3/):

    • CMakeLists.txt: Sets target to esp32s3, binds the shared ESP-IDF application (ports/esp_idf/app), and stamps version/build date.
    • sdkconfig.defaults: Configured for ESP32-S3:
      • Octal PSRAM enabled in OPI mode (CONFIG_SPIRAM_MODE_OCT=y, CONFIG_SPIRAM_TYPE_AUTO=y).
      • 16 MB Quad-SPI flash (CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y, mode DIO).
      • UART0 console reserved for TinyDesk at 921,600 baud (CONFIG_ESP_CONSOLE_NONE=y, bootloader logging suppressed).
      • FreeRTOS runtime stats enabled for Task Manager (CONFIG_FREERTOS_USE_TRACE_FACILITY=y).
    • partitions.csv: 16 MB flash layout matching the classic ESP32 port (two 3 MB OTA slots, 9.9 MB LittleFS /fs drive).
    • board.example.conf: Hardware pin abstraction for ESP32-S3 (UART0 on GPIO43 TX / GPIO44 RX, commented RGB LED on GPIO 48, RS-485 on UART1/2, SPI SD card).
    • main/CMakeLists.txt & main/extram.lf: Links link_uart.c, embeds board.conf, and maps static desktop, terminal, and shell BSS buffers to external PSRAM.
  • Shared ESP-IDF layer (ports/esp_idf/app/):

    • main.c: Allocated 8,192 bytes for UI_TASK_STACK on ESP32-S3 (Xtensa frames) and added CHIP_ESP32S3 identification to fill_sysinfo().
    • link_uart.c: Sets ESP32-S3 platform string and hostname.
    • ota_esp.c: Added esp32s3 board identifier for official OTA update feeds.
  • Documentation:

    • Updated target and build tables in README.md and docs/GETTING_STARTED.md.

Hardware & Testing

Parameter Specification Tested
SoC ESP32-S3 (Xtensa® Dual-Core 32-bit LX7 @ 240 MHz)
Silicon ROM esp32s3-20210327
PSRAM 8 MB Octal PSRAM (OPI, 8-line bus, 8189 KB free)
Flash 16 MB Quad-SPI Flash (DIO mode)
Bridge UART0 (GPIO43/44) through WCH CH340 at 921,600 baud (8N1)
SDK ESP-IDF 5.3.1
Terminals Tested PuTTY (UTF-8, xterm mouse reporting) and the official TinyDesk Web Console (Chrome/Edge)

Test Verification

  1. Host tests: Full suite runs and passes (ctest --test-dir build clean).
  2. Firmware build: Compiles cleanly with -Wall -Wextra -Werror with zero warnings.
  3. Interactive desktop: Tested overlapping windows, dragging, resizing, Task Manager CPU/heap monitor, LittleFS file operations, and shell execution on physical hardware.

Build from source

cd ports/esp32s3
idf.py set-target esp32s3
idf.py build
idf.py -p PORT -b 921600 flash
image_2026-10-29_200129999-removebg-preview

@schikani

Copy link
Copy Markdown
Collaborator

Thanks, and welcome! Funny timing: I had my own ESP32-S3 port almost ready to push, so it's great to see we landed on a very similar setup (mine serves the desktop on the native USB port rather than UART0, more on that below). I'll merge yours and bring anything extra from mine on top of it. It's a clean port: it reuses the shared ESP-IDF app with very few changes, and it's great that you tested it on real S3 hardware.

A few small things before I merge:

  1. board.example.conf mentions rgb.led.gpio, but nothing in TinyDesk or the shell reads that key, so please remove it so the example only shows settings that work.
  2. In the same file, the SD card and the W6100 both use CS 10; please give the SD card another pin (8 is free on most S3 boards) so the two examples can be enabled together.
  3. Please add CONFIG_ESP_CONSOLE_SECONDARY_NONE=y to sdkconfig.defaults: on the S3, ESP-IDF otherwise mirrors console output to the built-in USB port.
  4. Please add the S3 to the firmware build in .github/workflows/ci.yml, next to the other ports, so CI catches it if it ever breaks:
    (cd ports/esp32s3 && idf.py set-target esp32s3 && idf.py build && idf.py size)

I'll add the S3 to the release workflow and the installer myself; until then ota on an S3 just reports that the server has no update information for it.

For the next steps on the S3, I'm planning the native USB console and USB host for keyboards myself, so if you'd like to work on more of the S3, let's talk on an issue first so we don't build the same thing twice.

@SanjayG-xls

Copy link
Copy Markdown
Contributor Author

Thanks, and welcome! Funny timing: I had my own ESP32-S3 port almost ready to push, so it's great to see we landed on a very similar setup (mine serves the desktop on the native USB port rather than UART0, more on that below). I'll merge yours and bring anything extra from mine on top of it. It's a clean port: it reuses the shared ESP-IDF app with very few changes, and it's great that you tested it on real S3 hardware.

A few small things before I merge:

  1. board.example.conf mentions rgb.led.gpio, but nothing in TinyDesk or the shell reads that key, so please remove it so the example only shows settings that work.
  2. In the same file, the SD card and the W6100 both use CS 10; please give the SD card another pin (8 is free on most S3 boards) so the two examples can be enabled together.
  3. Please add CONFIG_ESP_CONSOLE_SECONDARY_NONE=y to sdkconfig.defaults: on the S3, ESP-IDF otherwise mirrors console output to the built-in USB port.
  4. Please add the S3 to the firmware build in .github/workflows/ci.yml, next to the other ports, so CI catches it if it ever breaks:
    (cd ports/esp32s3 && idf.py set-target esp32s3 && idf.py build && idf.py size)

I'll add the S3 to the release workflow and the installer myself; until then ota on an S3 just reports that the server has no update information for it.

For the next steps on the S3, I'm planning the native USB console and USB host for keyboards myself, so if you'd like to work on more of the S3, let's talk on an issue first so we don't build the same thing twice.

Hi, Thanks for reviewing the Pull Request, I'm Looking into the things that you mentions and ill update it shorty. Thanks!!

@SanjayG-xls

Copy link
Copy Markdown
Contributor Author

I have pushed an update with all four requested changes:

  1. Removed rgb.led.gpio from board.example.conf.
  2. Changed the SD card CS pin to GPIO 8 to avoid clashing with W6100 on GPIO 10.
  3. Added CONFIG_ESP_CONSOLE_SECONDARY_NONE=y to sdkconfig.defaults.
  4. Added the S3 build and size check to .github/workflows/ci.yml.

Looking forward to seeing the native USB console and USB host keyboard support on the S3 as well!
Thanks!!

@schikani
schikani merged commit ebd88b1 into tinydesk-project:main Oct 30, 2026
7 checks passed
@schikani

Copy link
Copy Markdown
Collaborator

Merged, thanks @SanjayG-xls! All four points addressed, and CI now builds the S3 on every change, including the new step.

I’ll add the S3 to the release workflow, the installer and the docs next, so it ships with the next release and ota works on it. After that I’ll bring the native USB console from my port on top of yours.

If you’d like to take on more of the S3 (USB host keyboards, or something else you’d find useful), open an issue and we can split up the work.

schikani added a commit that referenced this pull request Oct 31, 2026
TD_VERSION, PROJECT_VER of the four boards, the README and the release
notes: the ESP32-S3 (#9), Python scripts with MicroPython (py, machine,
tdui, the Python Editor), files of the port on new Desktops (#5), the
Editor's buffer sized to the file (#6), paste fixes. TinyDesk Shell at
0.2.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants