Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

output build data time and git rev when start

  • Loading branch information...
commit 43c2a467d154d53508daf8a5e6f71bee280eace1 1 parent 39f76b3
authored September 02, 2011

Showing 2 changed files with 8 additions and 1 deletion. Show diff stats Hide diff stats

  1. 6  src/Makefile
  2. 3  src/main.c
6  src/Makefile
@@ -10,6 +10,12 @@ LDFLAGS+= -T linker.ld -N
10 10
 LDFLAGS+= -L$(MMDIR)/software/libbase -L$(MMDIR)/software/libmath -L$(MMDIR)/software/libnet -L$(MMDIR)/software/libhal
11 11
 LIBS    = -lbase -lmath -lnet -lhal
12 12
 
  13
+CFLAGS+= -DVERSION='"$(GIT_VERSION)$(GIT_STATUS)"'
  14
+
  15
+GIT_VERSION:=$(shell git rev-parse HEAD | cut -c 1-7)
  16
+GIT_STATUS:=$(shell [ -z "`git status -s -uno`" ] || echo +)
  17
+
  18
+
13 19
 all: boot.bin
14 20
 
15 21
 %.bin: %.elf
3  src/main.c
@@ -201,7 +201,8 @@ int main()
201 201
 	irq_setmask(0);
202 202
 	irq_enable(1);
203 203
 	uart_init();
204  
-	printf("*** Milkymist One automated tests starting...\n\n");
  204
+	printf("*** Milkymist One automated tests starting...\n");
  205
+	printf("*** Built: %s at %s (rev %s)\n\n", __DATE__, __TIME__, VERSION);
205 206
 	while(1) {
206 207
 		printf("*** Select a test category below, or hit ENTER to run all tests:\n");
207 208
 		i = 0;

0 notes on commit 43c2a46

Please sign in to comment.
Something went wrong with that request. Please try again.