diff options
author | Nick Brassel <[email protected]> | 2024-11-27 21:29:12 +1100 |
---|---|---|
committer | Nick Brassel <[email protected]> | 2024-11-27 21:29:12 +1100 |
commit | 9f76541b29056150cf57d69569a14a59e13995c7 (patch) | |
tree | 66c7398d873fcda88aebe3090603aefe045ff52e /builddefs | |
parent | 57be4871616ee9a8fe042f6186010d436ec7d4b1 (diff) | |
parent | eb04b94eecbb9b3e64ca9c74f937b5f762440b17 (diff) | |
download | qmk_firmware-9f76541b29056150cf57d69569a14a59e13995c7.tar.gz qmk_firmware-9f76541b29056150cf57d69569a14a59e13995c7.zip |
Merge branch 'develop'
Diffstat (limited to 'builddefs')
-rw-r--r-- | builddefs/build_full_test.mk | 2 | ||||
-rw-r--r-- | builddefs/build_keyboard.mk | 5 | ||||
-rw-r--r-- | builddefs/common_features.mk | 25 | ||||
-rw-r--r-- | builddefs/common_rules.mk | 43 | ||||
-rw-r--r-- | builddefs/generic_features.mk | 1 | ||||
-rw-r--r-- | builddefs/show_options.mk | 1 |
6 files changed, 34 insertions, 43 deletions
diff --git a/builddefs/build_full_test.mk b/builddefs/build_full_test.mk index 63f9fea915..5cae327c6c 100644 --- a/builddefs/build_full_test.mk +++ b/builddefs/build_full_test.mk @@ -21,8 +21,10 @@ $(TEST_OUTPUT)_SRC := \ $(SRC) \ $(QUANTUM_PATH)/keymap_introspection.c \ tests/test_common/matrix.c \ + tests/test_common/pointing_device_driver.c \ tests/test_common/test_driver.cpp \ tests/test_common/keyboard_report_util.cpp \ + tests/test_common/mouse_report_util.cpp \ tests/test_common/keycode_util.cpp \ tests/test_common/keycode_table.cpp \ tests/test_common/test_fixture.cpp \ diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk index ccd7e50b05..afad67a76d 100644 --- a/builddefs/build_keyboard.mk +++ b/builddefs/build_keyboard.mk @@ -186,7 +186,10 @@ endif # Have we found a keymap.json? ifneq ("$(wildcard $(KEYMAP_JSON))", "") ifneq ("$(wildcard $(KEYMAP_C))", "") - $(call WARNING_MESSAGE,Keymap is specified as both keymap.json and keymap.c -- keymap.json file wins.) + # Allow a separately-found keymap.c next to keymap.json -- the keymap.c + # generator will include the other keymap.c in the process, if supplied. + OTHER_KEYMAP_C := $(KEYMAP_C) + OPT_DEFS += -DOTHER_KEYMAP_C=\"$(OTHER_KEYMAP_C)\" endif KEYMAP_PATH := $(KEYMAP_JSON_PATH) diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 498614dd26..7bfd1436e7 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -28,6 +28,7 @@ QUANTUM_SRC += \ $(QUANTUM_DIR)/sync_timer.c \ $(QUANTUM_DIR)/logging/debug.c \ $(QUANTUM_DIR)/logging/sendchar.c \ + $(QUANTUM_DIR)/process_keycode/process_default_layer.c \ VPATH += $(QUANTUM_DIR)/logging # Fall back to lib/printf if there is no platform provided print @@ -129,13 +130,13 @@ ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes) MOUSE_ENABLE := yes VPATH += $(QUANTUM_DIR)/pointing_device SRC += $(QUANTUM_DIR)/pointing_device/pointing_device.c - SRC += $(QUANTUM_DIR)/pointing_device/pointing_device_drivers.c SRC += $(QUANTUM_DIR)/pointing_device/pointing_device_auto_mouse.c ifneq ($(strip $(POINTING_DEVICE_DRIVER)), custom) SRC += drivers/sensors/$(strip $(POINTING_DEVICE_DRIVER)).c OPT_DEFS += -DPOINTING_DEVICE_DRIVER_$(strip $(shell echo $(POINTING_DEVICE_DRIVER) | tr '[:lower:]' '[:upper:]')) endif OPT_DEFS += -DPOINTING_DEVICE_DRIVER_$(strip $(POINTING_DEVICE_DRIVER)) + OPT_DEFS += -DPOINTING_DEVICE_DRIVER_NAME=$(strip $(POINTING_DEVICE_DRIVER)) ifeq ($(strip $(POINTING_DEVICE_DRIVER)), adns9800) SPI_DRIVER_REQUIRED = yes else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), analog_joystick) @@ -215,7 +216,7 @@ else COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/flash COMMON_VPATH += $(DRIVER_PATH)/flash SRC += eeprom_driver.c eeprom_legacy_emulated_flash.c legacy_flash_ops.c - else ifneq ($(filter $(MCU_SERIES),STM32F1xx STM32F3xx STM32F4xx STM32L4xx STM32G4xx WB32F3G71xx WB32FQ95xx GD32VF103),) + else ifneq ($(filter $(MCU_SERIES),STM32F1xx STM32F3xx STM32F4xx STM32L4xx STM32G4xx WB32F3G71xx WB32FQ95xx AT32F415 GD32VF103),) # Wear-leveling EEPROM implementation, backed by MCU flash OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_WEAR_LEVELING SRC += eeprom_driver.c eeprom_wear_leveling.c @@ -238,10 +239,6 @@ else OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_TRANSIENT SRC += eeprom_driver.c eeprom_transient.c endif - else ifeq ($(PLATFORM),ARM_ATSAM) - # arm_atsam EEPROM - OPT_DEFS += -DEEPROM_SAMD - SRC += eeprom_samd.c else ifeq ($(PLATFORM),TEST) # Test harness "EEPROM" OPT_DEFS += -DEEPROM_TEST_HARNESS @@ -310,11 +307,11 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) POST_CONFIG_H += $(QUANTUM_DIR)/rgblight/rgblight_post_config.h OPT_DEFS += -DRGBLIGHT_ENABLE OPT_DEFS += -DRGBLIGHT_$(strip $(shell echo $(RGBLIGHT_DRIVER) | tr '[:lower:]' '[:upper:]')) + SRC += $(QUANTUM_DIR)/process_keycode/process_underglow.c SRC += $(QUANTUM_DIR)/color.c SRC += $(QUANTUM_DIR)/rgblight/rgblight.c SRC += $(QUANTUM_DIR)/rgblight/rgblight_drivers.c CIE1931_CURVE := yes - RGB_KEYCODES_ENABLE := yes endif ifeq ($(strip $(RGBLIGHT_DRIVER)), ws2812) @@ -460,12 +457,16 @@ ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes) COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations/runners POST_CONFIG_H += $(QUANTUM_DIR)/rgb_matrix/post_config.h + + # TODO: Remove this + SRC += $(QUANTUM_DIR)/process_keycode/process_underglow.c + + SRC += $(QUANTUM_DIR)/process_keycode/process_rgb_matrix.c SRC += $(QUANTUM_DIR)/color.c SRC += $(QUANTUM_DIR)/rgb_matrix/rgb_matrix.c SRC += $(QUANTUM_DIR)/rgb_matrix/rgb_matrix_drivers.c LIB8TION_ENABLE := yes CIE1931_CURVE := yes - RGB_KEYCODES_ENABLE := yes ifeq ($(strip $(RGB_MATRIX_DRIVER)), aw20216s) SPI_DRIVER_REQUIRED = yes @@ -568,10 +569,6 @@ ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes) endif endif -ifeq ($(strip $(RGB_KEYCODES_ENABLE)), yes) - SRC += $(QUANTUM_DIR)/process_keycode/process_rgb.c -endif - VARIABLE_TRACE ?= no ifneq ($(strip $(VARIABLE_TRACE)),no) SRC += $(QUANTUM_DIR)/variable_trace.c @@ -881,7 +878,7 @@ ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) OPT_DEFS += -DBLUETOOTH_$(strip $(shell echo $(BLUETOOTH_DRIVER) | tr '[:lower:]' '[:upper:]')) NO_USB_STARTUP_CHECK := yes COMMON_VPATH += $(DRIVER_PATH)/bluetooth - SRC += outputselect.c + SRC += outputselect.c process_connection.c ifeq ($(strip $(BLUETOOTH_DRIVER)), bluefruit_le) SPI_DRIVER_REQUIRED = yes @@ -936,7 +933,7 @@ ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes) OPT_DEFS += -DWS2812_$(strip $(shell echo $(WS2812_DRIVER) | tr '[:lower:]' '[:upper:]')) - SRC += ws2812_$(strip $(WS2812_DRIVER)).c + SRC += ws2812.c ws2812_$(strip $(WS2812_DRIVER)).c ifeq ($(strip $(PLATFORM)), CHIBIOS) ifeq ($(strip $(WS2812_DRIVER)), pwm) diff --git a/builddefs/common_rules.mk b/builddefs/common_rules.mk index cfd261737c..e45063cfaf 100644 --- a/builddefs/common_rules.mk +++ b/builddefs/common_rules.mk @@ -43,25 +43,25 @@ ifneq ($(USE_CCACHE),no) CC_PREFIX ?= ccache endif +#---------------- Debug Options ---------------- + +DEBUG_ENABLE ?= no +ifeq ($(strip $(DEBUG_ENABLE)),yes) + CFLAGS += -ggdb3 + CXXFLAGS += -ggdb3 + ASFLAGS += -ggdb3 +# Create a map file when debugging + LDFLAGS += -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref +endif + + #---------------- C Compiler Options ---------------- ifeq ($(strip $(LTO_ENABLE)), yes) - ifeq ($(PLATFORM),ARM_ATSAM) - $(info Enabling LTO on arm_atsam-targeting boards is known to have a high likelihood of failure.) - $(info If unsure, set LTO_ENABLE = no.) - endif CDEFS += -flto CDEFS += -DLTO_ENABLE endif -DEBUG_ENABLE ?= yes -ifeq ($(strip $(SKIP_DEBUG_INFO)),yes) - DEBUG_ENABLE=no -endif - -ifeq ($(strip $(DEBUG_ENABLE)),yes) - CFLAGS += -g$(DEBUG) -endif CFLAGS += $(CDEFS) CFLAGS += -O$(OPT) # add color @@ -83,9 +83,6 @@ CFLAGS += -fcommon #---------------- C++ Compiler Options ---------------- -ifeq ($(strip $(DEBUG_ENABLE)),yes) - CXXFLAGS += -g$(DEBUG) -endif CXXFLAGS += $(CXXDEFS) CXXFLAGS += -O$(OPT) # to suppress "warning: only initialized variables can be placed into program memory area" @@ -106,14 +103,10 @@ endif #---------------- Linker Options ---------------- -CREATE_MAP ?= yes -ifeq ($(CREATE_MAP),yes) - LDFLAGS += -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref -endif ifeq ($(VERBOSE_LD_CMD),yes) LDFLAGS += -v endif -#LDFLAGS += -Wl,--relax + LDFLAGS += $(EXTMEMOPTS) LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS)) LDFLAGS += -lm @@ -126,15 +119,11 @@ ADHLNS_ENABLE ?= no ifeq ($(ADHLNS_ENABLE),yes) # Avoid "Options to '-Xassembler' do not match" - only specify assembler options at LTO link time ifeq ($(strip $(LTO_ENABLE)), yes) - LDFLAGS += -Wa,-adhlns=$(BUILD_DIR)/$(TARGET).lst + LDFLAGS += -Wa,-adhlns=$(BUILD_DIR)/$(TARGET).lst else - CFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) + CFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) CXXFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) - ifeq ($(strip $(DEBUG_ENABLE)),yes) - ASFLAGS = -Wa,-adhlns=$(@:%.o=%.lst),-gstabs,--listing-cont-lines=100 - else - ASFLAGS = -Wa,-adhlns=$(@:%.o=%.lst),--listing-cont-lines=100 - endif + ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),--listing-cont-lines=100 endif endif diff --git a/builddefs/generic_features.mk b/builddefs/generic_features.mk index dc34a64230..f14f440877 100644 --- a/builddefs/generic_features.mk +++ b/builddefs/generic_features.mk @@ -36,6 +36,7 @@ GENERIC_FEATURES = \ HAPTIC \ KEY_LOCK \ KEY_OVERRIDE \ + LAYER_LOCK \ LEADER \ MAGIC \ MOUSEKEY \ diff --git a/builddefs/show_options.mk b/builddefs/show_options.mk index 81d8400a80..1c1a3ebf8e 100644 --- a/builddefs/show_options.mk +++ b/builddefs/show_options.mk @@ -67,7 +67,6 @@ OTHER_OPTION_NAMES = \ PS2_DRIVER \ RAW_ENABLE \ SWAP_HANDS_ENABLE \ - RING_BUFFERED_6KRO_REPORT_ENABLE \ WATCHDOG_ENABLE \ ERGOINU \ NO_USB_STARTUP_CHECK \ |