Skip to content

Commit fc61b8a

Browse files
committed
Add missing carriage returns to fault handler
Fault handler was outputting just LFs between lines, when standard terminals require CR+LF, leading to messy output.
1 parent cabef4d commit fc61b8a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

rtos/TARGET_CORTEX/TARGET_CORTEX_M/mbed_rtx_fault_handler.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,9 @@ void fault_print_str(char *fmtstr, uint32_t *values)
220220
serial_putc(&stdio_uart, hex_str[idx]);
221221
}
222222
} else {
223+
if (fmtstr[i] == '\n') {
224+
serial_putc(&stdio_uart, '\r');
225+
}
223226
serial_putc(&stdio_uart, fmtstr[i]);
224227
}
225228
i++;

0 commit comments

Comments
 (0)