Board Support Packages
Section titled “Board Support Packages”Overview
Section titled “Overview”The Board Support Packages super-module groups everything under boards/ — the per-board adaptations that let a single firmware codebase run on 18 different hardware targets, from headless WiFi-to-serial bridges and 1.47” status displays to full-featured touchscreen pendants.
Each board directory follows a common three-layer structure:
components/bsp/— the hardware abstraction consumed by the main firmware:board_init.c/board_config.himplement a common C interface (display panel configuration, LVGL setup, touch/button/encoder input registration, backlight and activity management) so the application layer never touches hardware directly.Factory/— a standalone recovery application flashed to a dedicatedfactorypartition. It can boot OTA partitions, flashesp3dfw.binfirmware andui_resources.binfrom an SD card, and restoreotadataso a failed update always rolls back safely. It is deliberately minimal (self-contained C drivers, no LVGL, no esp3d framework).build_scripts/— Python tooling (build_one.py,variants.py,common.py) that assembles the per-board firmware variants (flash size, transport options) and produces flashable packages.
Related super-modules:
- Hardware_Peripheral_Drivers — the shared display/touch/input drivers the BSPs configure
- Build_&_Development_Tools — repository-wide tooling (the board build scripts follow the same patterns)
Architecture Overview
Section titled “Architecture Overview”Supported Boards
Section titled “Supported Boards”Full pendants (display + touch + physical controls)
| Board | Display | Bus | Touch | Extra inputs |
|---|---|---|---|---|
| pibot_pendant_v1_0 (ESP32) | ILI9341 320×240 | SPI | FT6336U | 3 buttons, rotary encoder, 4-pos switch, potentiometer, buzzer |
Display + touch boards (touch-only input)
| Board | Display | Bus | Touch |
|---|---|---|---|
| dlc32_max_lcd (ESP32) | ST7796 3.5″ 480×320 | SPI | capacitive |
| esp32_2432s028r “CYD” (ESP32) | ILI9341 2.8″ | SPI | XPT2046 resistive |
| esp32_3248s035c (ESP32) | 3.5″ IPS | SPI | GT911 capacitive |
| esp32_3248s035r (ESP32) | 3.5″ | SPI | XPT2046 resistive |
| esp32s3_4827s043c | ILI9485 4.3″ 480×272 | RGB parallel | GT911 |
| esp32s3_8048s043c | ST7262 4.3″ 800×480 | RGB parallel | GT911 |
| esp32s3_8048s050c | ST7262 5″ 800×480 | RGB parallel | GT911 |
| esp32s3_8048s070c | EK9716 7″ 800×480 | RGB parallel | GT911 |
| esp32s3_8048_touch_lcd_7 | ST7262 7″ 800×480 | RGB parallel | capacitive (SD CS via CH422G expander) |
| esp32s3_bzm_tft35_gt911 | ST7796 3.5″ 480×320 | SPI | GT911 |
| esp32s3_hmi43v3 | RM68120 4.3″ 800×480 | I80 | FT5x06 (+ TCA9554 IO expander) |
| esp32s3_zx3d50ce02s_usrc_4832 | ST7796 3.5″ 480×320 | I80 | FT5x06 |
Small status displays (Small UI tier, ESP32-S3, 16 MB flash + PSRAM)
| Board | Display | Touch | UI |
|---|---|---|---|
ESP32_S3_TOUCH_LCD_1_47 (Waveshare ESP32-S3-Touch-LCD-1.47) | JD9853 1.47” 172×320, SPI | AXS5106L | Basic read-only dashboard (UI_TIER=SMALL, see UI_Framework_&_Screens) |
ESP32_S3_LCD_1_47B (Waveshare ESP32-S3-LCD-1.47B) | ST7789 1.47” 172×320, SPI | none (BOOT key = page button) | Same basic dashboard |
Both boards: SD card over SDIO 4-bit, native USB with optional USB CDC device client (sdkconfig.usb_cdc_device), one build variant (16mb_wifi_fluidnc), no factory app. A BOARD_DISPLAY_TEST option runs a hardware bring-up test of the LCD (and touch) from board_init() instead of the UI. No codewiki page per board yet (added after the generation).
Headless bridges (no display, no LVGL)
| Board | Role |
|---|---|
| esp32_c3_bare (ESP32-C3) | Minimal WiFi-to-serial bridge between a CNC controller (UART) and a remote Web UI |
| esp32_s3_wroom_cam (ESP32-S3, 16 MB flash / 8 MB PSRAM) | WiFi CNC bridge with optional camera streaming, USB OTG |
| fysetc_wifi_pro | WiFi bridge module; BSP is a minimal stub satisfying the common interface |
The Factory / Recovery Pattern
Section titled “The Factory / Recovery Pattern”All display boards ship a recovery stack with two variants of increasing sophistication:
- Simple factory app (most boards): a self-contained menu driven by touch (or buttons) that flashes firmware and UI resources from SD card and manages OTA partition selection — see for example esp32s3_8048s050c_factory.
- Custom bootloader + factory app (pibot_pendant_v1_0_bootloader + pibot_pendant_v1_0_factory_app): holding a button at boot makes the bootloader back up
otadatato a raw flash sector, erase it, and jump to the factory partition; the factory app restoresotadataon exit, so a power cut mid-recovery can never brick the device.
RGB-parallel boards additionally need bsp_accessFs / bsp_releaseFs guards to arbitrate SD-card vs. display access on the shared bus; SPI-display boards (e.g. pibot) do not.
The two 1.47” boards have no factory app (FACTORY_VARIANTS = {} in their variants.py).
PiBot 8 MB layout since a14: two 3 MB OTA slots (app0 0x20000, app1 0x320000), ui_resources 256 KB at 0x620000, flashfs 0x660000; the factory image is flashed at 0x780000 (see pibot_pendant_v1_0_factory_app).
Build System
Section titled “Build System”Every board carries a build_scripts/ package (build_one.py, common.py, variants.py) that drives idf.py through the board’s variant matrix — flash size (4/8/16 MB), transport (serial, BT serial, BLE), and target firmware (FluidNC / grblHAL / grbl) — then assembles flashable packages. The shared logic (clean build dirs, size reports, flash maps, installer directories) lives in each board’s common.py, mirroring the repository-wide tooling documented in tools_build_scripts.
Cross-board configuration changes (a14)
Section titled “Cross-board configuration changes (a14)”- LVGL 9.6: its Kconfig defaults
LV_CONF_SKIPtoy, which would ignore each board’s tunedcomponents/bsp/lv_conf.h(LV_MEM_SIZE, feature set sized to the board DRAM budget) and fall back to LVGL’s much larger defaults. Every display board’s mainsdkconfig.*setsCONFIG_LV_CONF_SKIP=n(headless boards have no LVGL). - System event task stack raised from 2048 to 3072 bytes in the WiFi
sdkconfigfiles (PiBot, dlc32_max_lcd). - Factory
postbuild.cmake:appnow depends on thebootloadersub-build, because the post-build step copiesbootloader.binand a clean build could run the copy first and fail.
Module Map
Section titled “Module Map”- Small status displays:
ESP32_S3_TOUCH_LCD_1_47·ESP32_S3_LCD_1_47B(no page yet) - Headless bridges: esp32_c3_bare · esp32_s3_wroom_cam · fysetc_wifi_pro_bsp · fysetc_wifi_pro_build_scripts
- ESP32 display boards: dlc32_max_lcd · esp32_2432s028r · esp32_3248s035c · esp32_3248s035r
- ESP32-S3 display boards: esp32s3_4827s043c · esp32s3_8048s043c · esp32s3_8048s050c · esp32s3_8048_touch_lcd_7 · esp32s3_8048s070c_bsp · esp32s3_bzm_tft35_gt911_bsp · esp32s3_hmi43v3_bsp · esp32s3_zx3d50ce02s_usrc_4832_bsp
- PiBot Pendant v1.0: pibot_pendant_v1_0_bsp · pibot_pendant_v1_0_bootloader · pibot_pendant_v1_0_factory_app · pibot_pendant_v1_0_build_scripts
- Factory apps (per board): esp32_3248s035c_factory · esp32_3248s035r_factory · esp32s3_4827s043c_factory · esp32s3_8048s043c_factory · esp32s3_8048s050c_factory · esp32s3_8048_touch_lcd_7_factory · esp32s3_8048s070c_factory_app · esp32s3_bzm_tft35_gt911_factory_app · esp32s3_hmi43v3_factory_app · esp32s3_zx3d50ce02s_usrc_4832_factory_app