correct MK_BOOTLOADER_VERSION to same as git tag version

This commit is contained in:
hathach 2019-04-24 18:25:25 +07:00
parent 5eac387b5a
commit 01f854c3db
No known key found for this signature in database
GPG Key ID: 2FA891220FBFD581

View File

@ -1,11 +1,11 @@
#******************************************************************************
# CONFIGURE
# - SDK_PATH : path to SDK directory
# - SRC_PATH : path to src folder
# - SDK_PATH : path to SDK directory
# - SRC_PATH : path to src folder
#
# - SD_NAME : e.g s132, s140
# - SD_VER1, SD_VER2, SD_VER3: SoftDevice version e.g 6.0.0
# - SD_HEX : to bootloader hex binary
# - SD_NAME : e.g s132, s140
# - SD_VERSSION : SoftDevice version e.g 6.0.0
# - SD_HEX : to bootloader hex binary
#******************************************************************************
SRC_PATH = src
@ -16,16 +16,12 @@ SD_PATH = lib/softdevice/$(SD_FILENAME)
TUSB_PATH = lib/tinyusb/src
NRFX_PATH = lib/nrfx
SD_VER1 = 6
SD_VER2 = 1
SD_VER3 = 1
SD_VERSION = $(SD_VER1).$(SD_VER2).$(SD_VER3)
SD_VERSION = 6.1.1
SD_FILENAME = $(SD_NAME)_nrf52_$(SD_VERSION)
SD_API_PATH = $(SD_PATH)/$(SD_FILENAME)_API
SD_HEX = $(SD_PATH)/$(SD_FILENAME)_softdevice.hex
LD_FILE = $(SRC_PATH)/linker/$(SD_NAME)_v$(SD_VER1).ld
LD_FILE = $(SRC_PATH)/linker/$(SD_NAME)_v$(word 1, $(subst ., ,$(SD_VERSION))).ld
MERGED_FNAME = $(OUTPUT_FILENAME)_$(SD_NAME)_$(SD_VERSION)
@ -33,6 +29,7 @@ GIT_VERSION = $(shell git describe --dirty --always --tags)
GIT_SUBMODULE_VERSIONS = $(shell git submodule status | cut -d' ' -f3,4 | paste -s -d" " -)
OUTPUT_FILENAME = $(BOARD)_bootloader-$(GIT_VERSION)
#******************************************************************************
# Tool configure
#******************************************************************************
@ -240,10 +237,6 @@ CFLAGS += -ffunction-sections -fdata-sections -fno-strict-aliasing
CFLAGS += -fno-builtin --short-enums -fstack-usage
# Defined Symbol (MACROS)
# TODO use GIT_VERSION (numberic format)
CFLAGS += -DMK_BOOTLOADER_VERSION=0x0$(SD_VER1)0$(SD_VER2)0$(SD_VER3)UL
CFLAGS += -D__HEAP_SIZE=0
CFLAGS += -DCONFIG_GPIO_AS_PINRESET
CFLAGS += -DCONFIG_NFCT_PINS_AS_GPIOS
@ -256,6 +249,9 @@ CFLAGS += -DDFU_APP_DATA_RESERVED=7*4096
CFLAGS += -DUF2_VERSION='"$(GIT_VERSION) $(GIT_SUBMODULE_VERSIONS) $(SD_NAME) $(SD_VERSION)"'
CFLAGS += -DBLEDIS_FW_VERSION='"$(GIT_VERSION) $(SD_NAME) $(SD_VERSION)"'
_VER = $(subst ., ,$(word 1, $(subst -, ,$(GIT_VERSION))))
CFLAGS += -DMK_BOOTLOADER_VERSION='($(word 1,$(_VER)) << 16) + ($(word 2,$(_VER)) << 8) + $(word 3,$(_VER))'
ifneq ($(IS_52832),)
CFLAGS += -DNRF52
CFLAGS += -DNRF52832_XXAA