Esp32-s3 as usb host to read connected pendrive files

ESP-IDF has the USB host library with mass-storage-class (MSC) support to read a USB pendrive. (component registry).

You should be able to use that library and the example code without problems. Just make sure to match the version of ESP-IDF that PlatformIO uses with the version of the ESP-IDF example.

For example, with the latest espressif32 (6.12.0) platform, ESP-IDF v5.5 is uesd, so you would use

as your base example. You might find https://github.com/maxgerhardt/esp32s3-usbtmc-example/tree/main as a reference PlatformIO + ESP-IDF example interesting, too.

The post ESP32 S3 as USB host with TinyUSB? also explains the various different solder jumper settings for the board.