Skip to content

[WIP] boards/xtensa/esp32s3: New board WaveShare ESP32-S3-(Touch)-LCD-1.28.#18730

Open
cederom wants to merge 1 commit intoapache:masterfrom
cederom:cederom-202603-esp32s3-ws-lcd128
Open

[WIP] boards/xtensa/esp32s3: New board WaveShare ESP32-S3-(Touch)-LCD-1.28.#18730
cederom wants to merge 1 commit intoapache:masterfrom
cederom:cederom-202603-esp32s3-ws-lcd128

Conversation

@cederom
Copy link
Copy Markdown
Contributor

@cederom cederom commented Apr 14, 2026

Summary

  • Initial experimental / work in progress implementation.
  • Adds support to ESP32-S3-(Touch)-LCD-1.28 [1].
  • New board name is esp32s3-ws-lcd128.
  • Supports Kconfig delectable w/wo touch variants (gpios difference).
  • Created board documentation.
  • Supported configurations: nsh, ostest, coremark, touch-lvgl, notouch-lvgl, qmi8568, watchdog.
  • Does not have touch panel driver yet.
  • QC9A01 LCD driver works with lvgldemo but displays bad in picture colors, text is readable. I have tried all variations of bitcolors with not much difference. Probably lcd driver needs an update. Will update when solution is found. I am using this board already for prototyping with simple text display. If merged I could use it with already in the project as in-tree board.. but I can still use it as out-of-tree board and provide later.. up to reviewers :-)
  • Work in progress. Documentation clearly marks initial experimental implementation.

[1] https://www.waveshare.com/wiki/ESP32-S3-Touch-LCD-1.28

Impact

  • New board xtensa/esp32s3/esp32s3-ws-lcd128 initial implementation.

Testing

Developed on FreeBSD 14.4, provided and testes basic configurations with nsh, ostest, coremark, watchdog, touch-lvgl (spawns lvgldemo on touch board variant), notouch-lvgl (non-touch board variant lvgldemo spawn).

% gmake clean distclean -j ; ./tools/configure.sh -B -S esp32s3-ws-lcd128:ostest && gmake flash -j && cu -l /dev/cuaU0 -s 115200
  Copy files
  Select CONFIG_HOST_BSD=y
  Refreshing...
(..)
#
# configuration written to .config
#
Create version.h
Cloning Espressif HAL for 3rd Party Platforms
COMMIT SHA-1: 6c272b562a73107a852d44b9c6fb5df57245cbd7 LN: platform/board to /zraid/data/cederom/work/CeDeROM/lab/embedded/nuttx/nuttx-apps.git/platform/dummy
Register: sh
Register: nsh
Register: dd
Register: ostest
Espressif HAL for 3rd Party Platforms: cleaning current repository...
Espressif HAL for 3rd Party Platforms: 6c272b562a73107a852d44b9c6fb5df57245cbd7
Espressif HAL for 3rd Party Platforms: initializing submodules...
Applying patches...
(..)
LD: nuttx
Memory region         Used Size  Region Size  %age Used
             ROM:      242050 B    4194272 B      5.77%
     iram0_0_seg:       35072 B       304 KB     11.27%
     irom0_0_seg:      195264 B    4194272 B      4.66%
     dram0_0_seg:       39592 B       288 KB     13.43%
     drom0_0_seg:      307550 B    4194272 B      7.33%
    rtc_iram_seg:           0 B       8168 B      0.00%
    rtc_data_seg:           0 B       8168 B      0.00%
rtc_reserved_seg:          24 B         24 B    100.00%
    rtc_slow_seg:          36 B         8 KB      0.44%
CP: nuttx.hex
MKIMAGE: ESP32-S3 binary
esptool.py -c esp32s3 elf2image --ram-only-header -fs 4MB -fm dio -ff "40m" -o nuttx.bin nuttx
esptool.py v4.10.0
Creating esp32s3 image...
Image has only RAM segments visible. ROM segments are hidden and SHA256 digest is not appended.
Merged 1 ELF section
Successfully created esp32s3 image.
Generated: nuttx.bin
esptool.py -c esp32s3 -p /dev/cuaU0 -b 115200  write_flash -fs detect -fm dio -ff "40m" 0x0000 nuttx.bin
esptool.py v4.10.0
Serial port /dev/cuaU0
Connecting...
Chip is ESP32-S3 (QFN56) (revision v0.2)
Features: WiFi, BLE, Embedded PSRAM 2MB (AP_3v3)
Crystal is 40MHz
MAC: XXX
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 16MB
Flash will be erased from 0x00000000 to 0x0003bfff...
Flash params set to 0x0240
Compressed 242048 bytes to 125538...
Wrote 242048 bytes (125538 compressed) at 0x00000000 in 11.3 seconds (effective 172.0 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
Connected
Initializing LCD SPI port.

                          esp32s3_bringup(): end.

NuttShell (NSH) NuttX-12.13.0
nsh> uname -a
NuttX 12.13.0 ea2b29736c Apr 14 2026 04:21:00 xtensa esp32s3-ws-lcd128
nsh> ?
help usage:  help [-v] [<cmd>]

    .           cp          expr        mount       kill        uname
    [           cmp         false       mv          pkill       umount
    ?           dirname     fdinfo      pidof       sleep       unset
    alias       df          free        printf      usleep      uptime
    unalias     dmesg       help        ps          source      watch
    basename    echo        hexdump     pwd         test        xd
    break       env         ls          rm          time        wait
    cat         exec        mkdir       rmdir       true
    cd          exit        mkrd        set         truncate

Builtin Apps:
    dd        nsh       ostest    sh

nsh> free
      total       used       free    maxused    maxfree  nused  nfree name
     381832       6984     374848       7352     374848     30      1 Umem

nsh> ostest
stdio_test: write fd=1
stdio_test: Standard I/O Check: printf
stdio_test: write fd=2
stdio_test: Standard I/O Check: fprintf to stderr
ostest_main: putenv(Variable1=BadValue3)
(..)

End of test memory usage:
VARIABLE  BEFORE   AFTER
======== ======== ========
arena       5d388    5d388
ordblks         5        5
mxordblk    542e0    542e0
uordblks     47e8     47e8
fordblks    58ba0    58ba0

Final memory usage:
VARIABLE  BEFORE   AFTER
======== ======== ========
arena       5d388    5d388
ordblks         1        5
mxordblk    58c38    542e0
uordblks     4750     47e8
fordblks    58c38    58ba0
user_main: Exiting
ostest_main: Exiting with status 0

@cederom cederom self-assigned this Apr 14, 2026
@cederom cederom added Arch: xtensa Issues related to the Xtensa architecture Board: xtensa labels Apr 14, 2026
@github-actions github-actions bot added Area: Build system Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces. and removed Arch: xtensa Issues related to the Xtensa architecture labels Apr 14, 2026
jerpelea
jerpelea previously approved these changes Apr 14, 2026
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have related defconfig or options that added on boards/xtensa/esp32s3/esp32s3-devkit/configs/txtable/defconfig? If not, it is better to remove.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed! :-)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not see esp32s3_qmi8658.c, please check other files too

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated, added qmi8658 configuration for testing, did not use it myself yet :-)

Copy link
Copy Markdown
Contributor

@eren-terzioglu eren-terzioglu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding new esp based board. Nice work, congrats

Comment on lines +6 to +36
if ARCH_BOARD_ESP32S3_WS_LCD128

choice
prompt "BOARD VARIANT"
default ARCH_BOARD_ESP32S3_WS_LCD128_NOTOUCH
help
There are two variants of the board with [1] and without [2] touch screen.
These boards also have slightly different signals and capabilities.
Non-touch variant has two connectors with many more GPIO available.

[1] https://www.waveshare.com/esp32-s3-touch-lcd-1.28.htm
[2] https://www.waveshare.com/esp32-s3-lcd-1.28.htm

NOTE: Touch screen driver is not yet implemented!

config ARCH_BOARD_ESP32S3_WS_LCD128_NOTOUCH
bool "NO-TOUCH ESP32-S3-LCD-1.28"
select LCD
help
Mark this choice if your board has no touch screen module installed.
www.waveshare.com/esp32-s3-lcd-1.28.htm

config ARCH_BOARD_ESP32S3_WS_LCD128_TOUCH
bool "TOUCH ESP32-S3-Touch-LCD-1.28"
help
Mark this choice if your board has touch screen module installed.
www.waveshare.com/esp32-s3-touch-lcd-1.28.htm

NOTE: Touch screen driver is not yet implemented!

endchoice
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @cederom , please correct the style of the Kconfig files.

  • add TAB
  • help -> ---help---

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed thanks! :-)

* Name: board_lcd_getdev
*
* Description:
* Return a a reference to the LCD object for the specified LCD. This
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small typo

Suggested change
* Return a a reference to the LCD object for the specified LCD. This
* Return a reference to the LCD object for the specified LCD. This

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed thanks! :-)

}
else
{
lcdinfo("SPI port %d bound to LCD %d\n", DISPLAY_SPI, devno);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep using syslog instead of lcdinfo, as you use syslog right above.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to syslog.. but other implementations use lcdifo as this is part of lcd debug wrappers :-) Can update as needed in future too :-)


syslog(LOG_INFO, "Initializing LCD SPI port.");

lcdinfo("Initializing SPI port %d\n", DISPLAY_SPI);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I prefer to stick with syslog at board level instead of mixing syslog and lcdinfo. Either way we should stick to one

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated, as above :-)

CONFIG_DEBUG_FULLOPT=y
CONFIG_DEBUG_GPIO=y
CONFIG_DEBUG_GPIO_ERROR=y
CONFIG_DEBUG_LCD=y
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See if all those debug options are needed for the defconfig

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed! leftover from testing thanks! :-)

CONFIG_DEBUG_ASSERTIONS_EXPRESSION=y
CONFIG_DEBUG_FEATURES=y
CONFIG_DEBUG_FULLOPT=y
CONFIG_DEBUG_GPIO=y
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See if all those debug options are needed for this defconfig

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed! leftover from testing thanks! :-)

@fdcavalcanti
Copy link
Copy Markdown
Contributor

Thank you @cederom!

…IP).

* Initial experimental / work in progress implementation.
* New board name is esp32s3-ws-lcd128.
* Supports Kconfig delectable w/wo touch variants (gpios difference).
* Supported configurations: nsh, ostest, coremark, touch-lvgl, notouch-lvgl,
  qmi8658, watchdog.
* Does not have touch panel driver yet.
* Board documentation.

Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
@cederom cederom force-pushed the cederom-202603-esp32s3-ws-lcd128 branch from ea2b297 to 185263d Compare April 14, 2026 14:24
@cederom
Copy link
Copy Markdown
Contributor Author

cederom commented Apr 14, 2026

Updated, thank you for checking folks! :-)

Ah, typos and formatting, will update in few hours, have to go out now, sorry! <3


config ARCH_BOARD_ESP32S3_WS_LCD128_TOUCH
bool "TOUCH ESP32-S3-Touch-LCD-1.28"
help
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
help
---help---

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aaargh mea cupla o_O

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Build system Board: xtensa Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

5 participants