2021-06-17 05:24 AM
Hello. I programming STM32WB55 nucleo device and trying to setup printf for debugging. I have no luck so far setting it up. I have tried replacing _write in syscals.c with
__attribute__((weak)) int _write(int file, char *ptr, int len)
{
int DataIdx;
for (DataIdx = 0; DataIdx < len; DataIdx++)
{
ITM_SendChar( *ptr++ );
}
return len;
} But with no luck yet. The error returned:
Undefined reference to "ITM_SendChar"
I believe the wb55 does not support ITM right? Is there any other way to achieve printf to console in cubeIDE?
2021-06-18 03:03 AM
There are a few ways to achieve printf redirection.
We have a chapter in our user manual about this specific topic, chapter 2.6.1.
You can find the user manual here and if you have any additional questions let me know!