Skip to content

Commit 06f5fbc

Browse files
committed
Fix linefeed issues in crash dump output
1 parent a6e27b1 commit 06f5fbc

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

rtos/TARGET_CORTEX/TARGET_CORTEX_M/mbed_rtx_fault_handler.c

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -194,17 +194,13 @@ void fault_print_str(char *fmtstr, uint32_t *values)
194194
char hex_str[9]={0};
195195

196196
while(fmtstr[i] != '\0') {
197-
if(fmtstr[i] == '\n' || fmtstr[i] == '\r') {
198-
serial_putc(&stdio_uart, '\r');
199-
} else {
200-
if(fmtstr[i]=='%') {
201-
hex_to_str(values[vidx++],hex_str);
202-
for(idx=7; idx>=0; idx--) {
203-
serial_putc(&stdio_uart, hex_str[idx]);
204-
}
205-
} else {
206-
serial_putc(&stdio_uart, fmtstr[i]);
197+
if(fmtstr[i]=='%') {
198+
hex_to_str(values[vidx++],hex_str);
199+
for(idx=7; idx>=0; idx--) {
200+
serial_putc(&stdio_uart, hex_str[idx]);
207201
}
202+
} else {
203+
serial_putc(&stdio_uart, fmtstr[i]);
208204
}
209205
i++;
210206
}

0 commit comments

Comments
 (0)