Got in a mess after (stupidly) upgrading PlatformIO and espidf

I had a test project using EspMQTTClient as a library module (To set up WiFi and MQTT). This compiled and worked fine until I did the upgrades. Now the compiler can’t find various include files (e.g. Update.h included from ArduinoOTA). The files are loaded ( .platformio/packages/framework-arduinoespressif32/libraries) and I can skip to the next problem by specifically including it in platformio.ini build_flags. I was expecting LDF to have sorted this out. The platformio.ini file contains:

platform = espressif32
board = wemos_d1_mini32
framework = arduino
;platform_packages =
;   framework-arduinoespressif32 @

lib_deps = 
  ESP Async WebServer
  ayushsharma82/AsyncElegantOTA @ ^2.2.5
  daven006/settings @ ^1.0.2
build_src_filter = +<*> -<Temp files/>
monitor_speed = 115200
build_flags = 
  -I ../../include
  -I C:/Users/User/.platformio/packages/framework-arduinoespressif32/libraries/Update/src

Despite a week of looking I’m not clear how how to set up compatible versions of the IDE and libraries.

Thanks in advance for any pointers…

All of these libs either don’t have their version pinned or, via ^, allow arbitrary change in minor version (the z in x.y.z).

You can always pin these versions with a @<version>.

Same for the platform version. If you want to roll back to an older platform version (and with it an older Arduino-core version), look at the released versions and how to use them.

And finally, instead of

really try using the right lib_ldf_mode that makes all libraries recognize their dependencies correctly – the -I flag is really crude workaround for this. You can always do a project tasks → Advanced → Verbose Build to see the full dependency graph and notice any weirdness (things that are missing).

Having set platformio to

platform = espressif32
board = wemos_d1_mini32
framework = framework-arduinoespressif32

and removed the extraneous includes

I now get

CONFIGURATION: Redirecting...
PLATFORM: Espressif 32 (5.3.0) > WEMOS D1 MINI ESP32
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)

  • tool-esptoolpy @ 1.40400.0 (4.4.0)
  • toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
    Error: This board doesn’t support framework-arduinoespressif32 framework!

The board wemos_d1_mini32 worked before and seems to be fairly standard so what am I missing??

There is no such possible value.

You mean framework = arduino.