Setup & Development
This guide walks through connecting the board, configuring your development environment, and verifying everything works with a test sketch. The ESP32-S3-Touch-LCD-4.3 supports both the Arduino framework and Espressif’s ESP-IDF toolchain — choose whichever fits your project.
Prerequisites
Section titled “Prerequisites”Before starting, gather the following:
- ESP32-S3-Touch-LCD-4.3 (Type B) board
- USB Type-C cable with data lines (not a charge-only cable)
- Computer running Windows, macOS, or Linux with one of:
- Arduino IDE 1.8 or later (2.x recommended)
- VS Code with the Espressif IDF extension
Connecting the Board
Section titled “Connecting the Board”The board has two USB Type-C ports that serve different purposes. Type-C2 (the top-edge port) connects to the CH343P USB-to-UART bridge and is the primary programming and serial monitor interface. Type-C1 (the side port) provides USB Host/OTG functionality and is not used for flashing. Use Type-C2 for all initial development work.
-
Connect USB Type-C2 (top port) to your computer using a data-capable USB-C cable.
-
Install CH343 drivers if your operating system does not recognize the device automatically. Linux kernels 5.14 and later include built-in CH343 support, and recent versions of Windows typically auto-detect the device through Windows Update. On macOS, download and install the CH34XSER_MAC driver from WCH.
-
Verify the connection by checking that a new serial port appears on your system. On Linux this will typically be
/dev/ttyACM0or/dev/ttyUSB0, on macOS/dev/cu.wchusbserial*, and on Windows a newCOMport in Device Manager.
Boot Mode
Section titled “Boot Mode”The ESP32-S3 must be placed into download mode before flashing new firmware. This is only necessary if automatic reset via the serial DTR/RTS lines fails (which is rare with the CH343P bridge, but good to know).
-
Press and hold the BOOT button on the board.
-
While still holding BOOT, press and release the RESET button.
-
Release the BOOT button. The ESP32-S3 is now in download mode, ready to accept firmware over the USB serial connection.
Development Environment Setup
Section titled “Development Environment Setup”The Arduino framework provides a familiar and accessible entry point, especially for projects focused on the display, touch input, and communication interfaces.
-
Install Arduino IDE version 1.8 or later. The 2.x series is recommended for improved board manager handling and a more responsive editor.
-
Add the ESP32 board manager URL. Navigate to File > Preferences (or Arduino IDE > Settings on macOS) and add the following URL to the “Additional boards manager URLs” field:
https://espressif.github.io/arduino-esp32/package_esp32_index.json -
Install the ESP32 board package. Open Tools > Board > Boards Manager, search for “esp32”, and install esp32 by Espressif Systems version 3.0.0 or later. Version 3.0.6 and above include a direct board selection for this module.
-
Configure board settings under Tools:
Setting Value Board ESP32S3 Dev Module Flash Size 16MB (128Mb) PSRAM OPI PSRAM USB CDC On Boot Enabled Upload Speed 921600 Partition Scheme 16M Flash (3MB APP/9.9MB FATFS) -
Install required libraries through the Arduino Library Manager (Sketch > Include Library > Manage Libraries):
Library Minimum Version Purpose ESP32_Display_Panel 0.1.4 Display driver and panel abstraction ESP32_IO_Expander 0.0.4 CH422G I/O expander driver lvgl 8.4.0 Embedded graphics framework For LVGL, you will also need to copy
lv_conf.hfrom the library’s root into your Arduino libraries folder and enable it by setting#if 0to#if 1at the top of the file. Waveshare’s demo projects include a pre-configuredlv_conf.has a starting point. -
Select the serial port corresponding to your board under Tools > Port and click Upload to flash.
ESP-IDF gives full access to the ESP32-S3’s capabilities, including fine-grained control over FreeRTOS tasks, memory allocation, and peripheral configuration. This is the recommended path for production firmware and projects that need features beyond what the Arduino abstraction provides.
-
Install VS Code and the Espressif IDF extension from the VS Code marketplace. The extension bundles a guided setup wizard that handles toolchain installation.
-
Install ESP-IDF version 5.1.4 or later. Version 5.5.2 is recommended as it includes important fixes for RS-485 half-duplex timing and TWAI (CAN) driver stability. The VS Code extension can install ESP-IDF automatically, or you can follow Espressif’s manual installation guide.
-
Configure your project’s
sdkconfig. The following settings are critical for this board:# FreeRTOS tick rate — 1000 Hz for responsive LVGL timersCONFIG_FREERTOS_HZ=1000# CPU at full 240 MHzCONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y# Enable OPI PSRAMCONFIG_SPIRAM=yCONFIG_SPIRAM_MODE_OCT=yCONFIG_SPIRAM_SPEED_80M=y# Place frequently accessed data in PSRAMCONFIG_SPIRAM_USE_MALLOC=y# Flash configuration — QIO, 80 MHz, 16 MBCONFIG_ESPTOOLPY_FLASHMODE_QIO=yCONFIG_ESPTOOLPY_FLASHFREQ_80M=yCONFIG_ESPTOOLPY_FLASHSIZE_16MB=y# Partition table — use custom CSV for 16MB flashCONFIG_PARTITION_TABLE_CUSTOM=y -
Build and flash your project from the VS Code command palette or the terminal:
Terminal window idf.py set-target esp32s3idf.py buildidf.py -p /dev/ttyACM0 flash monitorReplace
/dev/ttyACM0with your actual serial port. Themonitorargument opens a serial console immediately after flashing, which is useful for watching boot logs and debug output.
Verifying Your Setup
Section titled “Verifying Your Setup”The quickest way to confirm that the board, toolchain, and all peripherals are functioning is to flash the I2C Bus Scan demo. This sketch scans every address on the I2C bus and reports which devices respond — a straightforward hardware validation that exercises the I2C bus without requiring display or touch driver configuration.
A successful scan on the Type B board should find devices at the following addresses:
| Address | Device |
|---|---|
| 0x14 or 0x5D | GT911 touch controller (address depends on reset timing) |
| 0x24 | CH422G I/O expander |
| 0x51 | PCF85063A real-time clock |
If all three devices appear, the I2C bus, touch controller, I/O expander, and RTC are wired correctly and communicating. From here, proceed to the display and touch demos in Waveshare’s example repository to bring the screen to life.