Teensy with MIDI and serial

I’d like to use Teensy as a MIDI device and still communicate with it using serial. In the Arduino IDE you can do this by selecting USB Type as “Serial + MIDI” from the menu.

With PlaformIO, if I set the build flags to the following…

build_flags = -DTEENSY31 -UUSB_SERIAL -DUSB_MIDI

…I can’t see a serial device. The USB mouse example works with both serial and HID device emulation though. Any advice?