Logo Error Message Explainer

Error Message Explainer

Cộng đồng
wedsamuel1230
error-message-explainer

Explain Arduino and embedded compiler, upload, boot, power, and runtime errors in plain English. Use when a user shares an error or failure from Arduino IDE, Arduino CLI, PlatformIO, or a vendor-specific tool. Separate build, upload, hardware, and system evidence and give a board-specific recovery path without assuming UNO, ESP32, or RP2040 behavior.

Tổng quan

Nhà phát hànhwedsamuel1230
Kho mãembedded-engineering-skills
Tên kỹ năngerror-message-explainer
Sao
29
Bản fork
1
Tệp đi kèm
1
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 1 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được wedsamuel1230 công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Error Message Explainer trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/wedsamuel1230/embedded-engineering-skills/tree/main/skills/error-message-explainer
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/wedsamuel1230/embedded-engineering-skills.git /tmp/embedded-engineering-skills
mkdir -p .claude/skills
cp -r /tmp/embedded-engineering-skills/skills/error-message-explainer .claude/skills/error-message-explainer
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Error Message Explainer trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Error Message Explainer ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Error Message Explainer không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Error Message Explainer

Translates cryptic compiler errors into actionable fixes for Arduino/ESP32/RP2040 projects.

Resources

This skill includes bundled tools:

  • scripts/parse_errors.py - Automated error analysis with 20+ error patterns
  • ../../docs/board-support/uno-r4-family.md - Shared Uno R4 board-family caveats

Quick Start

Analyze error from file:

bash
uv run --no-project scripts/parse_errors.py --file error_log.txt

Analyze single error:

bash
uv run --no-project scripts/parse_errors.py --message "error: 'LED' was not declared in this scope"

Interactive mode:

bash
uv run --no-project scripts/parse_errors.py --interactive

Pipe from compiler:

bash
arduino-cli compile 2>&1 | uv run --no-project scripts/parse_errors.py --stdin

How to Use This Skill

When user pastes an error message:

  1. Identify the error type from patterns below
  2. Explain what it means in simple terms
  3. Show the specific fix with code example
  4. Explain WHY this error happens (educational value)
  5. If the target is Uno R4 family and the failure touches WiFi, OTA, USB, or board recognition, open ../../docs/board-support/uno-r4-family.md

Recovery Boundary

Before recommending a reset, erase, bootloader repair, or reflash, capture the exact board/revision, tool and library versions, port, power path, and last known-good image. Use the router recovery reference for failed uploads, boot failures, power faults, or corrupted firmware. Do not call a compile fix a hardware or system fix.

Common Compilation Errors

1. "'xyz' was not declared in this scope"

error: 'xyz' was not declared in this scope

Meaning: Compiler doesn't recognize the name xyz.

Common Causes & Fixes:

CauseFix
Typo in variable/function nameCheck spelling, C++ is case-sensitive!
Variable used before declarationMove declaration before first use
Missing #includeAdd required library header
Function defined after it's calledAdd forward declaration or move function up

Example - Typo:

cpp
// WRONG
int ledpin = 13;      // lowercase 'p'
digitalWrite(ledPin, HIGH);  // uppercase 'P' - DIFFERENT!

// CORRECT
int ledPin = 13;
digitalWrite(ledPin, HIGH);

Example - Missing Include:

cpp
// WRONG - Servo not defined!
Servo myServo;

// CORRECT
#include <Servo.h>
Servo myServo;

2. "expected ';' before..."

error: expected ';' before 'xyz'

Meaning: Missing semicolon on the previous line.

Fix: Add ; at end of the line ABOVE the error.

cpp
// WRONG - error points to line 3
int x = 5       // ← missing ; here!
int y = 10;

// CORRECT
int x = 5;
int y = 10;

Pro Tip: The error line number is where compiler noticed the problem, not where the missing ; is!


3. "expected ')' before..." or "expected '}' before..."

error: expected ')' before ';'
error: expected '}' at end of input

Meaning: Mismatched parentheses or braces.

Common Patterns:

cpp
// WRONG - unmatched parenthesis
if (x > 5 {  // missing )
}

// WRONG - unmatched brace
void setup() {
    Serial.begin(115200);
// missing closing }

// CORRECT
if (x > 5) {
}

void setup() {
    Serial.begin(115200);
}

Debugging Tip: Use IDE auto-format (Ctrl+T) to reveal mismatches.


4. "invalid conversion from 'const char*' to 'char*'"

error: invalid conversion from 'const char*' to 'char*'

Meaning: Trying to modify a string literal (which is read-only).

cpp
// WRONG
char* message = "Hello";  // string literals are const!
message[0] = 'h';         // can't modify!

// CORRECT (if you need to modify)
char message[] = "Hello"; // creates modifiable copy
message[0] = 'h';         // OK!

// CORRECT (if read-only is fine)
const char* message = "Hello";

5. "no matching function for call to..."

error: no matching function for call to 'SomeClass::method(int, int, int)'
note: candidate: void SomeClass::method(int, int)

Meaning: Function called with wrong number or type of arguments.

cpp
// WRONG - too many arguments
myServo.write(90, 100);  // write() takes only 1 argument!

// CORRECT
myServo.write(90);

Read the "note:" lines - they show what arguments ARE accepted.


6. "multiple definition of 'xyz'"

error: multiple definition of 'xyz'

Meaning: Same variable/function defined in multiple files.

Fixes:

cpp
// In header file (.h), use 'extern':
extern int globalVar;  // declaration only

// In ONE .cpp file, define it:
int globalVar = 0;     // actual definition

Or for functions in header:

cpp
// WRONG - defined in header, included multiple times
int add(int a, int b) { return a + b; }

// CORRECT - use 'inline'
inline int add(int a, int b) { return a + b; }

7. "'xyz' does not name a type"

error: 'WiFiClient' does not name a type

Meaning: Class/type not recognized.

Fixes:

BoardLibraryInclude
ESP32WiFi#include <WiFi.h>
ESP8266WiFi#include <ESP8266WiFi.h>
Arduino + WiFi ShieldWiFi#include <WiFi.h>
cpp
// WRONG
WiFiClient client;  // WiFiClient unknown!

// CORRECT for ESP32
#include <WiFi.h>
WiFiClient client;

8. "redefinition of 'xyz'"

error: redefinition of 'int x'

Meaning: Variable declared twice in same scope.

cpp
// WRONG
int count = 0;
int count = 0;  // redefinition!

// WRONG in loops
for (int i = 0; i < 10; i++) {
    int i = 5;  // shadows loop variable!
}

// CORRECT
int count = 0;  // declare once
count = 5;      // assign without 'int'

Upload Errors

9. "avrdude: stk500_recv(): programmer is not responding"

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt X of 10: not in sync

Meaning: Arduino IDE can't communicate with the board.

Fixes (try in order):

  1. ✅ Correct board selected? (Tools → Board)
  2. ✅ Correct port selected? (Tools → Port)
  3. ✅ USB cable is data cable (not charge-only)?
  4. ✅ Try different USB port
  5. ✅ Nothing connected to pins 0/1 (TX/RX)?
  6. ✅ Press reset button during upload
  7. ✅ Install/reinstall USB drivers

10. "A fatal error occurred: Failed to connect to ESP32"

A fatal error occurred: Failed to connect to ESP32: 
Timed out waiting for packet header

Meaning: ESP32 not entering bootloader mode.

Fix: Hold BOOT button while uploading:

  1. Click Upload in IDE
  2. When "Connecting..." appears, hold BOOT button
  3. Release when upload starts
  4. Some boards: hold BOOT, press EN/RST, release BOOT

11. "Sketch too big"

Sketch too big; see https://support.arduino.cc/...
Sketch uses 34816 bytes (107%) of program storage space.
Maximum is 32256 bytes.

Meaning: Program doesn't fit in flash memory.

Fixes:

cpp
// 1. Use F() macro for strings (saves RAM + sometimes Flash)
Serial.println(F("This string in flash"));  // instead of RAM

// 2. Remove unused libraries
// Each #include adds code even if not used

// 3. Use smaller data types
uint8_t x = 5;  // instead of int (2 bytes saved)

// 4. Choose board with more flash (ESP32 has 4MB vs Arduino's 32KB)

Library Errors

12. "fatal error: xyz.h: No such file or directory"

fatal error: Adafruit_BME280.h: No such file or directory

Meaning: Library not installed.

Fix:

  1. Sketch → Include Library → Manage Libraries
  2. Search for library name
  3. Click Install
  4. If not in Library Manager: download ZIP, Sketch → Include Library → Add .ZIP Library

13. "exit status 1 / Error compiling for board..."

exit status 1
Error compiling for board Arduino Uno.

Meaning: Generic error - scroll UP to find the real error message.

The actual error is ABOVE this line! Look for lines containing error:.


Type Errors

14. "cannot convert 'String' to 'const char*'"

error: cannot convert 'String' to 'const char*'

Meaning: Function expects C-string but got Arduino String.

cpp
// WRONG
String myString = "hello";
someFunction(myString);  // if someFunction expects const char*

// CORRECT
String myString = "hello";
someFunction(myString.c_str());  // convert to C-string

15. "invalid operands to binary expression"

error: invalid operands of types 'const char*' and 'const char*' to binary 'operator+'

Meaning: Can't use + with C-strings.

cpp
// WRONG
const char* a = "hello";
const char* b = " world";
const char* c = a + b;  // doesn't work!

// CORRECT - use String
String a = "hello";
String b = " world";
String c = a + b;  // works!

// Or use snprintf
char c[20];
snprintf(c, sizeof(c), "%s%s", a, b);

Quick Reference Table

Error ContainsLikely ProblemQuick Fix
"not declared"Typo or missing includeCheck spelling, add #include
"expected ';'"Missing semicolonAdd ; to line ABOVE error
"expected ')'"Unmatched parenthesisCount ( and )
"expected '}'"Unmatched braceCount { and }
"no matching function"Wrong argumentsCheck function signature
"does not name a type"Missing libraryAdd #include
"multiple definition"Defined in multiple filesUse extern
"stk500"Upload failedCheck board/port/cable
"No such file"Library not installedInstall via Library Manager
"too big"Out of flashUse F(), remove unused code

Debugging Strategy

  1. Read the FIRST error (later ones often cascade)
  2. Note the FILE and LINE NUMBER
  3. Look at that line AND the line above
  4. Check for common patterns above
  5. Fix ONE error at a time, recompile
  6. Repeat until clean

Shared Output Contract

Use the shared Arduino skill contract: state assumptions, required tools and versions, implementation steps, tests/evidence by proof stage, known limitations, and recovery/security notes.

Tệp đi kèm

Mô hình đọc các tệp này khi cần trong lúc kỹ năng được tải. Các tệp được cung cấp ở dạng có thể đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Error Message Explainer làm được gì?

Explain Arduino and embedded compiler, upload, boot, power, and runtime errors in plain English. Use when a user shares an error or failure from Arduino IDE, Arduino CLI, PlatformIO, or a vendor-specific tool. Separate build, upload, hardware, and system evidence and give a board-specific recovery path without assuming UNO, ESP32, or RP2040 behavior.

Vì sao nên dùng Error Message Explainer trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Error Message Explainer là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Error Message Explainer trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/wedsamuel1230/embedded-engineering-skills/tree/main/skills/error-message-explainer. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Error Message Explainer?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Error Message Explainer với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Error Message Explainer với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Error Message Explainer có miễn phí không?

Có. Kỹ năng này được wedsamuel1230 phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇