esp-wdf-skill

Generates and builds WebAssembly applications for ESP32 chips using the ESP-WDF framework.

28|3|Updated Jun 24, 2026
One-click install
npx skills add https://github.com/JasonYANG170/esp-dev-skill --skill esp-wdf-skill-jasonyang170
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: esp-wdf-skill
Source: https://github.com/JasonYANG170/esp-dev-skill/tree/main/repos/esp-wdf
Command: npx skills add https://github.com/JasonYANG170/esp-dev-skill --skill esp-wdf-skill-jasonyang170

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing WebAssembly (WASM/WAMR) applications for ESP32 chips with ESP-WDF involves strict rules—entry-point forms, VFS/ioctl peripheral access, Kconfig export switches, and sandbox memory constraints—that are easy to get wrong and cause crashes like out-of-bounds memory access or missing callbacks. This Skill grounds AI code generation in the real esp-wdf repository documentation and source so generated apps compile and run correctly. ## Core Features & Use Cases - Scenario Recipes: 13 step-by-step recipes covering new project creation, WAMR App Framework timers, event pub/sub, request/response, GPIO/UART/I2C/SPI/LEDC via VFS ioctl, BSD sockets, pthread multithreading, LVGL GUI, and cloud protocols (HTTP/MQTT/RainMaker/Wi-Fi Provisioning). - Real API & Config Reference: API signatures, ioctl commands, Kconfig options, and sdkconfig.defaults patterns extracted from actual esp-wdf headers and examples. - Pitfall Prevention: 12 documented critical pitfalls with WRONG/CORRECT code pairs, such as enabling EXPORT_TIMER, using accessor functions instead of dereferencing VM-allocated pointers, and keeping linear memory a multiple of 65536. - Use Case: Ask the AI to create a WASM app that reads a BH1750 light sensor over I2C and publishes events; the Skill produces the correct entry form, ioctl call chain, sdkconfig.defaults, and the idf.py build plus host_tool.py deployment commands. ## Quick Start Ask the AI to create an ESP-WDF WebAssembly application for your scenario, for example a periodic timer app or an I2C sensor reader, and let it follow the matching recipe to generate, build, and deploy the code.

Frequently Asked Questions about esp-wdf-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create and build a WebAssembly app for ESP32 with ESP-WDF?

Create a project directory with a main/CMakeLists.txt registering your source, write a standard main() or on_init()/on_destroy() entry, then cd into the project directory and run idf.py build to produce a .wasm file. Deploy it with host_tool.py specifying heap, timer, and watchdog parameters.

How do WASM apps access GPIO or I2C peripherals on ESP-WDF?

WASM applications access peripherals through VFS device nodes like /dev/gpio/<pin> or /dev/i2c/0 using open, ioctl configuration commands such as GPIOCSCFG or I2CIOCSCFG, then read/write and close. Calling host ESP-IDF driver APIs like gpio_set_level directly from the sandbox is not allowed.

Why is my WAMR timer or request callback never triggered?

The callback export Kconfig switches are missing. Enable CONFIG_WAMR_APP_FRAMEWORK_EXPORT_TIMER for timer callbacks or CONFIG_WAMR_APP_FRAMEWORK_EXPORT_REQUEST_RESPONSE for request/response handlers in sdkconfig.defaults, in addition to CONFIG_WAMR_APP_FRAMEWORK=y.

What causes out of bounds memory access errors in ESP-WDF apps?

This error occurs when the app directly dereferences structure pointers allocated by the virtual machine, such as lv_obj_t or attr_container_t members. Use accessor functions like lv_obj_get_data, lv_timer_get_user_data, and attr_container_get_as_* instead of direct member access.

Can ESP-WDF apps use sockets and multiple pthreads?

Yes, but the sdkconfig must set CONFIG_WAMR_APP_FRAMEWORK=y, CONFIG_COMPILER_WASI_NO_USE_STDLIB=n, and CONFIG_COMPILER_WASI_USE_SHARED_MEMORY=y together. Missing these causes socket symbol errors or multithreading crashes, and linear memory must be a multiple of 65536.

When should I not use ESP-WDF for ESP32 development?

ESP-WDF is only for WebAssembly applications running inside the ESP-WASMachine runtime on ESP32-series chips. Do not use it for developing the WASMachine host itself, native ESP-IDF firmware, non-ESP32 chips, or hardware/PCB design work.