re-directing usart to printf
I’m trying to use printf with usart 2, which is the programing port on the Nucleo401.
Using the following lines the uart2 works ok :-
char *msg = “Hello ARM\n\r”;
HAL_UART_Transmit(&huart2, (uint8_t*)msg, strlen(msg), 0xFFFF);
but
printf(“hello arm”);
despite compiling ok, does not.
Do I need to configures a particular uart to work with printf? If so what is the set up code?
Is it even a good idea to use printf in an embeded systems?