I think it is quite easy to replicate, use LDFLAGS = -lc -lrdimon --specs=rdimon.specs and test USB Midi, it will not work.
Also Logger<LOGGER_SEMIHOST> will not work unless those linker flags are used, unless I am missing something.
Here is the code:
#ifdef SEMI_HOSTING
if(CoreDebug->DHCSR & 0x01)
initialise_monitor_handles();
#endif
…
#ifdef SEMI_HOSTING
Logger<LOGGER_SEMIHOST>::StartLog(true);
#endif
…
#ifdef SEMI_HOSTING
Logger<LOGGER_SEMIHOST>::Print("Hello %u\n", uCount++);
#endif
So that all works as long as the linker flags are set correctly but USB Midi does not work if those linker flags are set.