### What happens:
Build fails, with some warnings and the following error:
In file included from .pio/libdeps/m5stack-core2/M5GFX/src/lgfx/v1/platforms/esp32/Light_PWM.cpp:24:
/home/sly/.platformio/packages/framework-arduinoespressif32@src-cba3def1496a47e6af73c0b73bd2e13c/cores/esp32/esp32-hal-ledc.h:44:5: error: 'SemaphoreHandle_t' does not name a type
44 | SemaphoreHandle_t lock; //xSemaphoreCreateBinary
### Other Steps to Reproduce
This is a compilation error and it looks like a missing include / definition.
You can fix the build with the following work around:
### Work around
Open the downloaded package file: `.platformio/packages/framework-arduinoespressif32@src-
cba3def1496a47e6af73c0b73bd2e13c/cores/esp32/esp32-hal-ledc.h`
Modify to add the following includes, immediate after the existing includes:
```cpp
#include "freertos/FreeRTOS.h"
#include "freertos/semphr.h"
After that you can build (although there are warnings), and the app runs successfully on the device.
pio run --target upload
I have checked existing issues, online documentation and the Troubleshooting Guide
[X] I confirm I have checked existing issues, online documentation and Troubleshooting guide.
Board
m5stack-core2
Device Description
M5Stack Core2 ESP32 IoT Development Kit for AWS IoT Kit, https://shop.m5stack.com/products/m5stack-core2-esp32-iot-development-kit-for-aws-iot-edukit?variant=37687799251116
Hardware Configuration
Just the M5Stack Core2
Version
latest master (checkout manually)
IDE Name
PlatformIO
Operating System
Ubuntu 22.04
Flash frequency
240Mhz
PSRAM enabled
yes
Upload speed
115200
Description
Note that you don't actually need an M5Stack Core2 to reproduce the issue, as it happens at build stage (before connecting to the device).
Steps to reproduce:
Create
src/main.cpp
with the code as per Sketch below.Check the project builds
What should happen
Build should succeed (although there will be warnings)
Sketch
Debug Message
After that you can build (although there are warnings), and the app runs successfully on the device.
I have checked existing issues, online documentation and the Troubleshooting Guide