Fix version signature

This commit is contained in:
Armel FAUVEAU
2024-02-05 02:04:23 +01:00
parent 5acc7de23f
commit 0844f74107
2 changed files with 31 additions and 21 deletions

View File

@@ -201,22 +201,32 @@ endif
OBJCOPY = arm-none-eabi-objcopy
SIZE = arm-none-eabi-size
AUTHOR_STRING ?= EGZUMER
# the user might not have/want git installed
# can set own version string here (max 7 chars)
ifneq (, $(shell $(WHERE) git))
VERSION_STRING ?= $(shell git describe --tags --exact-match 2>$(NULL_OUTPUT))
ifeq (, $(VERSION_STRING))
VERSION_STRING := $(shell git rev-parse --short HEAD)
endif
endif
# If there is still no VERSION_STRING we need to make one.
# It is needed for the firmware packing script
ifeq (, $(VERSION_STRING))
VERSION_STRING := NOGIT
endif
#VERSION_STRING := 230930b
ifeq ($(ENABLE_FEAT_F4HWN),1)
AUTHOR_STRING_1 ?= EGZUMER
VERSION_STRING_1 ?= v0.22
AUTHOR_STRING_2 ?= F4HWN
VERSION_STRING_2 ?= v1.7
AUTHOR_STRING ?= $(AUTHOR_STRING_1)+$(AUTHOR_STRING_2)
VERSION_STRING ?= $(VERSION_STRING_2)
else
AUTHOR_STRING ?= EGZUMER
# the user might not have/want git installed
# can set own version string here (max 7 chars)
ifneq (, $(shell $(WHERE) git))
VERSION_STRING ?= $(shell git describe --tags --exact-match 2>$(NULL_OUTPUT))
ifeq (, $(VERSION_STRING))
VERSION_STRING := $(shell git rev-parse --short HEAD)
endif
endif
# If there is still no VERSION_STRING we need to make one.
# It is needed for the firmware packing script
ifeq (, $(VERSION_STRING))
VERSION_STRING := NOGIT
endif
#VERSION_STRING := 230930b
endif
ASFLAGS = -c -mcpu=cortex-m0
ifeq ($(ENABLE_OVERLAY),1)
@@ -380,8 +390,9 @@ ifeq ($(ENABLE_CUSTOM_MENU_LAYOUT),1)
endif
ifeq ($(ENABLE_FEAT_F4HWN),1)
CFLAGS += -DENABLE_FEAT_F4HWN
FEAT_STRING ?= "F4HWN v1.7"
CFLAGS += -DFEAT_STRING=\"$(FEAT_STRING)\" -DALERT_TOT=10
CFLAGS += -DALERT_TOT=10
CFLAGS += -DAUTHOR_STRING_1=\"$(AUTHOR_STRING_1)\" -DVERSION_STRING_1=\"$(VERSION_STRING_1)\"
CFLAGS += -DAUTHOR_STRING_2=\"$(AUTHOR_STRING_2)\" -DVERSION_STRING_2=\"$(VERSION_STRING_2)\"
endif
LDFLAGS =

View File

@@ -6,11 +6,10 @@
#endif
#ifdef ENABLE_FEAT_F4HWN
const char Version[] = AUTHOR_STRING " v0.22";
const char UART_Version[] = "UV-K5 Firmware, Open Edition, " AUTHOR_STRING "\r\n";
const char Feat[] = "Feat " FEAT_STRING;
const char Version[] = AUTHOR_STRING_1 " " VERSION_STRING_1;
const char Feat[] = "Feat " AUTHOR_STRING_2 " " VERSION_STRING_2;
#else
const char Version[] = AUTHOR_STRING VER;
const char UART_Version[] = "UV-K5 Firmware, Open Edition, " AUTHOR_STRING VER "\r\n";
#endif
const char UART_Version[] = "UV-K5 Firmware, Open Edition, " AUTHOR_STRING VER "\r\n";