Building an Arduino project for a self-built ESP32 S2 board.
Project compiles just fine, but when adding the build flag
-DARDUINO_USB_MODE=1
it fails with the following error message
In file included from /Users/julian/.platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:197,
from src/main.cpp:1:
src/main.cpp: In function ‘void printMessage(int)’:
/Users/julian/.platformio/packages/framework-arduinoespressif32/cores/esp32/HardwareSerial.h:356:16: error: ‘HWCDCSerial’ was not declared in this scope
356 | #define Serial HWCDCSerial
and a bunch of repetitions of the same.
I’m a little out of my depth here. Without the flag the ESP won’t register as an USB device, so i have no serial connection when not in Boot mode.
Happy to hear any pointers.