aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGareth McMullin2011-02-18 13:50:21 +1300
committerGareth McMullin2011-02-18 13:50:21 +1300
commit0dfdc25bb27a6cf56f13a1f9a1c1b233d6aab107 (patch)
tree93d34d117c9e179df21b39fd5a45c8b2c08034ae /src
parent660e861725828de1d6598414b22bfa8e7ee7de04 (diff)
Added git info to version output.
Fixed memory leak in SWD mode.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile3
-rw-r--r--src/adiv5_swdp.c3
-rw-r--r--src/command.c2
3 files changed, 6 insertions, 2 deletions
diff --git a/src/Makefile b/src/Makefile
index a673939..d9d985e 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -8,7 +8,8 @@ BUILDDATE := `date +"%Y%m%d"`
CFLAGS += -Wall -Wextra -Wno-pointer-sign -Wno-char-subscripts\
-O0 -std=gnu99 -g3 -DBUILDDATE=\"$(BUILDDATE)\"\
- -I. -Iinclude -I$(HOST)
+ -I. -Iinclude -I$(HOST) \
+ -DVERSION_SUFFIX=\"`../scripts/setlocalversion`\"
SRC = gdb_if.c \
gdb_packet.c \
diff --git a/src/adiv5_swdp.c b/src/adiv5_swdp.c
index 2c22749..432e54a 100644
--- a/src/adiv5_swdp.c
+++ b/src/adiv5_swdp.c
@@ -54,6 +54,9 @@ int adiv5_swdp_scan(void)
uint8_t ack;
TARGET_LIST_FREE();
+#warning "These should be elsewhere!"
+ adiv5_free_all();
+
dp = (void*)calloc(1, sizeof(ADIv5_DP_t));
swdptap_init();
diff --git a/src/command.c b/src/command.c
index 26c712e..1655cfd 100644
--- a/src/command.c
+++ b/src/command.c
@@ -87,7 +87,7 @@ int command_process(char *cmd)
void cmd_version(void)
{
- gdb_out("Black Magic Probe (Firmware 1.5, build " BUILDDATE ")\n");
+ gdb_out("Black Magic Probe (Firmware 1.5" VERSION_SUFFIX ", build " BUILDDATE ")\n");
gdb_out("Copyright (C) 2011 Black Sphere Technologies Ltd.\n");
gdb_out("License GPLv3+: GNU GPL version 3 or later "
"<http://gnu.org/licenses/gpl.html>\n\n");