Write \r before \n in uart_putch.