This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

printf and RTX on STM32 (CM3)

Hello everyone,

I am trying to use printf via ITM-Port (Debug (printf) Viewer) within an RTX-Application on a STM32F103.

Here is what happens:

The message is written to the viewer window, but after writing the first messag it falls into the hard fault handler.
After the message is displayed it calls _mutex_acquire (the standard implementation in RTX_lib.c) where mutex_wait (what is a define for _os_mut_wait) is called. It is the first time _mutex_acquire is called. mutex_wait is a SVC-Call. According to the call stack window the SVC_handler (I assume mutex_wait) calls rt_mut_wait where the HardFault occures. I noticed that _mutex_initialize seemes not to be called.
The hard fault handler is called because I haven't activated any other handlers. The fault reports say that there is an IMPRECISERR bus fault.

Any idea how to make it work?

Many thanks in advance and best regards
Alex

0