This commit is contained in:
2021-02-16 13:14:49 +01:00
parent 5d8567a206
commit 901b2fbea4
2 changed files with 5 additions and 1 deletions

View File

@ -26,6 +26,9 @@ ifndef NETWORK
$(error NETWORK is not set) $(error NETWORK is not set)
endif endif
VERSION := $(shell git rev-parse --short=8 HEAD)
###################################### ######################################
# target # target
###################################### ######################################
@ -178,7 +181,7 @@ endif
# compile gcc flags # compile gcc flags
ASFLAGS = $(MCU) $(AS_DEFS) $(AS_INCLUDES) $(OPT) -Wall -Werror -fdata-sections -ffunction-sections ASFLAGS = $(MCU) $(AS_DEFS) $(AS_INCLUDES) $(OPT) -Wall -Werror -fdata-sections -ffunction-sections
CFLAGS = $(MCU) $(C_DEFS) $(C_INCLUDES) $(OPT) -DNETWORK=$(NETWORK) -Wall -Werror -fdata-sections -ffunction-sections CFLAGS = $(MCU) $(C_DEFS) $(C_INCLUDES) $(OPT) -DNETWORK=$(NETWORK) -DVERSION="\"$(VERSION)\"" -Wall -Werror -fdata-sections -ffunction-sections
ifeq ($(DEBUG), 1) ifeq ($(DEBUG), 1)
CFLAGS += -g -gdwarf-2 CFLAGS += -g -gdwarf-2

View File

@ -35,6 +35,7 @@ void my_setup_2() {
show(LED_RED, OFF); show(LED_RED, OFF);
show(LED_GREEN, BLINK); show(LED_GREEN, BLINK);
logMsg("Application starting"); logMsg("Application starting");
logMsg("Version: " VERSION);
eepromInit(); eepromInit();