Skip to content
php-baremetal REGISTRY
Publish a package

php-baremetal/boards-waveshare

bm-boards MIT

Board files of the Waveshare for php-baremetal: chip, memory, console and the on-board peripherals with their pins.

needs no platform HAL

Package · Boards

Waveshare boards

The board files of 9 Waveshare ESP32-S3 and ESP32-P4 boards, read by the esp32 SDK from boards/esp32/ once the package is installed. No code, no requirements.

boards-waveshare is a board package (Composer type bm-boards): a set of board files and nothing else. A project that requires it can name any of its boards in extra.baremetal.board, as it names a board of the SDK. The esp32 SDK reads the files in boards/esp32/ and checks each one against its chips, exactly as it checks its own boards.

Requirements

None. The package requires neither the SDK nor any driver, and its composer.json has no extra.baremetal. Whether a board fits the SDK in use is decided when the SDK loads it: a board that names a chip, a PSRAM type or a block type the SDK does not support stops the build with a message that starts with the package and the file (php-baremetal/boards-waveshare: boards/esp32/<file>.json: ...).

Install

bash in the project folder
composer require php-baremetal/boards-waveshare

phpbm init lists these boards next to the SDK's (the SDK names this package in board-packages of its sdk.json) and, when you pick one, writes the package into the project's require and proposes the drivers of the board's blocks. The conductor installs the package into .phpbm/packages/ and writes it into the manifest; the build compiles nothing of it.

json composer.json
{
  "name": "acme/eth-demo",
  "type": "project",
  "repositories": [
    { "type": "composer", "url": "https://repository.php-baremetal.com", "canonical": true }
  ],
  "require": {
    "php-baremetal/conductor": "^1.0",
    "php-baremetal/boards-waveshare": "^1.0",
    "php-baremetal/ext-sys": "^1.0"
  },
  "config": {
    "allow-plugins": { "php-baremetal/conductor": true },
    "platform": { "php": "8.5.13" }
  },
  "extra": {
    "baremetal": {
      "sdk": "esp32@^2.0",
      "board": "waveshare-esp32-s3-eth",
      "runtime": "web-server",
      "storage": "embedded"
    }
  }
}

Boards

Board id Product Chip PSRAM Flash Blocks
waveshare-esp32-s3-eth Waveshare ESP32-S3-ETH ESP32-S3 octal 16 MB microsd spi, network w5500
waveshare-esp32-s3-touch-lcd-1.85b Waveshare ESP32-S3-Touch-LCD-1.85B ESP32-S3 octal 16 MB microsd spi, network wifi, display st77916, i2c i2c, touch cst816s
waveshare-esp32-s3-touch-lcd-5b Waveshare ESP32-S3-Touch-LCD-5B ESP32-S3 octal 16 MB network wifi, i2c i2c, expander ch422g, display rgb, touch gt911
waveshare-esp32-s3-zero Waveshare ESP32-S3-Zero ESP32-S3 quad 4 MB network wifi, led ws2812
waveshare-esp32-s3-zero-n8r8 Waveshare ESP32-S3-Zero (N8R8) ESP32-S3 octal 8 MB network wifi, led ws2812
waveshare-esp32-p4-eth Waveshare ESP32-P4-ETH ESP32-P4 hex 32 MB microsd sdio, network emac
waveshare-esp32-p4-pico Waveshare ESP32-P4-Pico ESP32-P4 hex 32 MB microsd sdio
waveshare-esp32-p4-wifi6 Waveshare ESP32-P4-WIFI6 ESP32-P4 hex 32 MB microsd sdio, network wifi-c6
waveshare-esp32-p4-wifi6-touch-lcd-5 Waveshare ESP32-P4-WIFI6-Touch-LCD-5 ESP32-P4 hex 32 MB microsd sdio, network wifi-c6, i2c i2c, display dsi, touch gt911
Every board has external PSRAM. The P4 boards set revision: v1, except the ESP32-P4-WIFI6-Touch-LCD-5, which
has v3 silicon and sets v3.

Catalog

boards/catalog.json gives, for each board, the Waveshare documentation page (docs) and a product photo (photo), both online URLs, grouped by SDK name and keyed by board id. The package registry site uses it to link and show the boards; the build does not read it, and it sits outside boards/esp32/, so the SDK does not take it for a board.

Blocks and their drivers

A board's microsd and network blocks are handled by the SDK itself (storage microsd, wired networks brought up before PHP starts). The other blocks are read by driver packages, which the project requires itself: a block without its driver is left alone. The drivers name the blocks they handle in extra.baremetal.board-blocks.

Block Type Package Boards
network wifi, wifi-c6 ext-wifi (to connect from PHP) ESP32-S3-Touch-LCD-1.85B, ESP32-S3-Touch-LCD-5B, ESP32-S3-Zero, ESP32-S3-Zero (N8R8), ESP32-P4-WIFI6, ESP32-P4-WIFI6-Touch-LCD-5
i2c i2c ext-i2c ESP32-S3-Touch-LCD-1.85B, ESP32-S3-Touch-LCD-5B, ESP32-P4-WIFI6-Touch-LCD-5
display st77916 esp32-display-st77916 ESP32-S3-Touch-LCD-1.85B
display rgb php-baremetal/esp32-display-rgb ESP32-S3-Touch-LCD-5B
display dsi php-baremetal/esp32-display-dsi ESP32-P4-WIFI6-Touch-LCD-5
touch cst816s touch-cst816s ESP32-S3-Touch-LCD-1.85B
touch gt911 touch-gt911 ESP32-S3-Touch-LCD-5B, ESP32-P4-WIFI6-Touch-LCD-5
expander ch422g io-ch422g ESP32-S3-Touch-LCD-5B
led ws2812 led-ws2812 ESP32-S3-Zero, ESP32-S3-Zero (N8R8)

Board ids

The id is the file name without .json. If another source installed in the project (the SDK or another board package) defines the same id, the short id is refused and the message names both sources; the long form picks this package: "board": "php-baremetal/boards-waveshare:waveshare-esp32-s3-eth".

A project changes the pins of a block, or adds a block, with board overrides, without editing the file.

Related