Skip to content
php-baremetal REGISTRY
Publish a package

php-baremetal/boards-seeed

bm-boards MIT

Board files of the Seeed Studio XIAO boards for php-baremetal: chip, memory, console, pin names and the on-board peripherals with their pins.

needs no platform HAL

Boards

The board files of 1.0.0, one folder per SDK. Require the package, then name a board in extra.baremetal.board.

ESP32 · 1 board official

The board files of the Seeed Studio XIAO ESP32-S3 for php-baremetal: chip, PSRAM, flash, console, the names of its pins (D0–D10, A0–A10, T1–T9, the user LED) and the on-board peripherals (Wi-Fi, I2C) with their pins. It is a board package (Composer type bm-boards): it holds board files only, and the esp32 SDK reads them from boards/esp32/ once the package is installed in the project.

Install

bash
composer require php-baremetal/boards-seeed

phpbm init adds it by itself when you pick one of its boards. Then name the board in composer.json:

json
"extra": {
    "baremetal": {
        "sdk": "esp32@^2.0",
        "board": "seeed-xiao-esp32s3",
        "runtime": "init-loop",
        "storage": "embedded"
    }
}

The package requires nothing: not the SDK, not the drivers. The SDK checks every board against its chips when it loads them. The drivers of the blocks are separate packages, listed per board in the documentation; phpbm init proposes them.

Pin names

The board file names the pins as they are printed on the board. PHP reads them as constants worth the GPIO number: Baremetal\Board\Pin::D10 is 9, and with the SDK option board-constants: global plain D10 works too.

php
<?php
use Baremetal\Board\Pin;

function setup(): void
{
    gpio_mode(Pin::LED_BUILTIN, GPIO_OUTPUT); // ext-gpio
}

function loop(int $tick): void
{
    gpio_write(Pin::LED_BUILTIN, $tick % 2);   // the user LED is on when the pin is low
    delay(500);                                // ext-sys
}

The full table is in the board page.

Boards

Board id Product Chip
seeed-xiao-esp32s3 Seeed Studio XIAO ESP32-S3 ESP32-S3

boards/catalog.json gives, for each board, the Seeed Studio wiki page (docs) and a product photo (photo), both online URLs, grouped by SDK. The package registry site uses it to link and show the boards; the build does not read it.

Documentation

License

MIT.

This package is not made or endorsed by Seeed Studio; it describes Seeed Studio boards for use with php-baremetal.

Read the full documentation