Files
imliubo fa153a8c82 boards: add M5Stack StickS3 board support
Add a complete board package under
application/basic_demo/boards/m5stack_sticks3/ for the
ESP32-S3-PICO-1-N8R8 based M5Stack StickS3.

Hardware:
  - 8 MB QIO flash @80MHz, 8 MB Octal PSRAM @80MHz
  - I2C0: SDA=47, SCL=48 (M5PM1 PMIC, ES8311 codec, BMI270 IMU)
  - I2S0 full-duplex: MCK=18, BCK=17, WS=15, DOUT=14, DIN=16
  - SPI3 LCD: MOSI=39, SCLK=40, CS=41, DC=45, RST=21
  - 1.14" ST7789 135x240 with (52,40) panel offset
  - Backlight on GPIO38 (active-high), LEDC PWM

Highlights:
  - M5PM1 PMIC modelled as a custom device; init sequence ported
    from M5GFX (disable I2C idle sleep, then bring up PYG2=LCD_PWR
    and PYG3=SPK_PA in push-pull output mode).
  - ES8311 declared as two audio_codec devices (DAC + ADC) sharing
    one I2C control line and one I2S port via YAML anchors,
    following the esp32_s3_korvo2l pattern.
  - ST7789 factory uses the IDF built-in esp_lcd_new_panel_st7789()
    and applies esp_lcd_panel_set_gap(52, 40) for the visible window.
  - ledc_backlight defaults to full duty (1023) so the panel is
    visible at boot — display.set_backlight() only toggles the
    LCD disp_on_off command and does not change LEDC duty.

Signed-off-by: imliubo <imliubo@makingfun.xyz>
2026-04-22 14:37:29 +08:00
..
2026-04-16 22:32:42 +08:00

basic_demo Guide

How It Works

The main entry point is application/basic_demo/main/main.c.

After the device boots, the overall flow is:

  1. Initialize NVS and load device settings
  2. Mount FATFS at /fatfs
  3. Initialize Wi-Fi and the local HTTP configuration service
  4. Enter app_claw_start()
  5. Initialize the event router, memory, skills, and capabilities
  6. Initialize and start claw_core
  7. Start the CLI and begin handling requests and events

The current runtime depends on the following local directories:

  • /fatfs/sessions: session history
  • /fatfs/memory/MEMORY.md: long-term memory
  • /fatfs/skills: skill documents and manifest
  • /fatfs/scripts: Lua scripts
  • /fatfs/router_rules/router_rules.json: automation rules
  • /fatfs/inbox: message attachment storage

The current basic_demo integrates the following capabilities:

  • cap_im_qq
  • cap_im_tg
  • cap_files
  • cap_lua
  • cap_mcp_client
  • cap_mcp_server
  • cap_skill_mgr
  • cap_time
  • cap_llm_inspect
  • cap_web_search

Quick Start

Prerequisites

  • ESP-IDF is installed and exported
  • ESP-IDF v5.5.4 is recommended
. <your-esp-idf-path>/export.sh

Configuration

To make esp-board-manager easier to use, first install the helper package with pip install esp-bmgr-assist. You only need to do this once in a given ESP-IDF environment.

  1. Generate board support files:
cd application/basic_demo
idf.py gen-bmgr-config -c ./boards -b esp32_S3_DevKitC_1

idf.py gen-bmgr-config -c ./boards -b <board_name> generates the configuration for the specified board. Available board names can be found in the boards directory.

  1. Configure Wi-Fi, LLM, IM, search engine, and related parameters:

The key demo settings include:

  • Wi-Fi SSID / Password
  • LLM API Key / Provider / Model
  • QQ App ID / App Secret
  • Telegram Bot Token
  • Brave / Tavily Search Key
  • Timezone

Key Notes:

You can adjust compile-time default values through menuconfig:

idf.py menuconfig
  1. Build and flash:
idf.py build
idf.py flash monitor