1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-13 11:29:58 +03:00

Allow change of debug flags without forcing complete rebuild (#13708)

This commit is contained in:
Steve Evans 2024-07-28 23:29:45 +01:00 committed by GitHub
parent 1fb73b36f4
commit 6e0855c296
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -34,7 +34,7 @@ CUSTOM_DEFAULTS_EXTENDED ?= no
# Debugger optons:
# empty - ordinary build with all optimizations enabled
# INFO - ordinary build with debug symbols and all optimizations enabled
# INFO - ordinary build with debug symbols and all optimizations enabled. Only builds touched files.
# GDB - debug build with minimum number of optimizations
DEBUG ?=
@ -142,6 +142,15 @@ EXTRA_LD_FLAGS :=
#
# Default Tool options - can be overridden in {mcu}.mk files.
#
DEBUG_MIXED = no
ifeq ($(DEBUG),INFO)
DEBUG_MIXED = yes
endif
ifeq ($(DEBUG),GDB)
DEBUG_MIXED = yes
endif
ifeq ($(DEBUG),GDB)
OPTIMISE_DEFAULT := -Og
@ -336,7 +345,12 @@ TARGET_MAP = $(OBJECT_DIR)/$(FORKNAME)_$(TARGET_NAME).map
TARGET_EXST_HASH_SECTION_FILE = $(TARGET_OBJ_DIR)/exst_hash_section.bin
ifeq ($(DEBUG_MIXED),yes)
TARGET_EF_HASH := $(shell echo -n -- "$(EXTRA_FLAGS)" "$(OPTIONS)" "$(DEVICE_FLAGS)" "$(TARGET_FLAGS)" | openssl dgst -md5 -r | awk '{print $$1;}')
else
TARGET_EF_HASH := $(shell echo -n -- "$(EXTRA_FLAGS)" "$(OPTIONS)" "$(DEBUG_FLAGS)" "$(DEVICE_FLAGS)" "$(TARGET_FLAGS)" | openssl dgst -md5 -r | awk '{print $$1;}')
endif
TARGET_EF_HASH_FILE := $(TARGET_OBJ_DIR)/.efhash_$(TARGET_EF_HASH)
CLEAN_ARTIFACTS := $(TARGET_BIN)