Description
Type: Bug
Component: Build
Hardware: ESP32
Platform: Windows
Problem:
Basic ESP32 PWM code using ledcSetup(), which worked perfectly in older Arduino IDE versions and older ESP32 cores, fails to compile in new Arduino IDE (2.x) versions and recent ESP32 core releases.
#include <Arduino.h>
const int pwmPin = 5;
void setup() {
Serial.begin(115200);
ledcSetup(0, 25000, 10);
ledcAttachPin(pwmPin, 0);
ledcWrite(0, 512);
}
void loop() {
}
Observations:
✅ Board selected correctly (e.g., ESP32 Dev Module, ESP32S3 Dev Module)
✅ Latest ESP32 cores installed cleanly via Boards Manager.
✅ Sketch saved properly inside Documents/Arduino/ folder (not temp).
❌ Still getting missing function errors for standard ESP32 functions.
Expected Behavior:
Simple ESP32 sketches using standard functions like ledcSetup(), ledcAttachPin(), ledcWrite() should compile successfully under Arduino IDE 2.x and latest ESP32 cores.
Actual Behavior:
Compilation fails with missing function declaration errors.
Request:
Please investigate ESP32 core path resolutions or header visibility issues when compiling under new Arduino IDE 2.x versions.
Possible cause could be related to missing platform includes or wrong build_flags being passed to compiler.