Loading...
 
Skip to main content

System Workbench for STM32


Redirecting printf() does not work

I've done everything mentioned here and in many other pages I Googled.... but I still cannot get printf to work.
HAL_UART_Transmit(&huart1, (uint8_t *)&ch, 1, 0xFFFF); works.
I have syscalls.c

I get this warning :
"./Core/Src/main.c:152:31: warning: '__io_putchar' defined but not used -Wunused-function
#define PUTCHAR_PROTOTYPE int __io_putchar(int ch)

../Core/Src/main.c:158:3: note: in expansion of macro 'PUTCHAR_PROTOTYPE'
PUTCHAR_PROTOTYPE
~~~~~~~~~~~~~~~~
Finished building: ../Core/Src/main.c "

I guess the fact that __io_putchar not being used is the root of the problem ?

Any ideas what I'm doing wrong here ?

 
Collapse/expand modules below