]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
Add version string
authortmk <nobody@nowhere>
Wed, 11 Sep 2013 04:44:54 +0000 (13:44 +0900)
committertmk <nobody@nowhere>
Wed, 11 Sep 2013 04:44:54 +0000 (13:44 +0900)
common.mk
common/command.c

index 47d5c852f330cb93842f1196d9d93889cf2f279f..64ef86c404486820c8798a135d59e10b92aebe45 100644 (file)
--- a/common.mk
+++ b/common.mk
@@ -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
index 4649e00ab020900c195be0c1206792ac53d4f5e2..7415645b0d244c003cf1c2c89458de9d39b10fc4 100644 (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);