1
0
Fork 0

Add version string

This commit is contained in:
tmk 2013-09-11 13:44:54 +09:00
parent f7395268c0
commit 8bc96ac571
2 changed files with 8 additions and 3 deletions

View file

@ -69,5 +69,9 @@ ifdef BACKLIGHT_ENABLE
endif
# Version string
OPT_DEFS += -DVERSION=$(shell (git describe --dirty || echo 'unknown') 2> /dev/null)
# Search Path
VPATH += $(TOP_DIR)/common

View file

@ -252,9 +252,10 @@ static bool command_common(uint8_t code)
case KC_V: // print version & information
print("\n\n----- Version -----\n");
print(STR(DESCRIPTION) "\n");
print(STR(MANUFACTURER) "(" STR(VENDOR_ID) ")/");
print(STR(PRODUCT) "(" STR(PRODUCT_ID) ") ");
print("VERSION: " STR(DEVICE_VER) "\n");
print("VID: " STR(VENDOR_ID) "(" STR(MANUFACTURER) ") PID: " STR(PRODUCT_ID) "(" STR(PRODUCT) ") VER: " STR(DEVICE_VER) "\n");
print("SRC: " STR(VERSION) "\n");
print("GCC: " STR(__GNUC__) "." STR(__GNUC_MINOR__) "." STR(__GNUC_PATCHLEVEL__) "\n");
print("AVR-LIBC: " __AVR_LIBC_VERSION_STRING__ "\n");
break;
case KC_T: // print timer
print_val_hex32(timer_count);