In case anyone is having trouble compiling their code for ESP32 using the new SimpleFOC library release v2.2.1 under PlatformIO, for me the following option helped in platformio.ini:
; platform = espressif32
platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.2idf/platform-espressif32-2.0.2.zip
I assume this is a temporary situation and they will eventually make the newer version of ESP32 core the default, or maybe its a problem specific to some setups. In any case, this solved it for me.