freertos/FreeRTOS.h: No such file or directory

When I try any example with Platformio I’m getting the following error (this error didn’t happen before with the same source code).

C:\Users\ASUS\.platformio\packages\framework-arduinoespressif32\cores\esp32/Arduino.h:32:31: fatal error: freertos/FreeRTOS.h: No such file or directory

  • do you have any folder named freertos (upper- or lowercase doesn’t matter) or a file named FreeRTOS.h in the project?
  • have you globally installed any FreeRTOS library in PlatformIO C:\Users\<user>\.platformio\lib) or in the project via lib_deps / lib folder?
  • What’s the full platformio.ini?
  • Does this happen with the a blinky example too?
  • Does deleting C:\Users\ASUS\.platformio\packages\framework-arduinoespressif32\ to grab a fresh version of Arduino-ESP32 help?

@maxgerhardt Thank you, final solution helped :slight_smile:

Removing .platformio\packages\framework-arduinoespressif32\ worked. This directory got messed up after using platform_packages in platformio.ini to install a custom version. Reverting platformio.ini did not resolve the issue. Deleting the directory (cache) did.