HELTEC WIFI LORA 32 V3 Compilation Error ESP32 S core issues

Hello, I was using the example code, LORAWAN_OLED, from this library, GitHub - Heltec-Aaron-Lee/WiFi_Kit_series: Arduino source codes and toolchain for WiFi_Kit_series made by HelTecAutomation.. I did the installed the esp32s core as per the documentation by running get.py from this https://github.com/Heltec-Aaron-Lee/WiFi_Kit_series/tree/master/esp32/tools. It is working fine on Arduino IDE. I migrated to platformIO and I am getting a lot of errors based on the toolchain-xtensa-esp32s3 wrong references. Can anyone tell, how I can fix this? Thank you in advance.

c:/users/zain/.platformio/packages/toolchain-xtensa-esp32s3/bin/…/lib/gcc/xtensa-esp32s3-elf/8.4.0/…/…/…/…/xtensa-esp32s3-elf/bin/ld.exe: .pio/build/heltec_wifi_lora_32_V3/src/main.cpp.o:(.literal._Z5setupv+0x10): undefined reference to `Mcu’

c:/users/zain/.platformio/packages/toolchain-xtensa-esp32s3/bin/…/lib/gcc/xtensa-esp32s3-elf/8.4.0/…/…/…/…/xtensa-esp32s3-elf/bin/ld.exe: .pio/build/heltec_wifi_lora_32_V3/src/main.cpp.o:(.literal._Z5setupv+0x20): undefined reference to `McuClass::begin()’

and more errors like this. Simple chipID example of ESP 32 is running fine.

This is not the fault of the toolchain. The core you’re using in teh Arduino IDE is not https://github.com/espressif/arduino-esp32/ but Heltec’s forked core, from https://github.com/Heltec-Aaron-Lee/WiFi_Kit_series/releases/download/0.0.9/package_heltec_esp32_index.json. PlatformIO is only having native support for Espressif’s core, not Heltec’s modded core. As thus, you are missing special precompiled libraries presented in the Heltec fork which implement the Mcu object and class that you’re missing in your sketch.

This has been discussed already in Heltec WiFi_LoRa_32_V3 Compile Error - undefined reference to `Radio' - #7 by fazer666 with a reference project.