2021-09-20 11:12 AM
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.
I can't figure out what is causing this behavior.
Solved! Go to Solution.
2021-09-21 10:24 AM
Solved. printf() was called before the osKernelStart(). Placing a printf() in a task worked fine.
2021-09-21 10:24 AM
Solved. printf() was called before the osKernelStart(). Placing a printf() in a task worked fine.