These steps are curtesy of Ari.
Now you will (finally) be able to connect the device via USB-C cable and LilyGo's “T-U2T” adapter. Ensure the device shows up in device manager (if not you may be a using bad USB cable - trust me and try different cables). When connected, note the COM port number. In VS Code, click on the PlatformIO icon (looks like a bug/alien head) and choose the option to make a project. Your project name should have no spaces.
The “Board” should be “TTGO T-OI PLUS RISC-V ESP32-C3”. Framework is “Arduino” Then in PlatformIO's platformio.ini file, make sure you have the following:
[env:ttgo-t-oi-plus] platform = espressif32 board = ttgo-t-oi-plus framework = arduino board_build.mcu = esp32c3 board_build.f_cpu = 160000000L board_build.filesystem = littlefs upload_speed = 921600 monitor_speed = 115200 lib_ignore = examples lib_deps = https://github.com/Xinyuan-LilyGO/T-ZigBee.git bblanchon/ArduinoJson@^6.19.4 mathertel/OneButton@^2.0.3