Anybody able to successfully compile Azure SDK ESP32-dev with Arduino in PlatformIO 5

Hello,

I am curious if anybody has been able to run a recent version of Azure SDK samples with Platformio. I have been able to compile and run using Arduino IDE but not Platformio.

Details:
I am trying to compile the latest Azure SDK sample(s) with Arduino using CLion and Platformio. My board is the ESP32-WRover so I believe I cannot use the libraries that are available on the online Platformio libraries repo based on the documentation on Microsoft’s website.

It appears that I have a dependency management issue. Every time, I try to compile I have issues with the WiFiClientSecure class… specifically with AzureIoTUtility. It appears that AzureIoTUtility it expecting a specific version of Wifi.h and WiFiClientSecure.h.

Scanning dependencies...
Dependency Graph
|-- <AzureIoTProtocol_HTTP> 1.3.9
|   |-- <AzureIoTUtility> 1.3.9
|   |-- <AzureIoTHub> 1.3.9
|   |   |-- <AzureIoTUtility> 1.3.9
|-- <AzureIoTProtocol_MQTT> 1.3.9
|   |-- <AzureIoTHub> 1.3.9
|   |   |-- <AzureIoTUtility> 1.3.9
|   |-- <AzureIoTUtility> 1.3.9
|-- <AzureIoTHub> 1.3.9
|   |-- <AzureIoTUtility> 1.3.9
Building in debug mode
Compiling .pio/build/esp32-dev/lib6f2/AzureIoTUtility/adapters/sslClient_arduino.cpp.o
lib/AzureIoTUtility/src/adapters/sslClient_arduino.cpp:15:18: fatal error: WiFi.h: No such file or directory

I am able to build using the Arduino IDE. However I had to follow the following.

Based on what I was reading with other posts, I think I have to do something similar for the Platformio setup.

  • I copied the directories from the Azure SDK make_sdk.py to my lib directory in my Platformio project.
  • I copied the platform.text to /Users/user_dir/.platformio/packages/framework-arduinoespressif32/platform.txt

Here is my platformio.ini

[env:gatekit_esp_dev]
platform = espressif32
board = esp-wrover-kit
framework = arduino
debug_tool = esp-prog
build_flags = -DCORE_DEBUG_LEVEL=5 -DBA_BOARD=0 -DDONT_USE_UPLOADTOBLOB
board_build.partitions = min_spiffs.csv
monitor_speed = 115200

Any help would be appreciated.
Thanks
Greg