Skip to content

Commit

Permalink
Fix Variable Trace handling (qmk#9831)
Browse files Browse the repository at this point in the history
It wants a number, but a number of files have it set to "no", even
though it's commented out.  This means that if you set it to no, it
will cause a compiler error.  This sets the default to "no", and
checks to make sure it's not set to "no" before processing it, and
striping the value from it.
  • Loading branch information
drashna authored Jul 26, 2020
1 parent aaf5815 commit d2be3a7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions common_features.mk
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,13 @@ ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes)
VAPTH += $(SERIAL_PATH)
endif

ifneq ($(strip $(VARIABLE_TRACE)),)
VARIABLE_TRACE ?= no
ifneq ($(strip $(VARIABLE_TRACE)),no)
SRC += $(QUANTUM_DIR)/variable_trace.c
OPT_DEFS += -DNUM_TRACED_VARIABLES=$(strip $(VARIABLE_TRACE))
ifneq ($(strip $(MAX_VARIABLE_TRACE_SIZE)),)
OPT_DEFS += -DMAX_VARIABLE_TRACE_SIZE=$(strip $(MAX_VARIABLE_TRACE_SIZE))
endif
ifneq ($(strip $(MAX_VARIABLE_TRACE_SIZE)),)
OPT_DEFS += -DMAX_VARIABLE_TRACE_SIZE=$(strip $(MAX_VARIABLE_TRACE_SIZE))
endif
endif

ifeq ($(strip $(LCD_ENABLE)), yes)
Expand Down

0 comments on commit d2be3a7

Please sign in to comment.