Why does Terminal I/O redirection break on IAR when enabling CubeMX FreeRTOS?
I created two CubeMX projects for an STM32L412K Nucleo and IAR EWARM 8.50.9 (licensed).
Project A is a simple default, I don't modify anything at all.
Project B takes project A and enables FreeRTOS in the Middlewares.
I add "printf("test") before while(1) in Project A, and before osKernelStart() in Project B.
When I debug Project A, the test message appears in Terminal IO. The implementation appears to follow _DLIB_FILE_DESCRIPTOR=0, because putchar calls _write as shown in the DLIB library file source.
However, Project B does NOT print anything. And the disassembly shows that putchar calls fputc, which looks like DLIB putchar.c was compiled with _DLIB_FILE_DESCRIPTOR=1.
- Nowhere is DLIB_FILE_DESCRIPTOR reconfigured in either project. And manually setting it to zero doesn't fix Project B.
- Nowhere is weak putchar() overridden in either project.
I can't figure out what is causing this behavior.