Esp32S3 : TinyUSB driver - Undefined reference to `tud_msc_read10_cb'... methods during compilation
Posted: Mon Sep 22, 2025 12:15 pm
Good afternoon,
I have a problem with the TinyUSB driver.
I am working on an Esp32S3 and I would like to turn my device into an USB-Serial interface (I would like my device to be accessible using a Serial Terminal on Windows so that I can enter caracters using the keyboard so that they are printed on the Terminal. (Echo mode).
In order to do that, I have used the "tusb_serial_device_main" example and everything works fine.
(With this example, the CDC Device Type is enabled in the sdkconfig file). I can execute Tera Term, I can connect to the USB-Serial interface and enter caracters with the keyboard => These caracters are directly printed on the Terminal.
Now, I would like my program to have two different behavior modes.
- In the 1st mode, it must start as a USB-Serial device => Like in the example above.
- In the 2nd mode, it must start as an USB Disk (FileSystem mounted on an USB Drive). => In order to do that, I have to enable the "MSC Device" in the SdkConfig menu.
The problem is that as soon as I enable the two options (CDC device/MSC device), I get the following errors during the compilation :
undefined reference to `tud_msc_test_unit_ready_cb'
undefined reference to `tud_msc_capacity_cb'
undefined reference to `tud_msc_inquiry_cb'
undefined reference to `tud_msc_read10_cb'
undefined reference to `tud_msc_write10_cb'
undefined reference to `tud_msc_scsi_cb'
undefined reference to `tud_msc_test_unit_ready_cb'
undefined reference to `tud_msc_capacity_cb'
undefined reference to `tud_msc_capacity_cb'
undefined reference to `tud_msc_inquiry_cb'
undefined reference to `tud_msc_read10_cb'
undefined reference to `tud_msc_write10_cb'
undefined reference to `tud_msc_scsi_cb'
undefined reference to `tud_msc_scsi_cb'
Do you know what can happen ?
What can I do ?
Thank you for your help,
Best regards,
Thomas TRUILHE
I have a problem with the TinyUSB driver.
I am working on an Esp32S3 and I would like to turn my device into an USB-Serial interface (I would like my device to be accessible using a Serial Terminal on Windows so that I can enter caracters using the keyboard so that they are printed on the Terminal. (Echo mode).
In order to do that, I have used the "tusb_serial_device_main" example and everything works fine.
(With this example, the CDC Device Type is enabled in the sdkconfig file). I can execute Tera Term, I can connect to the USB-Serial interface and enter caracters with the keyboard => These caracters are directly printed on the Terminal.
Now, I would like my program to have two different behavior modes.
- In the 1st mode, it must start as a USB-Serial device => Like in the example above.
- In the 2nd mode, it must start as an USB Disk (FileSystem mounted on an USB Drive). => In order to do that, I have to enable the "MSC Device" in the SdkConfig menu.
The problem is that as soon as I enable the two options (CDC device/MSC device), I get the following errors during the compilation :
undefined reference to `tud_msc_test_unit_ready_cb'
undefined reference to `tud_msc_capacity_cb'
undefined reference to `tud_msc_inquiry_cb'
undefined reference to `tud_msc_read10_cb'
undefined reference to `tud_msc_write10_cb'
undefined reference to `tud_msc_scsi_cb'
undefined reference to `tud_msc_test_unit_ready_cb'
undefined reference to `tud_msc_capacity_cb'
undefined reference to `tud_msc_capacity_cb'
undefined reference to `tud_msc_inquiry_cb'
undefined reference to `tud_msc_read10_cb'
undefined reference to `tud_msc_write10_cb'
undefined reference to `tud_msc_scsi_cb'
undefined reference to `tud_msc_scsi_cb'
Do you know what can happen ?
What can I do ?
Thank you for your help,
Best regards,
Thomas TRUILHE