I loaded the example sketch referenced above. If CFG_TUSB_DEBUG is 0, the sketch builds fine. If it is 1, 2, or 3, I get the errors described in the referenced BuildErrors.txt file.
How to reproduce ?
Launch the Arduino IDE
Install the Raspberry Pi Pico/RP2040 Arduino Core using the board manager
Select board Raspberry Pi Pico
Install the Adafruit_TinyUSB_Library and all of its dependencies
Install the usb_midi_host library using the Library Manager
When the usb_midi_host_example.ino sketch opens, Tools->USB Stack: Adafruit TinyUSB Host
Click the Verify checkmark icon.
Observe the code builds with no errors and only the expected warnings.
Using a text editor, change Arduino/libraries/Adafruit_TinyUSB_Library/src/arduino/ports/rp2040/tusb_config_rp2040.h line 68 from
#define CFG_TUSB_DEBUG 0
to
#define CFG_TUSB_DEBUG 1
Observe the build errors referenced above.
Note: If I try the above steps with sketch usb_midi_host_pio_example.ino but choose Tools->USB Stack: Adafruit TinyUSB, then everything build normally. The issue appears to be tied to selecting Adafruit TinyUSB Host.
Note: If I add the following code to my sketch, the code builds fine and the debug log works as expected
// Debugging
int log_printf(const char * format, ...)
{
char outstr[256];
va_list va;
va_start(va, format);
int ret = vsprintf(outstr, format, va);
// Uncomment the next line to send the debug log to the Serial1 output
return Serial1.print(outstr);
}
Operating System
Linux
Arduino IDE version
2.3.0
Board
Raspberry Pi Pico
ArduinoCore version
3.7.0
TinyUSB Library version
3.0.0
Sketch as ATTACHED TXT
Sketch is usb_midi_host_example.ino
Compiled Log as ATTACHED TXT
BuildErrors.txt
What happened ?
I loaded the example sketch referenced above. If
CFG_TUSB_DEBUG
is 0, the sketch builds fine. If it is 1, 2, or 3, I get the errors described in the referenced BuildErrors.txt file.How to reproduce ?
usb_midi_host_example.ino
sketch opens, Tools->USB Stack: Adafruit TinyUSB HostArduino/libraries/Adafruit_TinyUSB_Library/src/arduino/ports/rp2040/tusb_config_rp2040.h
line 68 fromto
Note: If I try the above steps with sketch usb_midi_host_pio_example.ino but choose Tools->USB Stack: Adafruit TinyUSB, then everything build normally. The issue appears to be tied to selecting Adafruit TinyUSB Host.
Note: If I add the following code to my sketch, the code builds fine and the debug log works as expected
Debug Log
N/A
Screenshots
N/A