esp-bist-skill

Generate and integrate IEC 60730 Class B self-test firmware for Espressif RISC-V SoCs.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developing safety-critical firmware with Espressif's ESP-BIST library requires exact knowledge of its self-test APIs, Kconfig symbols, linker-script regions, and IEC 60730 integration patterns; guessing any of these breaks the safety case. This Skill grounds every generated line in the real upstream repository so AI agents never invent APIs, misorder post-boot versus runtime tests, or misconfigure the windowed watchdog. ## Core Features & Use Cases - Scenario Recipes: Eleven step-by-step recipes covering project setup, standalone IEC 60730 integration, CPU/CSR/PC/stack tests, RAM March A/X, Flash CRC32, clock monitoring, GPIO plausibility, windowed watchdog, Zephyr dual-core integration, MCP server setup, and the safety validation workflow. - Grounded References: Verbatim API signatures, the full CONFIG_ESP_BIST_* Kconfig map, error-code tables, SoC support matrix (ESP32-C3/C5/C6/H2), and 17 documented pitfalls with WRONG/CORRECT code pairs. - Use Case: You need to add IEC 60730 Class B self-tests to an ESP32-C6 product. The Skill walks you through copying samples/standalone, writing bist.conf, sequencing post-boot tests, wiring the windowed WDT with an IRAM_ATTR callback, and validating via QEMU/GDB fault injection. ## Quick Start Ask the agent to integrate ESP-BIST post-boot and runtime self-tests with a windowed watchdog into your ESP32-C6 firmware project.

Frequently Asked Questions about esp-bist-skill

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

FAQPage Schema
How do I integrate ESP-BIST self-tests into an ESP32-C6 firmware project?

Copy the samples/standalone application as your starting point, add a mandatory bist.conf file, and follow the canonical pattern: run post-boot tests once, initialize the stack sentinel, configure the windowed watchdog, then run CPU/CSR/stack/PC tests every main-loop iteration with failures routed to fail_safe_exit().

What is the difference between post-boot and runtime BIST tests?

Post-boot tests run once at startup and cover expensive or destructive checks like RAM March A/X, Flash CRC, and watchdog reset. Runtime tests are cheap and idempotent, such as CPU registers, CSR, PC, and stack-overflow check, and execute every main-loop iteration.

Which Espressif chips does ESP-BIST support?

ESP-BIST targets RISC-V SoCs: ESP32-C3, C5, C6, and H2 have guaranteed build support, with C61, H4, and P4 documented upstream. Xtensa-based chips like ESP32, S2, and S3 are not supported because the tests rely on RISC-V CSR, PMP, and PMA registers.

Why does bist_flash_test fail with BIST_ESP_FLASH_TEST_ERR on a fresh build?

The Flash CRC test compares runtime CRC32 values against reference values injected post-build by scripts/calculate_crc32.py into the .crc_section_text and .crc_section_data linker sections. If your build bypasses cmake/project.cmake's post-build hook, the stored CRCs stay zero and the test fails.

Why does the windowed watchdog report underflow in a fast main loop?

The windowed WDT detects feeds that arrive before the underflow window set by wdt_init_windowed() elapses. If your loop is faster than CONFIG_ESP_BIST_WDT_WINDOWED_UNDERFLOW_TIMEOUT_US, either raise the underflow value or add a delay before calling wdt_feed().

Does the 32 kHz crystal test work on ESP32-C6 or H2?

No. ESP32-C6 and H2 lack SOC_XT_WDT_SUPPORTED, so bist_ext_crystal_fail_test() is skipped and returns BIST_ESP_OK. Use bist_main_crystal_test() to validate the 40 MHz main crystal on those chips instead.