From fc059291246609e0cbcfb8c06dc9e15f964353ec Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Tue, 28 Feb 2023 19:15:54 +0000 Subject: Strip whitespace from CONVERT_TO variables (#19948) --- builddefs/converters.mk | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'builddefs') diff --git a/builddefs/converters.mk b/builddefs/converters.mk index 17b1c3b6ee..a3548afd60 100644 --- a/builddefs/converters.mk +++ b/builddefs/converters.mk @@ -7,7 +7,12 @@ endif # TODO: opt in rather than assume everything uses a pro micro PIN_COMPATIBLE ?= promicro + +# Remove whitespace from any rule.mk provided vars +# - env cannot be overwritten but cannot have whitespace anyway +CONVERT_TO:=$(strip $(CONVERT_TO)) ifneq ($(CONVERT_TO),) + # stash so we can overwrite env provided vars if needed ACTIVE_CONVERTER=$(CONVERT_TO) @@ -23,13 +28,13 @@ ifneq ($(CONVERT_TO),) TARGET := $(TARGET)_$(CONVERT_TO) # Configure any defaults - OPT_DEFS += -DCONVERT_TO_$(strip $(shell echo $(CONVERT_TO) | tr '[:lower:]' '[:upper:]')) - OPT_DEFS += -DCONVERTER_TARGET=\"$(strip $(CONVERT_TO))\" + OPT_DEFS += -DCONVERT_TO_$(shell echo $(CONVERT_TO) | tr '[:lower:]' '[:upper:]') + OPT_DEFS += -DCONVERTER_TARGET=\"$(CONVERT_TO)\" OPT_DEFS += -DCONVERTER_ENABLED VPATH += $(CONVERTER) # Configure for "alias" - worst case it produces an idential define - OPT_DEFS += -DCONVERT_TO_$(strip $(shell echo $(ACTIVE_CONVERTER) | tr '[:lower:]' '[:upper:]')) + OPT_DEFS += -DCONVERT_TO_$(shell echo $(ACTIVE_CONVERTER) | tr '[:lower:]' '[:upper:]') # Finally run any converter specific logic include $(CONVERTER)/converter.mk -- cgit v1.2.3 From 42aa83787fd0d3a5acd0ac7fbe7d148648be742d Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Thu, 23 Mar 2023 12:48:25 +1100 Subject: Optionally keep intermediate file listings in order to do comparisons between builds. (#20237) --- builddefs/build_keyboard.mk | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'builddefs') diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk index 7a5412ccd2..6b264fe0ff 100644 --- a/builddefs/build_keyboard.mk +++ b/builddefs/build_keyboard.mk @@ -441,6 +441,14 @@ $(eval $(call add_qmk_prefix_defs,MCU_FAMILY,MCU_FAMILY)) $(eval $(call add_qmk_prefix_defs,MCU_SERIES,MCU_SERIES)) $(eval $(call add_qmk_prefix_defs,BOARD,BOARD)) +# Control whether intermediate file listings are generated +# e.g.: +# make handwired/onekey/blackpill_f411:default KEEP_INTERMEDIATES=yes +# cat .build/obj_handwired_onekey_blackpill_f411_default/quantum/quantum.i | sed -e 's@^#.*@@g' -e 's@^\s*//.*@@g' -e '/^\s*$/d' | clang-format +ifeq ($(strip $(KEEP_INTERMEDIATES)), yes) + OPT_DEFS += -save-temps=obj +endif + # TODO: remove this bodge? PROJECT_DEFS := $(OPT_DEFS) PROJECT_INC := $(VPATH) $(EXTRAINCDIRS) $(KEYBOARD_PATHS) -- cgit v1.2.3 From 647c2835e65995339fb9380830c53725a62f6299 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 30 Mar 2023 12:21:02 +1100 Subject: WS2812 driver improvements (#20262) --- builddefs/common_features.mk | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'builddefs') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 0880934e95..af6cf81aa8 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -574,7 +574,7 @@ ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) endif endif -VALID_WS2812_DRIVER_TYPES := bitbang pwm spi i2c vendor +VALID_WS2812_DRIVER_TYPES := bitbang custom i2c pwm spi vendor WS2812_DRIVER ?= bitbang ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes) @@ -584,15 +584,11 @@ ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes) OPT_DEFS += -DWS2812_DRIVER_$(strip $(shell echo $(WS2812_DRIVER) | tr '[:lower:]' '[:upper:]')) - ifeq ($(strip $(WS2812_DRIVER)), bitbang) - SRC += ws2812.c - else - SRC += ws2812_$(strip $(WS2812_DRIVER)).c + SRC += ws2812_$(strip $(WS2812_DRIVER)).c - ifeq ($(strip $(PLATFORM)), CHIBIOS) - ifeq ($(strip $(WS2812_DRIVER)), pwm) - OPT_DEFS += -DSTM32_DMA_REQUIRED=TRUE - endif + ifeq ($(strip $(PLATFORM)), CHIBIOS) + ifeq ($(strip $(WS2812_DRIVER)), pwm) + OPT_DEFS += -DSTM32_DMA_REQUIRED=TRUE endif endif -- cgit v1.2.3 From 9a68472da87bea6eb9e209b8cf90de09211f23c8 Mon Sep 17 00:00:00 2001 From: Vladislav Marchenko Date: Mon, 3 Apr 2023 08:57:19 +0600 Subject: Added PMW3320 driver (#19543) --- builddefs/common_features.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builddefs') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index af6cf81aa8..6a22c28b05 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -134,7 +134,7 @@ ifeq ($(strip $(MOUSEKEY_ENABLE)), yes) SRC += $(QUANTUM_DIR)/mousekey.c endif -VALID_POINTING_DEVICE_DRIVER_TYPES := adns5050 adns9800 analog_joystick cirque_pinnacle_i2c cirque_pinnacle_spi paw3204 pmw3360 pmw3389 pimoroni_trackball custom +VALID_POINTING_DEVICE_DRIVER_TYPES := adns5050 adns9800 analog_joystick cirque_pinnacle_i2c cirque_pinnacle_spi paw3204 pmw3320 pmw3360 pmw3389 pimoroni_trackball custom ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes) ifeq ($(filter $(POINTING_DEVICE_DRIVER),$(VALID_POINTING_DEVICE_DRIVER_TYPES)),) $(call CATASTROPHIC_ERROR,Invalid POINTING_DEVICE_DRIVER,POINTING_DEVICE_DRIVER="$(POINTING_DEVICE_DRIVER)" is not a valid pointing device type) -- cgit v1.2.3 From cf5626e0246b66879b03a18115a19a566e839f48 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 12 Apr 2023 21:43:27 -0700 Subject: [Bug] Fix compilation issues with PS/2 driver on F4x1 controllers (#20433) --- builddefs/common_features.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builddefs') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 6a22c28b05..dc64ed2394 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -809,9 +809,9 @@ endif ifeq ($(strip $(PS2_MOUSE_ENABLE)), yes) PS2_ENABLE := yes + MOUSE_ENABLE := yes SRC += ps2_mouse.c OPT_DEFS += -DPS2_MOUSE_ENABLE - OPT_DEFS += -DMOUSE_ENABLE endif VALID_PS2_DRIVER_TYPES := busywait interrupt usart vendor -- cgit v1.2.3 From 6a619e64037d54e04148e1ee7e1c170533d49236 Mon Sep 17 00:00:00 2001 From: Xelus22 <17491233+Xelus22@users.noreply.github.com> Date: Sun, 30 Apr 2023 12:35:27 +1000 Subject: [Core] Clean up ISSI drivers, Add IS31FL3736 support (#20572) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Pablo Martínez <58857054+elpekenin@users.noreply.github.com> --- builddefs/common_features.mk | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'builddefs') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index dc64ed2394..d0702f3ad1 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -419,7 +419,7 @@ endif RGB_MATRIX_ENABLE ?= no -VALID_RGB_MATRIX_TYPES := AW20216 IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 IS31FL3742A IS31FL3743A IS31FL3745 IS31FL3746A CKLED2001 WS2812 custom +VALID_RGB_MATRIX_TYPES := AW20216 IS31FL3731 IS31FL3733 IS31FL3736 IS31FL3737 IS31FL3741 IS31FL3742A IS31FL3743A IS31FL3745 IS31FL3746A CKLED2001 WS2812 custom ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes) ifeq ($(filter $(RGB_MATRIX_DRIVER),$(VALID_RGB_MATRIX_TYPES)),) $(call CATASTROPHIC_ERROR,Invalid RGB_MATRIX_DRIVER,RGB_MATRIX_DRIVER="$(RGB_MATRIX_DRIVER)" is not a valid matrix type) @@ -460,6 +460,13 @@ endif QUANTUM_LIB_SRC += i2c_master.c endif + ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3736) + OPT_DEFS += -DIS31FL3736 -DSTM32_I2C -DHAL_USE_I2C=TRUE + COMMON_VPATH += $(DRIVER_PATH)/led/issi + SRC += is31fl3736.c + QUANTUM_LIB_SRC += i2c_master.c + endif + ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3737) OPT_DEFS += -DIS31FL3737 -DSTM32_I2C -DHAL_USE_I2C=TRUE COMMON_VPATH += $(DRIVER_PATH)/led/issi -- cgit v1.2.3 From 2ddad246ce85066d5aee798e6ea516ea8e49eea9 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 10 May 2023 14:04:53 -0700 Subject: OLED Driver improvements (#20331) Co-authored-by: Sergey Vlasov --- builddefs/common_features.mk | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'builddefs') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index d0702f3ad1..9ac95dae82 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -744,17 +744,28 @@ endif VALID_OLED_DRIVER_TYPES := SSD1306 custom OLED_DRIVER ?= SSD1306 +VALID_OLED_TRANSPORT_TYPES := i2c spi custom +OLED_TRANSPORT ?= i2c ifeq ($(strip $(OLED_ENABLE)), yes) ifeq ($(filter $(OLED_DRIVER),$(VALID_OLED_DRIVER_TYPES)),) $(call CATASTROPHIC_ERROR,Invalid OLED_DRIVER,OLED_DRIVER="$(OLED_DRIVER)" is not a valid OLED driver) else - OPT_DEFS += -DOLED_ENABLE - COMMON_VPATH += $(DRIVER_PATH)/oled + ifeq ($(filter $(OLED_TRANSPORT),$(VALID_OLED_TRANSPORT_TYPES)),) + $(call CATASTROPHIC_ERROR,Invalid OLED_TRANSPORT,OLED_TRANSPORT="$(OLED_TRANSPORT)" is not a valid OLED transport) + else + OPT_DEFS += -DOLED_ENABLE + COMMON_VPATH += $(DRIVER_PATH)/oled + ifneq ($(strip $(OLED_DRIVER)), custom) + SRC += oled_driver.c + endif - OPT_DEFS += -DOLED_DRIVER_$(strip $(shell echo $(OLED_DRIVER) | tr '[:lower:]' '[:upper:]')) - ifeq ($(strip $(OLED_DRIVER)), SSD1306) - SRC += ssd1306_sh1106.c - QUANTUM_LIB_SRC += i2c_master.c + OPT_DEFS += -DOLED_TRANSPORT_$(strip $(shell echo $(OLED_TRANSPORT) | tr '[:lower:]' '[:upper:]')) + ifeq ($(strip $(OLED_TRANSPORT)), i2c) + QUANTUM_LIB_SRC += i2c_master.c + endif + ifeq ($(strip $(OLED_TRANSPORT)), spi) + QUANTUM_LIB_SRC += spi_master.c + endif endif endif endif -- cgit v1.2.3 From 5faa23d54ca1e3ab83097f2a07922f48800616e6 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Mon, 15 May 2023 22:27:37 +1000 Subject: Keymap introspection for combos. (#19670) --- builddefs/build_test.mk | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'builddefs') diff --git a/builddefs/build_test.mk b/builddefs/build_test.mk index 4230598373..9eead77bea 100644 --- a/builddefs/build_test.mk +++ b/builddefs/build_test.mk @@ -75,6 +75,10 @@ $(TEST)_SRC += \ tests/test_common/main.cpp \ $(QUANTUM_PATH)/logging/print.c +ifneq ($(strip $(INTROSPECTION_KEYMAP_C)),) +$(TEST)_DEFS += -DINTROSPECTION_KEYMAP_C=\"$(strip $(INTROSPECTION_KEYMAP_C))\" +endif + $(TEST_OBJ)/$(TEST)_SRC := $($(TEST)_SRC) $(TEST_OBJ)/$(TEST)_INC := $($(TEST)_INC) $(VPATH) $(GTEST_INC) $(TEST_OBJ)/$(TEST)_DEFS := $($(TEST)_DEFS) -- cgit v1.2.3 From ab8c5013c856bfa23289d7892be1c2bee808b542 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 20 May 2023 22:12:59 +1000 Subject: BIOI G60/Morgan65: use custom Bluetooth driver (#20897) --- builddefs/common_features.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'builddefs') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 61dffb2713..e904d6beb9 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -906,10 +906,11 @@ ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) OPT_DEFS += -DBLUETOOTH_ENABLE NO_USB_STARTUP_CHECK := yes COMMON_VPATH += $(DRIVER_PATH)/bluetooth - SRC += outputselect.c bluetooth.c + SRC += outputselect.c ifeq ($(strip $(BLUETOOTH_DRIVER)), BluefruitLE) OPT_DEFS += -DBLUETOOTH_BLUEFRUIT_LE -DHAL_USE_SPI=TRUE + SRC += $(DRIVER_PATH)/bluetooth/bluetooth.c SRC += $(DRIVER_PATH)/bluetooth/bluefruit_le.cpp QUANTUM_LIB_SRC += analog.c QUANTUM_LIB_SRC += spi_master.c @@ -917,6 +918,7 @@ ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) ifeq ($(strip $(BLUETOOTH_DRIVER)), RN42) OPT_DEFS += -DBLUETOOTH_RN42 -DHAL_USE_SERIAL=TRUE + SRC += $(DRIVER_PATH)/bluetooth/bluetooth.c SRC += $(DRIVER_PATH)/bluetooth/rn42.c QUANTUM_LIB_SRC += uart.c endif -- cgit v1.2.3 From 3993b15f054265071730cdb450f43457dcf4c64a Mon Sep 17 00:00:00 2001 From: Pascal Getreuer <50221757+getreuer@users.noreply.github.com> Date: Sat, 20 May 2023 05:35:06 -0700 Subject: [Core] Add Repeat Key ("repeat last key") as a core feature. (#19700) Co-authored-by: casuanoob <96005765+casuanoob@users.noreply.github.com> Co-authored-by: Sergey Vlasov --- builddefs/generic_features.mk | 1 + builddefs/show_options.mk | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'builddefs') diff --git a/builddefs/generic_features.mk b/builddefs/generic_features.mk index 5a1ef5c6f0..4e058dcd26 100644 --- a/builddefs/generic_features.mk +++ b/builddefs/generic_features.mk @@ -32,6 +32,7 @@ GENERIC_FEATURES = \ KEY_OVERRIDE \ LEADER \ PROGRAMMABLE_BUTTON \ + REPEAT_KEY \ SECURE \ SPACE_CADET \ SWAP_HANDS \ diff --git a/builddefs/show_options.mk b/builddefs/show_options.mk index 9723b45438..8bcc02083b 100644 --- a/builddefs/show_options.mk +++ b/builddefs/show_options.mk @@ -85,7 +85,8 @@ OTHER_OPTION_NAMES = \ SECURE_ENABLE \ CAPS_WORD_ENABLE \ AUTOCORRECT_ENABLE \ - TRI_LAYER_ENABLE + TRI_LAYER_ENABLE \ + REPEAT_KEY_ENABLE define NAME_ECHO @printf " %-30s = %-16s # %s\\n" "$1" "$($1)" "$(origin $1)" -- cgit v1.2.3 From 873922d98fea19f872ed8c5c79a20ed575ccff44 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 25 May 2023 23:07:47 +0100 Subject: Implement UF2 device type id extension tag (#21029) --- builddefs/common_rules.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'builddefs') diff --git a/builddefs/common_rules.mk b/builddefs/common_rules.mk index e993cc350e..816eac49ae 100644 --- a/builddefs/common_rules.mk +++ b/builddefs/common_rules.mk @@ -152,6 +152,7 @@ endif # To produce a UF2 file in your build, add to your keyboard's rules.mk: # FIRMWARE_FORMAT = uf2 UF2CONV = $(TOP_DIR)/util/uf2conv.py +UF2CONV_ARGS ?= UF2_FAMILY ?= 0x0 # Compiler flags to generate dependency files. @@ -219,7 +220,7 @@ gccversion : @$(BUILD_CMD) %.uf2: %.elf - $(eval CMD=$(HEX) $< $(BUILD_DIR)/$(TARGET).tmp && $(UF2CONV) $(BUILD_DIR)/$(TARGET).tmp --output $@ --convert --family $(UF2_FAMILY) >/dev/null 2>&1) + $(eval CMD=$(HEX) $< $(BUILD_DIR)/$(TARGET).tmp && $(UF2CONV) $(UF2CONV_ARGS) $(BUILD_DIR)/$(TARGET).tmp --output $@ --convert --family $(UF2_FAMILY) >/dev/null 2>&1) #@$(SILENT) || printf "$(MSG_EXECUTING) '$(CMD)':\n" @$(SILENT) || printf "$(MSG_UF2) $@" | $(AWK_CMD) @$(BUILD_CMD) -- cgit v1.2.3