summaryrefslogtreecommitdiffstats
path: root/firmware/usb-dfu-project
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-06-25 15:09:34 +0200
committerHarald Welte <laforge@gnumonks.org>2012-06-25 15:09:55 +0200
commitdc23dc5a81c30ae9e20a72691bf964f1a2f6547b (patch)
treea5f9aca04301621536e03aa5e43491bb287bdb8c /firmware/usb-dfu-project
parent233c5b7201661080efee58935c7bf9da66541353 (diff)
include auto-generated GIT_REVISION into the DFU and firmware builds
At the moment it is only shown on the serial console, though.
Diffstat (limited to 'firmware/usb-dfu-project')
-rw-r--r--firmware/usb-dfu-project/Makefile4
-rw-r--r--firmware/usb-dfu-project/main.c5
2 files changed, 6 insertions, 3 deletions
diff --git a/firmware/usb-dfu-project/Makefile b/firmware/usb-dfu-project/Makefile
index d41be19..174105a 100644
--- a/firmware/usb-dfu-project/Makefile
+++ b/firmware/usb-dfu-project/Makefile
@@ -69,6 +69,10 @@ include $(AT91LIB)/boards/$(BOARD)/board.mak
BIN = bin
OBJ = obj
+GIT_REVISION := $(shell ../../git-version-gen ../../.tarball_version)
+ASFLAGS += -DGIT_REVISION=\"$(GIT_REVISION)\"
+CFLAGS += -DGIT_REVISION=\"$(GIT_REVISION)\"
+
#-------------------------------------------------------------------------------
# Tools
#-------------------------------------------------------------------------------
diff --git a/firmware/usb-dfu-project/main.c b/firmware/usb-dfu-project/main.c
index 5e01092..592e8fd 100644
--- a/firmware/usb-dfu-project/main.c
+++ b/firmware/usb-dfu-project/main.c
@@ -446,9 +446,8 @@ int main(void)
TRACE_CONFIGURE(DBGU_STANDARD, 115200, BOARD_MCK);
-// printf("-- USB DFU Test %s --\n\r", SOFTPACK_VERSION);
- printf("-- %s\n\r", BOARD_NAME);
-// printf("-- Compiled: %s %s --\n\r", __DATE__, __TIME__);
+ printf("-- Osmocom USB DFU (" BOARD_NAME ") " GIT_REVISION " --\n\r");
+ printf("-- Compiled: %s %s --\n\r", __DATE__, __TIME__);
rst_type = (RSTC_GetStatus() >> 8) & 0x7;
//printf("-- Reset type: %s --\n\r", rst_type_strs[rst_type]);