From 0dfdc25bb27a6cf56f13a1f9a1c1b233d6aab107 Mon Sep 17 00:00:00 2001 From: Gareth McMullin Date: Fri, 18 Feb 2011 13:50:21 +1300 Subject: Added git info to version output. Fixed memory leak in SWD mode. --- src/Makefile | 3 ++- src/adiv5_swdp.c | 3 +++ src/command.c | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src') 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 " "\n\n"); -- cgit v1.2.3