A user reported the LEDC PWM RGB example failing to compile. The sketch calls ledcAttach(pin, freq, resolution) — the one-shot API added in arduino-esp32 3.x. Our toolchain image pins arduino-esp32 to 2.0.17 (matched to ESP-IDF 4.4.7 + the lcgamboa QEMU ROM), where the API is the older two-step ledcSetup + ledcAttachPin pair. Sketches written against 3.x docs hit "ledcAttach was not declared in this scope". Bumping arduino-esp32 to 3.x means moving to ESP-IDF 5.x, which may break our QEMU fork. Cheaper fix: ship a compat shim header in the ESP-IDF project template that defines ledcAttach + ledcAttachChannel in terms of the 2.x API, gated on `!defined(ledcAttach)` so it disappears the day we bump. espidf_compiler.py now injects #include "velxio_compat.h" right after Arduino.h whether the user explicitly included Arduino.h or we prepended it ourselves. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| app | ||
| scripts | ||
| sdk | ||
| tests | ||
| .env.example | ||
| Dockerfile | ||
| debug_qemu.py | ||
| mcp_server.py | ||
| mcp_sse_server.py | ||
| requirements.txt | ||