diff --git a/Makefile b/Makefile index a19e6b1..0002c23 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ export APP ?= 1 export SPI_SIZE_MAP ?= 5 export SPI_SPEED ?= 40 export SPI_MODE=QIO - +GIT_TAG:=$(shell git describe --tags --always --dirty="-dev") TARGET = eagle #FLAVOR = release FLAVOR = debug @@ -45,7 +45,7 @@ endif # } PDIR LDDIR = $(SDK_PATH)/ld -CCFLAGS += -Os +CCFLAGS += -Os -DCURRENT_VERSION=\"$(GIT_TAG)\" TARGET_LDFLAGS = \ -nostdlib \ diff --git a/user/user_main.c b/user/user_main.c index e2d8f1b..fe817b4 100644 --- a/user/user_main.c +++ b/user/user_main.c @@ -185,6 +185,7 @@ static void ne_device_id_init(void) memset(g_DeviceId, 0, 33); SysBin2HexStr(g_DeviceId, devMd5, 16); + LOG_EX(LOG_Info, "APP version:%s\n", CURRENT_VERSION); LOG_EX(LOG_Info, "SDK version:%s %d firmware version=%s\n", system_get_sdk_version(), system_get_free_heap_size(), FIRMWARE_VERSION); LOG_EX(LOG_Info, "Chip ID: %s(%u)\n", g_DeviceId, uDevId);