2018-12-06 10:03 AM
I'd like to be able to printf into IDE console during debug. I'm using Atollic 9.1, Nucleus F413 board with Segger debug programmed into onboard debug interface. I followed the instructions here:
Nothing happens when I printf: The debugger never hits a breakpoint in the modified _write in syscalls.
What am I doing wrong?
Thanks!
Best Regards, Dave
2018-12-07 12:32 PM
You have to understand that You have multiple problems. I provided information for solving one of them. printf() not calling _write() is one problem and not being able to receive data sent by ITM_SendChar() is another completely separate problem.
As You have flashed J-Link firmware, You can try J-Link SWO Viewer from Segger. It is very simple and therefore easy to get to some functional starting point in using SWO pin.
2018-12-07 12:40 PM
At least 3 problems, as clearly listed above...
2020-08-17 06:52 AM
Hi Dave,
I had the same issue. printf works if I use some short string to print, not more then 5 characters approximately. Longer string cause error
seems there is unexpected use of malloc behind the call...
I found the help here:
implement Your own malloc fanctions.
void *malloc( size_t xBytes )
{
return pvPortMalloc( xBytes );
}
void free( void *pvBuffer )
{
vPortFree( pvBuffer );
}
Peter