Skip to content

Commit

Permalink
Allow change of debug flags without forcing complete rebuild (betafli…
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveCEvans authored Jul 28, 2024
1 parent 1fb73b3 commit 6e0855c
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?=

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 6e0855c

Please sign in to comment.