← 返回 Skills 市场
547895019

ESP-IDF Helper

作者 547895019 · GitHub ↗ · v1.1.0 · MIT-0
cross-platform ⚠ suspicious
760
总下载
0
收藏
1
当前安装
2
版本数
在 OpenClaw 中安装
/install esp-idf-helper
功能描述
Help develop, build, flash, and debug ESP32/ESP8266 firmware using Espressif ESP-IDF on Linux/WSL. Use when the user asks about ESP-IDF project setup, config...
使用说明 (SKILL.md)

esp-idf-helper Skill

Provide a repeatable, command-line-first workflow for ESP-IDF development on Linux/WSL: configure → build → flash → monitor → debug/troubleshoot.

Quick Reference

# 1) Source the ESP-IDF environment (once per terminal session)
. $IDF_PATH/export.sh

# 1.1) Enable ccache to speed up compilation (recommended)
export IDF_CCACHE_ENABLE=1

# 2) Go to your project and build
cd /path/to/your/project
idf.py set-target \x3Ctarget>    # Set target chip (once per project)
idf.py build                 # Compile

# 3) flash
idf.py -p \x3CPORT> -b \x3CBAUD> flash  # Flash to device (optional)

Common commands

  • idf.py --help — Help
  • idf.py set-target \x3Ctarget> — Set chip target: esp32, esp32s2, esp32s3, esp32c3, esp32p4
  • idf.py menuconfig — Configure project settings (must run in a new terminal window)
  • idf.py build — Build the project
  • idf.py update-dependencies — Update project component dependencies
  • idf.py partition-table — Build partition table and print partition entries
  • idf.py partition-table-flash — Flash partition table to device
  • idf.py storage-flash — Flash storage filesystem partition
  • idf.py size — Show firmware size information
  • idf.py -p \x3CPORT> -b \x3CBAUD> flash — Flash firmware (default baud: 460800)
  • idf.py -p \x3CPORT> monitor — Open serial monitor
  • idf.py -p \x3CPORT> -b \x3CBAUD> monitor — Open serial monitor with specific baud (e.g. 460800)
  • idf.py -p \x3CPORT> -b \x3CBAUD> flash monitor — Flash then monitor

Component Management

ESP-IDF projects can include external components from the ESP Component Registry.

Component Commands

  • idf.py add-dependency "\x3Ccomponent>" — Add a component dependency to idf_component.yml
  • idf.py update-dependencies — Download and update all project dependencies

Component Management Workflow

# 1) Add a dependency to your project
idf.py add-dependency "\x3Ccomponent>"

# 2) Update dependencies (downloads components to managed_components/)
idf.py update-dependencies

Note: Dependencies are recorded in idf_component.yml in your project's main component directory (main/).

Bundled resources

references/

  • references/esp-idf-cli.md — concise command patterns + what to paste back when reporting errors.
  • references/idf-py-help.txt — captured idf.py --help output for quick lookup/search.

To refresh the help text for your installed ESP-IDF version, run:

  • scripts/capture_idf_help.sh

assets/

Not used by default.

Serial Port Management (WSL2)

For WSL2 users, USB serial devices need to be attached via usbipd to be accessible in WSL.

List Available Serial Devices

scripts/usbipd_attach_serial.sh --list

Shows all connected USB serial devices (CH340, CH343, CP210, FTDI, etc.).

Note: This script runs in WSL2 and uses powershell.exe to communicate with Windows usbipd.

Bind/Attach All Serial Devices

# Bind and attach all COM port devices
scripts/usbipd_attach_serial.sh --keyword "COM"

# Or attach specific device by busid
scripts/usbipd_attach_serial.sh --busid 3-2

# Or filter by device type
scripts/usbipd_attach_serial.sh --keyword "CH343"
scripts/usbipd_attach_serial.sh --keyword "ESP32"

Serial Port Script Options

  • --list — List all matching serial devices and exit
  • --busid \x3CBUSID> — Specify device bus ID (e.g., 3-2)
  • --keyword \x3CTEXT> — Filter devices by keyword (e.g., COM, CH343, ESP32)
  • --bind — Bind only (skip attach), useful for first-time setup with admin privileges
  • --distro \x3CDISTRO> — Specify WSL distribution name
  • --dry-run — Print commands without executing

Typical Workflow

# 1. Check available devices
scripts/usbipd_attach_serial.sh --list

# 2. Attach all serial devices
scripts/usbipd_attach_serial.sh --keyword "COM"

# 3. Verify devices in WSL
ls -la /dev/ttyACM* /dev/ttyUSB*

# 4. Use with idf.py
idf.py -p /dev/ttyACM0 flash monitor

Note: This script runs in WSL2 and internally uses powershell.exe to communicate with Windows usbipd service.

Troubleshooting: powershell.exe not found

If you encounter powershell.exe: command not found, the Windows paths are not in your PATH environment variable.

Quick Fix (current session only):

export PATH="$PATH:/mnt/c/Windows/System32:/mnt/c/Windows/System32/WindowsPowerShell/v1.0"
~/skills/esp-idf-helper/scripts/usbipd_attach_serial.sh --list

Permanent Fix (add to ~/.bashrc):

echo 'export PATH="$PATH:/mnt/c/Windows/System32:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Windows/SysWOW64"' >> ~/.bashrc
source ~/.bashrc

Firmware Packaging

Pack ESP-IDF build output into a distributable firmware package with cross-platform flash scripts.

Usage

scripts/pack_firmware.sh \x3Cbuild_directory>

Example

# After building your project
idf.py build

# Create firmware package
scripts/pack_firmware.sh ./build

# Output: build/firmware_package/ and build/esp_firmware_YYYYMMDD_HHMMSS.zip

Generated Package Contents

File Description
flash.sh Linux/Mac flash script with retry and parallel support
flash.bat Windows multi-port flash launcher
flash_one.bat Windows single-port flash with retry
mac_addresses.txt Recorded MAC addresses (deduplicated)
*.bin Firmware binary files
tools/esptool/esptool.exe Windows esptool executable
README.txt Usage instructions

Flash Script Features

  • Auto-retry: 3 attempts on failure
  • Parallel flashing: Multiple devices simultaneously
  • MAC recording: Automatic MAC address extraction and deduplication
  • Cross-platform: Linux/Mac/Windows support

Production Workflow

# 1. Build the project
idf.py build

# 2. Package firmware
scripts/pack_firmware.sh ./build

# 3. Distribute the ZIP to production line
# Production team runs: flash.bat all  (Windows) or ./flash.sh /dev/ttyUSB*  (Linux)
安全使用建议
This appears to be a legitimate ESP-IDF helper that ships helpful scripts for building, flashing, packaging firmware and for attaching USB serial devices in WSL. Before installing/running: 1) Verify you have idf.py available and set IDF_PATH (SKILL.md expects these even though registry metadata omitted them). 2) Inspect the included scripts (usbipd_attach_serial.sh and pack_firmware.sh) yourself — they run powershell.exe/usbipd on Windows and will perform usbipd bind/attach (may require admin), and pack_firmware.sh extracts MAC addresses from flash logs and writes mac_addresses.txt into the package. 3) Be comfortable granting local device access and (on Windows) admin operations if you run the usbipd script. 4) If you don't want MACs recorded, review/modify the pack script before use. The main risk is operational (device binds, admin prompts), not network exfiltration; the metadata mismatch reduces confidence—ask the publisher to correct registry metadata or provide provenance if you need higher assurance.
功能分析
Type: OpenClaw Skill Name: esp-idf-helper Version: 1.1.0 The skill provides ESP-IDF development utilities that include high-risk capabilities, specifically the execution of Windows host-side commands from WSL2. The script `scripts/usbipd_attach_serial.sh` uses `powershell.exe` to manage USB devices, which provides a bridge for host-level execution. Additionally, `scripts/pack_firmware.sh` dynamically generates secondary shell and batch scripts and bundles an external `esptool.exe` binary. While these actions are consistent with the stated goal of hardware development and production packaging, the ability to generate executables and cross the WSL-Windows boundary represents a significant attack surface if the agent is influenced by malicious prompts.
能力标签
cryptorequires-walletrequires-sensitive-credentials
能力评估
Purpose & Capability
The skill's code and SKILL.md are consistent with an ESP-IDF helper: it runs idf.py, packages firmware, and helps attach USB serial devices in WSL. However the registry metadata at the top of the submission lists no required binaries/env vars while the embedded SKILL.md explicitly requires idf.py and IDF_PATH — this mismatch is an inconsistency to be aware of.
Instruction Scope
Instructions and scripts stay within the stated purpose (build, flash, monitor, package firmware, and attach USB devices). Notable behaviors: usbipd_attach_serial.sh invokes powershell.exe to run usbipd on Windows and may call usbipd bind/attach (requires admin on Windows); pack_firmware.sh extracts MAC addresses from flash logs and writes mac_addresses.txt into the package. No instructions upload data to external endpoints.
Install Mechanism
No install spec; this is an instruction-only skill with included local scripts. Nothing is downloaded or extracted from external URLs by the skill itself, which minimizes install-time risk.
Credentials
The SKILL.md expects IDF_PATH and idf.py (reasonable and proportionate for ESP-IDF work). The registry metadata showed no required env/bins, which is inconsistent. The scripts also reference Windows system paths (/mnt/c/Windows/*) for PowerShell when used under WSL, and will write local files (e.g., mac_addresses.txt, temporary logs). No unrelated credentials or secret environment variables are requested.
Persistence & Privilege
The skill is not force-included (always:false) and does not request elevated platform privileges. It does run usbipd bind/attach which may require Windows admin rights to bind devices, and SKILL.md suggests adding Windows paths to ~/.bashrc (user action). The skill does not modify other skills or global agent configs.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install esp-idf-helper
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /esp-idf-helper 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.0
Add usbipd serial management, firmware packaging, component search features
v1.0.0
Initial release: ESP-IDF build/flash/monitor workflows, usbipd serial auto-attach, monitor auto-retry, flash_with_progress with retry and error summary, menuconfig new-window helper
元数据
Slug esp-idf-helper
版本 1.1.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 2
常见问题

ESP-IDF Helper 是什么?

Help develop, build, flash, and debug ESP32/ESP8266 firmware using Espressif ESP-IDF on Linux/WSL. Use when the user asks about ESP-IDF project setup, config... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 760 次。

如何安装 ESP-IDF Helper?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install esp-idf-helper」即可一键安装,无需额外配置。

ESP-IDF Helper 是免费的吗?

是的,ESP-IDF Helper 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

ESP-IDF Helper 支持哪些平台?

ESP-IDF Helper 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 ESP-IDF Helper?

由 547895019(@547895019)开发并维护,当前版本 v1.1.0。

💬 留言讨论