Redirecting printf() does not work
The solution is :copy _write function in syscalls.c to place under __io_putchar ,if a multi declare error occure while compiling,recover _write function to previouse place.
For example ,i used touchgfx,compiled in linux,and encounted the same issue,and found a file named gccstubs.cpp in touchgfx/config/gcc/gccstubs.cpp,_write function in it is blank,then i replace the _write function,and printf is working to uart.