Skip to content

Add ONX2432G028 board support - #1307

Open
weiweihaoyouwei wants to merge 1 commit into
justcallmekoko:masterfrom
OpenNextion:add-ONX2432G028-support
Open

Add ONX2432G028 board support#1307
weiweihaoyouwei wants to merge 1 commit into
justcallmekoko:masterfrom
OpenNextion:add-ONX2432G028-support

Conversation

@weiweihaoyouwei

Copy link
Copy Markdown

Pull Request: Add ONX2432G028 board support

Summary

This PR adds support for the ONX2432G028 ESP32-S3 development board to ESP32 Marauder.

The board uses an ESP32-S3R8 module with a 2.8 inch 240 x 320 ST7789 SPI TFT panel, CST826 I2C capacitive touch controller, and a PCF8574 I2C IO expander for LCD reset and SDCS control.

Board reference: OpenNextion/OpenNextion-SKU-ONX2432G028

Hardware

Item Value
Board ONX2432G028
MCU ESP32-S3R8
Flash 16 MB
PSRAM 8 MB OPI PSRAM
Display 2.8 inch ST7789 SPI TFT
Resolution 240 x 320
Display color order BGR, validated with red/green/blue/gray color test
Touch CST826 I2C capacitive touch
IO expander PCF8574 I2C, used for LCD reset and SDCS
SD card 1-bit SDMMC

Pin mapping

Function GPIO / Expander pin
I2C SDA GPIO 8
I2C SCL GPIO 7
SPI SCLK GPIO 5
SPI MOSI GPIO 1
LCD CS GPIO 2
LCD DC GPIO 3
LCD Backlight GPIO 6
LCD Reset PCF8574 EXIO6
Touch INT PCF8574 EXIO5, optional; polling works
SD CLK GPIO 11
SD CMD GPIO 10
SD D0 GPIO 9
SDCS PCF8574 EXIO7

Changes

  • Added MARAUDER_ONX2432G028 board target and hardware name.
  • Added User_Setup_onx2432g028.h for the ST7789 TFT panel and ONX2432G028 pin mapping.
  • Added PCF8574-based LCD reset handling because the panel reset line is not connected to a direct ESP32-S3 GPIO.
  • Added CST826 I2C capacitive touch support using the shared I2C bus.
  • Added ONX-specific full-screen menu geometry while preserving the existing three-zone virtual navigation behavior.
  • Added 1-bit SDMMC support for the onboard SD card slot.
  • Updated SD-backed log/PCAP/GPX file handling to use SD_MMC for ONX SDMMC boards.
  • Added GitHub Actions build matrix entries for release and nightly ONX2432G028 firmware artifacts.
  • Adjusted the WPA3 Enterprise auth-mode guard so Arduino-ESP32 2.0.11 builds do not reference an unavailable enum.

Validation

Validated locally with:

  • Arduino core: esp32:esp32 2.0.11
  • Board FQBN: esp32:esp32:esp32s3
  • Flash: 16 MB
  • Partition layout used for validation: default_8MB
  • PSRAM: PSRAM=opi
  • GitHub Actions target artifact suffix: _onx2432g028.bin
  • GitHub Actions matrix uses Arduino core 2.0.11, NimBLE-Arduino 1.3.8, PartitionScheme=default_8MB, FlashSize=16M, PSRAM=opi, and UART0 upload/serial settings.

Runtime validation:

  • Firmware boots without reboot loops.
  • Serial log reaches the ESP32 Marauder CLI prompt.
  • ST7789 display initializes correctly at 240 x 320.
  • ST7789 color order is BGR; red, green, blue, and gray ramp were validated with a temporary color test firmware.
  • CST826 touch input works with the full-screen touch menu.
  • SD card mounts through 1-bit SDMMC after formatting as FAT32.
  • SD card root directory can be listed from the ESP32 Marauder CLI.
  • SCRIPTS directory is created on SD card during initialization.
Build log excerpt
Target: ONX2432G028
FQBN: esp32:esp32:esp32s3:PartitionScheme=default_8MB,FlashSize=16M,PSRAM=opi,CDCOnBoot=default,UploadMode=default
Build flags: -DMARAUDER_ONX2432G028
TFT setup: User_Setup_onx2432g028.h

Sketch uses 1397409 bytes (41%) of program storage space. Maximum is 3342336 bytes.
Global variables use 60812 bytes (18%) of dynamic memory, leaving 266868 bytes for local variables. Maximum is 327680 bytes.
Serial boot and SD log excerpt
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x44c
load:0x403c9700,len:0xbe4
load:0x403cc700,len:0x2a68
entry 0x403c98d4
ESP-IDF version is: v4.4.5
Evil Portal Found 0 HTML files
Finished settings nodes
Changing to main menu...

[ASCII banner omitted]

--------------------------------
         ESP32 Marauder
            v1.12.2
       By: justcallmekoko
--------------------------------

> ls /
.fseventsd        0
.Spotlight-V100   0
SCRIPTS           0

Notes for reviewers

This PR adds a dedicated GitHub Actions build target for ONX2432G028, so maintainers can verify the firmware build without local hardware.

Most ONX-specific behavior is guarded by MARAUDER_ONX2432G028, HAS_ONX_CST826_TOUCH, or HAS_ONX_SD_MMC, so existing board targets should not enter the new display/touch/reset/SDMMC paths.

The ONX2432G028 target uses PSRAM=opi and keeps CDCOnBoot=default / UploadMode=default for the board's UART0 USB-UART upload and serial logging path.

Demo

A short runtime demo video is available here:

ONX2432G028.mp4

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