From 40f960db4d3c36dcc56a6e3c2274af454667d777 Mon Sep 17 00:00:00 2001 From: Gareth McMullin Date: Wed, 28 Sep 2016 22:15:15 -0700 Subject: [PATCH] Restore LED behaviour. --- src/command.c | 2 ++ src/gdb_main.c | 2 ++ src/platforms/native/platform.h | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/command.c b/src/command.c index be53dad..9594c3a 100644 --- a/src/command.c +++ b/src/command.c @@ -182,6 +182,7 @@ static bool cmd_jtag_scan(target *t, int argc, char **argv) return false; } cmd_targets(); + morse(NULL, false); return true; } @@ -213,6 +214,7 @@ bool cmd_swdp_scan(void) } cmd_targets(); + morse(NULL, false); return true; } diff --git a/src/gdb_main.c b/src/gdb_main.c index 40cb829..6e9e958 100644 --- a/src/gdb_main.c +++ b/src/gdb_main.c @@ -33,6 +33,7 @@ #include "target.h" #include "command.h" #include "crc32.h" +#include "morse.h" enum gdb_signal { GDB_SIGINT = 2, @@ -183,6 +184,7 @@ int gdb_main_loop(struct target_controller *tc, bool in_syscall) switch (reason) { case TARGET_HALT_ERROR: gdb_putpacket_f("X%02X", GDB_SIGLOST); + morse("TARGET LOST.", true); break; case TARGET_HALT_REQUEST: gdb_putpacket_f("T%02X", GDB_SIGINT); diff --git a/src/platforms/native/platform.h b/src/platforms/native/platform.h index 282b767..e6833b0 100644 --- a/src/platforms/native/platform.h +++ b/src/platforms/native/platform.h @@ -99,9 +99,9 @@ #define LED_0 GPIO2 #define LED_1 GPIO10 #define LED_2 GPIO11 -#define LED_UART (platform_hwversion() < 2 ? LED_2 : LED_0) +#define LED_UART LED_0 #define LED_IDLE_RUN LED_1 -#define LED_ERROR (platform_hwversion() < 2 ? LED_0 : LED_2) +#define LED_ERROR LED_2 #define TMS_SET_MODE() \ gpio_set_mode(TMS_PORT, GPIO_MODE_OUTPUT_50_MHZ, \