Skip to content

Commit

Permalink
output build data time and git rev when start
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiangfu Liu committed Sep 2, 2011
1 parent 39f76b3 commit 43c2a46
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/Makefile
Expand Up @@ -10,6 +10,12 @@ LDFLAGS+= -T linker.ld -N
LDFLAGS+= -L$(MMDIR)/software/libbase -L$(MMDIR)/software/libmath -L$(MMDIR)/software/libnet -L$(MMDIR)/software/libhal
LIBS = -lbase -lmath -lnet -lhal

CFLAGS+= -DVERSION='"$(GIT_VERSION)$(GIT_STATUS)"'

GIT_VERSION:=$(shell git rev-parse HEAD | cut -c 1-7)
GIT_STATUS:=$(shell [ -z "`git status -s -uno`" ] || echo +)


all: boot.bin

%.bin: %.elf
Expand Down
3 changes: 2 additions & 1 deletion src/main.c
Expand Up @@ -201,7 +201,8 @@ int main()
irq_setmask(0);
irq_enable(1);
uart_init();
printf("*** Milkymist One automated tests starting...\n\n");
printf("*** Milkymist One automated tests starting...\n");
printf("*** Built: %s at %s (rev %s)\n\n", __DATE__, __TIME__, VERSION);
while(1) {
printf("*** Select a test category below, or hit ENTER to run all tests:\n");
i = 0;
Expand Down

0 comments on commit 43c2a46

Please sign in to comment.