Compilation error esp32dev

Get the following error when compiling C++ in VS and can’t find any decipherable clues as to what is wrong or how to fix it?

Processing esp32dev (platform: espressif32; board: esp32dev; framework: arduino)
Removing unused dependencies...
SemanticVersionError: Invalid simple block ''

Any hints gratefully received…

So what’s your platformio.ini? Seems to me like you may have a wrong version declaration in lib_deps or in another included library.

Thank you very much for your attention -platformio.ini :

platform = espressif32
board = esp32dev
framework = arduino
monitor_port = /dev/ttyUSB0
monitor_speed = 115200
upload_port = /dev/ttyUSB0
lib_deps =
adafruit/Adafruit PWM Servo Driver Library@^3.0.1

I have checked that this is the same as it has been all along… I thought it might be a Cmake issue but I find Cmake just too much to navigate!

You have two entries for the same library? The first one is for mbed-os and is not fitting for Arduino + ESP32 at all. Have you tried it with only the lower library and the deletion of the .pio folder?

I will try this suggestion. Interstingly I had a random unrelated (and solved) issue recently with the PWM lib reference but it was to do with mystery a third lne which appeared… this current entry has been the long term reference which has been fine -I will research the meaning of your critique so as to learn more.

Deleted the mbed-bxd line…
Compilation still fails with same message…

Is there a directory I could clear or say a reinstall of an extension I could perform…?

I cannot reproduce your error in a new project with the platformio.ini

platform = espressif32
board = esp32dev
framework = arduino
monitor_port = /dev/ttyUSB0
monitor_speed = 115200
upload_port = /dev/ttyUSB0
lib_deps =
   adafruit/Adafruit PWM Servo Driver Library@^3.0.1

and a src\main.cpp of

#include <Arduino.h>
#include <Adafruit_PWMServoDriver.h>
#include <Adafruit_SPIDevice.h>
void setup() {}
void loop() {}

as that givse

RAM:   [=         ]   6.7% (used 22076 bytes from 327680 bytes)
Flash: [==        ]  17.6% (used 230521 bytes from 1310720 bytes)
Building .pio\build\esp32dev\firmware.bin v4.5.1
Creating esp32 image...
Merged 2 ELF sections
Successfully created esp32 image.
====================[SUCCESS] Took 60.99 seconds ====================

Sure, to do a clean uninstall + reinstall, simply:

  1. Close VSCode
  2. Delete the .pio folder of your project
  3. Delete C:\Users\<user>\.platformio fully
  4. Reopen VSCode

The extension will reinstall the PlatformIO core automatically and you can build your project again.

If the error remains, you might have an error in a library in lib/ that is causing this issue.

OK thanks, you’ve given me the confidence to to delete the .pio folder… going ahead!

Your reward will be my sharing my instagram account with you so you can see the project I’m working on…

Hurrah, that seems to have worked thank you so much. I have a muddle of directories to clean up but that can wait.

The project is a couple of posts in on my sculptures site on instagram @utopistsculptures

Thank you again