chegewara / EspTinyUSB

ESP32S2 native USB library. Implemented few common classes, like MIDI, CDC, HID or DFU (update).
MIT License
473 stars 70 forks source link

TAG constant defined in diskio_rawmsc.cpp prevents defining TAG in platformio.ini #133

Open beorosz opened 1 year ago

beorosz commented 1 year ago

When using ESP32TinyUSB in PlatformIO project, I define USE_ESP_IDF_LOG and the TAG in the platformio.ini. This way I am able to use Arduino Core log_x functions, both for serial and file logging. However, when I build the PIO project, it fails with the following:

<command-line>: error: expected unqualified-id before string constant
.pio/libdeps/esp32-s2-saola-1/ESP32TinyUSB/src/host/msc/vfs/diskio_rawmsc.cpp:28:20: note: in expansion of macro 'TAG'
 static const char *TAG = "msc_rawflash";

If I delete the TAG line (or enclose it with #ifndef TAG ... #endif) the error goes away, I can compile my project.