Skip to content

feat(esp32p4-function-ev-board): Add new BSP component for ESP32P4 Function Evaluation Board and the associated LCD board#649

Merged
finger563 merged 9 commits into
mainfrom
feat/esp32p4-function-ev-board
Jun 25, 2026
Merged

feat(esp32p4-function-ev-board): Add new BSP component for ESP32P4 Function Evaluation Board and the associated LCD board#649
finger563 merged 9 commits into
mainfrom
feat/esp32p4-function-ev-board

Conversation

@finger563

@finger563 finger563 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a new espp::Esp32P4FunctionEvBoard Board Support Package for the Espressif ESP32-P4 Function EV Board used with the ESP32-P4-HMI-Subboard, plus a full-featured example. The BSP follows the same singleton pattern as the existing
board BSPs (e.g. m5stack-tab5) and brings up all on-board peripherals:

  • MIPI-DSI display with a Kconfig-selectable panel — EK79007 (1024×600) or ILI9881C (800×1280) — and LVGL integration (with software rotation).
  • GT911 capacitive multi-touch (polled; the touch INT is not routed on this board).
  • ES8311 audio codec (+ NS4150B speaker amp) over I2S.
  • 10/100 Ethernet (internal EMAC + IP101 RMII PHY) with DHCP.
  • microSD (4-bit SDMMC).
  • BOOT button, MIPI-CSI camera pins (capture pipeline stubbed).

Supporting additions:

  • New EK79007 MIPI-DBI panel driver in display_drivers (ek79007.hpp).
  • Example demonstrating the display/touch (draw circles + click sounds), on-screen status read-out, microSD, audio, Ethernet, an RTPS publisher on espp/test/counter, and a Ping-based connectivity self-test.

Two board-specific gotchas are handled and documented:

  • The LCD adapter's RST_LCD/PWM must be jumpered to the P4 main board (RST_LCD→J1 GPIO27, PWM→J1 GPIO26) or the screen stays black.
  • The BOOT button (GPIO35) is shared with Ethernet RMII TXD1 — claiming it as a GPIO input takes down Ethernet TX. initialize_button() now refuses (returns false) when Ethernet is active rather than silently breaking the network,
    and the constraint is documented at the pin definition and in the class doc.

Motivation and Context

espp had no BSP for the ESP32-P4 Function EV Board, which is a common P4 dev platform (MIPI-DSI HMI, Ethernet, camera, audio, microSD). This provides a ready-to-use, single-header interface to the board and a worked example covering the
display, touch, audio, networking, and RTPS, matching the pattern of the other board BSPs.

How has this been tested?

  • Built with ESP-IDF v6.0.1 for target esp32p4 (idf.py set-target esp32p4 && idf.py build); builds clean.
  • Tested on real hardware (ESP32-P4 Function EV Board + ESP32-P4-HMI-Subboard) with the 7.5" EK79007 panel (ILI9881C path is Kconfig-selectable):
    • Display + LVGL UI, touch-to-draw circles, screen-rotation button.
    • ES8311 audio (click sound on touch).
    • microSD detection.
    • Ethernet: DHCP lease, ICMP ping to gateway and peer (0% loss), and RTPS participant discovery + publish to a peer subscriber on a wired LAN.
  • Verified the BOOT-button/RMII-TXD1 handling: initialize_button() returns false and logs while Ethernet is up; Ethernet TX stays healthy.

Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):

Console (Ethernet + RTPS bring-up):

I (1352) main_task: Calling app_main()
[ESP32-P4 Function EV Board Example/I][1.355]: Starting example!
[ESP32-P4 Function EV Board Example/I][1.363]: Display panel: EK79007
[ESP32-P4 Function EV Board Example/I][1.388]: Found 2 I2C device(s)
[Esp32P4FunctionEvBoard/I][1.388]: Initializing LCD (MIPI-DSI)
[Esp32P4FunctionEvBoard/I][1.390]: Performing LCD hardware reset on GPIO27
[Esp32P4FunctionEvBoard/I][1.529]: Creating MIPI DSI bus (2 lanes, 900 Mbps/lane)
[Esp32P4FunctionEvBoard/I][1.530]: Installing MIPI DSI DBI panel IO
[Esp32P4FunctionEvBoard/I][1.532]: Using display panel: EK79007 (1024x600)
[Esp32P4FunctionEvBoard/I][1.540]: Creating DPI panel (1024x600 @ 52 MHz)
[Esp32P4FunctionEvBoard/I][1.675]: LCD initialization completed (EK79007)
[Esp32P4FunctionEvBoard/I][1.675]: Initializing LVGL display with pixel buffer size: 51200 pixels
[Display/W][1.680]: No rotation callback provided, resolution changed event will not automatically update the display hardware rotation.
[Esp32P4FunctionEvBoard/I][1.695]: LVGL display initialized
[Esp32P4FunctionEvBoard/I][1.703]: Initializing GT911 multi-touch controller
[Esp32P4FunctionEvBoard/I][1.707]: Using GT911 at address 0x5D
[Esp32P4FunctionEvBoard/I][1.713]: Touch in interrupt mode (GT911 INT on GPIO33)
[Esp32P4FunctionEvBoard/I][1.721]: Touch controller initialized
[Esp32P4FunctionEvBoard/I][1.762]: Initializing SD card (4-bit SDMMC)
E (1790) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107
HINT: Please reboot the board and then try again
E (1790) vfs_fat_sdmmc: sdmmc_card_init failed (0x107).
HINT: Please verify if there is an SD card inserted into the SD slot. Then, try rebooting the board.
E (1791) vfs_fat_sdmmc: esp_vfs_fat_sdmmc_sdcard_init failed (0x107).
[Esp32P4FunctionEvBoard/W][1.797]: Failed to initialize the card (ESP_ERR_TIMEOUT). Make sure an SD card is inserted.
[ESP32-P4 Function EV Board Example/W][1.808]: No SD card mounted
[Esp32P4FunctionEvBoard/I][1.819]: Initializing audio (ES8311) at 44100 Hz
W (1822) i2s_common: dma frame num is adjusted to 256 to align the dma buffer with 64, bufsize = 512
I (1833) DRV8311: ES8311 in Slave mode
[ESP32-P4 Function EV Board Example/I][1.843]: Loaded 35875 bytes of click audio @ 44100 Hz
[Esp32P4FunctionEvBoard/I][1.843]: Initializing Ethernet (EMAC + IP101 EMAC)
[Esp32P4FunctionEvBoard/I][1.850]: Creating ESP32 EMAC
[Esp32P4FunctionEvBoard/I][1.857]: Creating generic PHY (IP101)
[Esp32P4FunctionEvBoard/I][1.862]: Installing Ethernet driver
I (2410) esp_eth.netif.netif_glue: 60:55:f9:f9:49:a1
I (2410) esp_eth.netif.netif_glue: ethernet attached to netif
[Esp32P4FunctionEvBoard/I][4.610]: Ethernet started
[Esp32P4FunctionEvBoard/I][4.610]: Ethernet initialized; waiting for link/DHCP
[Esp32P4FunctionEvBoard/I][4.612]: Ethernet link up: 100 Mbps, full duplex
[Esp32P4FunctionEvBoard/E][4.619]: BOOT button shares GPIO35 with Ethernet RMII TXD1; refusing to initialize it while Ethernet is up (it would kill Ethernet TX).
[ESP32-P4 Function EV Board Example/I][4.637]: BOOT button not initialized (shared with Ethernet RMII TXD1 pin)
I (6758) esp_netif_handlers: eth ip: 192.168.1.31, mask: 255.255.255.0, gw: 192.168.1.1
[Esp32P4FunctionEvBoard/I][6.758]: Ethernet got IP: 192.168.1.31
[ESP32-P4 Function EV Board Example/I][6.761]: Ethernet IP: 192.168.1.31
[ESP32-P4 Function EV Board Example/I][6.770]: Got IP 192.168.1.31, starting RTPS participant
[ESP32-P4 Function EV Board Example/I][10.905]: === Connectivity self-test (ping) ===
[ESP32-P4 Function EV Board Example/I][10.905]: Pinging gateway (192.168.1.1)...
[ESP32-P4 Function EV Board Example/I][10.912]:   gateway: seq=1207959553 ttl=1341597504 time=0ms (64 bytes)
[ESP32-P4 Function EV Board Example/I][11.411]:   gateway: seq=1207959554 ttl=1341597504 time=0ms (64 bytes)
[ESP32-P4 Function EV Board Example/I][11.910]:   gateway: seq=1207959555 ttl=1341597504 time=0ms (64 bytes)
[ESP32-P4 Function EV Board Example/I][12.410]:   gateway: seq=1207959556 ttl=1341597504 time=0ms (64 bytes)
[ESP32-P4 Function EV Board Example/I][12.910]: Ping gateway (192.168.1.1): 4/4 received, 0% loss, avg 0 ms
[ESP32-P4 Function EV Board Example/W][12.910]: Ping self-test: no RTPS peer discovered yet to ping
[ESP32-P4 Function EV Board Example/I][12.918]: === Connectivity self-test done ===
image
Esp32p4-Ethernet-Rtps-To-Windows-Wsl-compressed.mp4

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Hardware (schematic, board, system design) change
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • I have added tests to cover my changes.
  • I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • All new and existing tests passed.
  • My code follows the code style of this project.

…unction Evaluation Board` and the associated LCD board
@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown

✅Static analysis result - no issues found! ✅

@finger563 finger563 self-assigned this Jun 25, 2026
@finger563 finger563 merged commit df7a65c into main Jun 25, 2026
117 checks passed
@finger563 finger563 deleted the feat/esp32p4-function-ev-board branch June 25, 2026 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant