From 074ac33b8a646726f84917b78fa31e95fc706704 Mon Sep 17 00:00:00 2001 From: geeksville Date: Wed, 29 Apr 2020 20:23:59 -0700 Subject: [PATCH] make a gdb "restart" command that allows restarting without rebuilding --- gdbinit | 6 ++++++ platformio.ini | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 gdbinit diff --git a/gdbinit b/gdbinit new file mode 100644 index 00000000..2af350b3 --- /dev/null +++ b/gdbinit @@ -0,0 +1,6 @@ +# the jlink debugger seems to want a pause after reset before we tell it to start running +define restart + monitor reset + shell sleep 1 + cont +end diff --git a/platformio.ini b/platformio.ini index 4f39e790..b8ba35f5 100644 --- a/platformio.ini +++ b/platformio.ini @@ -141,7 +141,11 @@ lib_deps = https://github.com/meshtastic/BQ25703A.git monitor_port = /dev/ttyACM1 +debug_extra_cmds = + source gdbinit + ; Set initial breakpoint (defaults to main) debug_init_break = ;debug_init_break = tbreak loop -;debug_init_break = tbreak Reset_Handler \ No newline at end of file +;debug_init_break = tbreak Reset_Handler +