Esp32 Build Fix logo

Esp32 Build Fix

Community
agodianel
esp32-build-fix

Diagnoses and fixes ESP-IDF build, link, CMake/Kconfig, component-manager and flashing failures, using the build log to classify the error before changing anything. Use when "idf.py build fails", "undefined reference to", "No such file or directory" for a header, "Failed to resolve component", "CMake Error", "multiple definition of", "region `iram0_0_seg' overflowed", "app partition is too small", "implicit declaration of function", "esptool Failed to connect", "Wrong boot mode detected", "No serial data received", "Permission denied /dev/ttyUSB0", "A fatal error occurred", "set-target", or after an ESP-IDF version upgrade (v4 → v5) breaks the build.

Overview

Publisheragodianel
Repositoryesp32-claude-workbench
Skill nameesp32-build-fix
Stars
81
Forks
7
Bundled files
3
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by agodianel on GitHub. Read the source before you install it.

Installation

Install the Esp32 Build Fix AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/agodianel/esp32-claude-workbench/tree/main/skills/esp32-build-fix
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/agodianel/esp32-claude-workbench.git /tmp/esp32-claude-workbench
mkdir -p .claude/skills
cp -r /tmp/esp32-claude-workbench/skills/esp32-build-fix .claude/skills/esp32-build-fix
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Esp32 Build Fix in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Esp32 Build Fix on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Esp32 Build Fix is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

ESP32 Build & Flash Fix

Classify first, then make the smallest fix. Never "fix" a build by deleting configuration the user cares about.

Tools

If the esp32-workbench MCP server is connected, call its tools; otherwise run the CLI. If esp32wb is not on PATH, use uvx --from git+https://github.com/agodianel/esp32-claude-workbench esp32wb <args>. Add --json for machine-readable output.

NeedMCP toolCLI
Classify build / flash outputbuild_log_triageidf.py build 2>&1 | tee build.log; esp32wb build-log build.log (or ... | esp32wb build-log -)
App vs partition sizepartition_checkesp32wb partitions partitions.csv --sdkconfig sdkconfig --bin build/<app>.bin
sdkconfig sanitysdkconfig_reviewesp32wb sdkconfig sdkconfig
Chip facts (toolchain, USB/strapping pins for download mode)chip_infoesp32wb chip <target>
API changed / renamed?search_esp_docsesp32wb docs search "<symbol or error>" --target T

Steps

1. Capture the full first error

Rerun with output captured (idf.py build 2>&1 | tee build.log). The first error matters; later ones are usually cascades. Run esp32wb build-log build.log.

2. Establish context

  • idf.py --version and the version the project expects (README, CI, idf_component.yml dependencies.idf).
  • Target: CONFIG_IDF_TARGET in sdkconfig vs the board you have. A stale sdkconfig from another target causes many confusing errors.
  • Was it building before? What changed (IDF upgrade, new component, new target, managed_components update)?

3. Classify and fix

CategorySignatureUsual fix
Missing headerfatal error: xyz.h: No such file or directoryAdd the owning component to REQUIRES/PRIV_REQUIRES; in recent IDF v5.x releases drivers are split into esp_driver_* components (e.g. esp_driver_gpio, esp_driver_i2c) — driver still works as an umbrella
Linkerundefined reference toSource not in SRCS, missing REQUIRES, C/C++ name mangling (extern "C"), Kconfig option disabling the feature
Duplicate symbolmultiple definition ofFunction defined in a header without static inline, or same file compiled twice
Kconfig'CONFIG_X' undeclaredOption renamed/removed in this IDF version or not enabled; check sdkconfig and IDF migration guide
Component managerFailed to resolve component, version solver errorsFix idf_component.yml constraints; idf.py update-dependencies
API change after upgradeimplicit declaration, unknown type nameFollow the ESP-IDF migration guide (ADC → adc_oneshot, I2C → i2c_master driver, legacy timer/RMT/I2S drivers replaced)
Memory overflowregion 'iram0_0_seg' overflowed, dram0_0_seg overflowMove code out of IRAM, reduce static buffers, enable PSRAM for large buffers
App too bigapp partition is too small / partition check failsLarger app partition or custom partitions.csv, -Os (CONFIG_COMPILER_OPTIMIZATION_SIZE), drop unused features
Target mismatchstatic assertions, missing SoC symbolsidf.py set-target <target> (this regenerates sdkconfig)
Toolchain / envxtensa-...-elf-gcc: not found, riscv32-esp-elf-gcc: not found, Python env errorsRe-run install.sh <target> / export.sh for the IDF version in use

Details and examples: build failure playbook.

4. Flash and monitor failures

Read flash failure playbook for esptool errors (Failed to connect, Wrong boot mode detected, No serial data received, permission denied, invalid header boot loops after flashing). Download-mode entry and the USB port differ per chip — check esp32wb chip <target> for the boot strapping pins and USB-Serial-JTAG pins.

5. Verify

  • Clean build of the affected configuration (idf.py fullclean && idf.py build only after the targeted fix, to prove it is not a stale-cache artifact).
  • No new warnings.
  • If flashing was the issue: flash + boot log showing app_main reached.
  • Record commands and output as test evidence in the mission.

Safety

  • idf.py set-target and deleting sdkconfig discard local menuconfig changes. Back up sdkconfig first and make sure sdkconfig.defaults captures what matters.
  • idf.py erase-flash wipes NVS (Wi-Fi credentials, calibration, bonds). Ask first.
  • Never burn eFuses or enable secure boot/flash encryption to "fix" a flash error.
  • A code change made to fix the build still needs a (brief) implementation contract.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Esp32 Build Fix AI skill do?

Diagnoses and fixes ESP-IDF build, link, CMake/Kconfig, component-manager and flashing failures, using the build log to classify the error before changing anything. Use when "idf.py build fails", "undefined reference to", "No such file or directory" for a header, "Failed to resolve component", "CMake Error", "multiple definition of", "region `iram0_0_seg' overflowed", "app partition is too small", "implicit declaration of function", "esptool Failed to connect", "Wrong boot mode detected", "No serial data received", "Permission denied /dev/ttyUSB0", "A fatal error occurred", "set-target", or...

Why use Esp32 Build Fix on TypingMind?

Because you install it once and use it with any model. Esp32 Build Fix is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Esp32 Build Fix in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/agodianel/esp32-claude-workbench/tree/main/skills/esp32-build-fix. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Esp32 Build Fix?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Esp32 Build Fix?

As many as you like. As long as a model supports skills, you can use Esp32 Build Fix with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Esp32 Build Fix AI skill free?

Yes. It is published on GitHub by agodianel under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇