From 7b250bfc8dc9cc4658b5793b1e2fd44810d95ff3 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 28 Nov 2017 22:10:49 +0100 Subject: [PATCH] board_simtrace: Add minimal debug menu on debug USART --- .../libboard/simtrace/source/board_simtrace.c | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/firmware/libboard/simtrace/source/board_simtrace.c b/firmware/libboard/simtrace/source/board_simtrace.c index 438a581d..8ba56427 100644 --- a/firmware/libboard/simtrace/source/board_simtrace.c +++ b/firmware/libboard/simtrace/source/board_simtrace.c @@ -10,8 +10,28 @@ void board_exec_dbg_cmd(int ch) { + switch (ch) { + case '?': + printf("\t?\thelp\n\r"); + printf("\tR\treset SAM3\n\r"); + break; + case 'R': + printf("Asking NVIC to reset us\n\r"); + USBD_Disconnect(); + NVIC_SystemReset(); + break; + default: + printf("Unknown command '%c'\n\r", ch); + break; + } } void board_main_top(void) { +#ifndef APPLICATION_dfu + usb_buf_init(); + + /* Initialize checking for card insert/remove events */ + //card_present_init(); +#endif }