Adafruit TinyUSB MassStorage example not compiling

Hello,

I’m using an ESP32-S3-DevKitC-1 (8MB flash no psram) with Platformio and Arduino framework. I tried the “msc_sdfat.ino” example but the IDE throws me some errors during compilation. I don’t know if it is framework, library, board or IDE related.

I’m using the “msc_sdfat.ino” example with a slight modification to run cutsom spi pins. Before line 58:
if ( !sd.begin(chipSelect, SD_SCK_MHZ(50)) )

I added the line:
SPI.begin(SCK, MISO, MOSI, CS);

My wiring is correct (I tried many other examples with the same pins and the uSD card is running like a charm).

platformio.ini configuration:

[env:esp32-s3-devkitc-1]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino
build_flags =
    -DNO_GLOBAL_SERIAL
lib_deps = 
    adafruit/Adafruit TinyUSB Library@3.1.4
    https://github.com/adafruit/SdFat.git
monitor_speed = 115200
monitor_filters = esp32_exception_decoder

Here are the compile errors:

In file included from .pio/libdeps/esp32-s3-devkitc-1/SdFat - Adafruit Fork@src-e4cacd363521981f940076dd6b7f4ac0/src/SdCard/SdCard.h:27,
                 from .pio/libdeps/esp32-s3-devkitc-1/SdFat - Adafruit Fork@src-e4cacd363521981f940076dd6b7f4ac0/src/SdFat.h:32,
                 from src/main.cpp:18:
.pio/libdeps/esp32-s3-devkitc-1/SdFat - Adafruit Fork@src-e4cacd363521981f940076dd6b7f4ac0/src/SdCard/SdioCard.h:27:10: fatal error: ../common/SysCall.h: No such file or directory
 #include "../common/SysCall.h"
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Compiling .pio\build\esp32-s3-devkitc-1\lib04d\SdFat - Adafruit Fork@src-e4cacd363521981f940076dd6b7f4ac0\ExFatLib\ExFatFormatter.cpp.o
xtensa-esp32s3-elf-g++: error: .pio/libdeps/esp32-s3-devkitc-1/SdFat - Adafruit Fork@src-e4cacd363521981f940076dd6b7f4ac0/src/ExFatLib/ExFatFilePrint.cpp: No such file or directory
xtensa-esp32s3-elf-g++: fatal error: no input files
compilation terminated.
.pio/libdeps/esp32-s3-devkitc-1/SdFat - Adafruit Fork@src-e4cacd363521981f940076dd6b7f4ac0/src/ExFatLib/ExFatFile.cpp:26:10: fatal error: ../common/DebugMacros.h: No such file or directory
 #include "../common/DebugMacros.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Compiling .pio\build\esp32-s3-devkitc-1\lib04d\SdFat - Adafruit Fork@src-e4cacd363521981f940076dd6b7f4ac0\ExFatLib\ExFatName.cpp.o
*** [.pio\build\esp32-s3-devkitc-1\src\main.cpp.o] Error 1
xtensa-esp32s3-elf-g++: error: .pio/libdeps/esp32-s3-devkitc-1/SdFat - Adafruit Fork@src-e4cacd363521981f940076dd6b7f4ac0/src/ExFatLib/ExFatFileWrite.cpp: No such file or directory
xtensa-esp32s3-elf-g++: fatal error: no input files
compilation terminated.
*** [.pio\build\esp32-s3-devkitc-1\lib04d\SdFat - Adafruit Fork@src-e4cacd363521981f940076dd6b7f4ac0\ExFatLib\ExFatFilePrint.cpp.o] Error 1
*** [.pio\build\esp32-s3-devkitc-1\lib04d\SdFat - Adafruit Fork@src-e4cacd363521981f940076dd6b7f4ac0\ExFatLib\ExFatFile.cpp.o] Error 1
*** [.pio\build\esp32-s3-devkitc-1\lib04d\SdFat - Adafruit Fork@src-e4cacd363521981f940076dd6b7f4ac0\ExFatLib\ExFatFileWrite.cpp.o] Error 1
xtensa-esp32s3-elf-g++: error: .pio/libdeps/esp32-s3-devkitc-1/SdFat - Adafruit Fork@src-e4cacd363521981f940076dd6b7f4ac0/src/ExFatLib/ExFatFormatter.cpp: No such file or directory
xtensa-esp32s3-elf-g++: fatal error: no input files
compilation terminated.
*** [.pio\build\esp32-s3-devkitc-1\lib04d\SdFat - Adafruit Fork@src-e4cacd363521981f940076dd6b7f4ac0\ExFatLib\ExFatFormatter.cpp.o] Error 1
.pio/libdeps/esp32-s3-devkitc-1/SdFat - Adafruit Fork@src-e4cacd363521981f940076dd6b7f4ac0/src/ExFatLib/ExFatName.cpp:26:10: fatal error: ../common/DebugMacros.h: No such file or directory
 #include "../common/DebugMacros.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pio\build\esp32-s3-devkitc-1\lib04d\SdFat - Adafruit Fork@src-e4cacd363521981f940076dd6b7f4ac0\ExFatLib\ExFatName.cpp.o] Error 1
In file included from .pio/libdeps/esp32-s3-devkitc-1/SdFat - Adafruit Fork@src-e4cacd363521981f940076dd6b7f4ac0/src/ExFatLib/ExFatVolume.h:27,
                 from .pio/libdeps/esp32-s3-devkitc-1/SdFat - Adafruit Fork@src-e4cacd363521981f940076dd6b7f4ac0/src/ExFatLib/ExFatDbg.cpp:25:
.pio/libdeps/esp32-s3-devkitc-1/SdFat - Adafruit Fork@src-e4cacd363521981f940076dd6b7f4ac0/src/ExFatLib/ExFatFile.h:33:10: fatal error: ../common/FsDateTime.h: No such file or directory
 #include "../common/FsDateTime.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pio\build\esp32-s3-devkitc-1\lib04d\SdFat - Adafruit Fork@src-e4cacd363521981f940076dd6b7f4ac0\ExFatLib\ExFatDbg.cpp.o] Error 1

Any help would be great !