Expand description
Board support crate for the M5Stack Fire27 (ESP32) and CoreS3 (ESP32-S3).
Provides chip-agnostic peripheral drivers (driver), a shared async I2C
bus and reusable embassy-based IO task loops (io), and board bring-up
helpers (board).
The crate also owns the board/chip boilerplate a binary would otherwise
hand-roll, so a consumer’s main collapses to a thin entry shell:
mem::init_heap— the global heap (esp-alloc DRAM regions + HIL-proven per-board sizes;heapfeature, implied bypsram).io::console::install— one-call logging over the chip’s native transport (UART0 / USB-Serial-JTAG CDC) + an RTC panic breadcrumb (io::console::take_panic_breadcrumb) + (app-descfeature) the firmware identity, logged once as the very first BSP-emitted line.- the
panic-handlerfeature exports the#[panic_handler], andapp_desc!the esp-idf app descriptor (app-descfeature, implied byheap) — plusapp_elf_sha256, and, underidentity, an enforced build-time git identity inapp_desc!()’s version field (see the README’s “Firmware identity” section). board::run_app_core— the second-core harness (multicorefeature).io::input_caps— the board’s input model (keypad vs pointer), so a UI installs the matching indev without hardcoding the board.
Exactly one board feature must be enabled: fire27 (xtensa-esp32) or
cores3 (xtensa-esp32s3). Radio (ble/wifi/wifi-sta/coex), heap/
psram/app-desc/identity, console-serial, panic-handler, and
multicore are orthogonal opt-ins. See the README for the full feature
matrix and usage examples.
Modules§
- board
- Board-level bring-up: pin wiring ([
cores3::Board]/fire27::Board), display + SD shared-bus sequences (spi2,display), and bring-up orchestration across drivers. - driver
- io
- mem
- Global heap ownership + external PSRAM integration.
Macros§
- app_
desc - Emit the esp-idf application descriptor. Invoke once in the binary (not
the BSP) so it captures the application’s
CARGO_PKG_VERSION. Thin wrapper overesp_bootloader_esp_idf::esp_app_desc!so the binary keeps a singlem5stack_core::app_desc!();line instead of naming the bootloader crate. - must_
spawn - Replaces embassy-executor’s
Spawner::must_spawn, dropped in 0.10: panics on pool exhaustion with call-site context. Works forSpawnerandSendSpawner.
Functions§
- app_
desc - Reads back the descriptor
app_desc!emits. - app_
elf_ sha256 - The ELF’s content hash, straight from the esp-idf application descriptor —
the first bytes distinguish two images built from the same commit with
different uncommitted edits. Unambiguous with no consumer input needed: it
is a function of the linked image, computed and patched in by
espflash. Requiresapp_desc!to have been invoked (seeapp_desc()).