I’ve noticed that when I build with fast semihosting enabled, using –specs=rdimon.specs and –specs=nosys.specs, after I reset either via hard powercycle or the “Reset Device” button in the GDB Session window, calls to printf essentially crash the program in FastSemihosting.cpp::WriteRawFastSemihostingData(line 65) as it goes into an infintite loop:
while ((s_FastSemihostingState.WriteOffset – s_FastSemihostingState.ReadOffset) > (FAST_SEMIHOSTING_BUFFER_SIZE – minRequiredSize))
{
#if FAST_SEMIHOSTING_BLOCKING_MODE
continue;
#else
return 0;
#endif
}
s_FastSemihostingState.WriteOffset is 0, and s_FastSemihostingState.ReadOffset is some big number.