From d18698a8e8d83d47d48b8501932e6a046148f95a Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 29 Aug 2022 06:20:43 +1000 Subject: Remove deprecated USBasp and bootloadHID bootloader types (#18195) --- builddefs/bootloader.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'builddefs') diff --git a/builddefs/bootloader.mk b/builddefs/bootloader.mk index 9f55536423..31004cab98 100644 --- a/builddefs/bootloader.mk +++ b/builddefs/bootloader.mk @@ -116,13 +116,13 @@ ifeq ($(strip $(BOOTLOADER)), caterina) BOOTLOADER_SIZE = 4096 endif -ifneq (,$(filter $(BOOTLOADER), bootloadhid bootloadHID)) +ifeq ($(strip $(BOOTLOADER)), bootloadhid) OPT_DEFS += -DBOOTLOADER_BOOTLOADHID BOOTLOADER_TYPE = bootloadhid BOOTLOADER_SIZE = 4096 endif -ifneq (,$(filter $(BOOTLOADER), usbasploader USBasp)) +ifeq ($(strip $(BOOTLOADER)), usbasploader) OPT_DEFS += -DBOOTLOADER_USBASP BOOTLOADER_TYPE = usbasploader -- cgit v1.2.3 From 0237ff0c62d4278df3c0c93f5f85f84c1a0ed519 Mon Sep 17 00:00:00 2001 From: Marek Kraus Date: Wed, 31 Aug 2022 09:16:07 +0200 Subject: [Core] Rework PS/2 driver selection (#17892) * [Core] Rework PS/2 driver selection Enabling and selecting PS/2 driver was using old approach, so it was reworked to current approach, inspired by Serial and WS2812 driver selections. * [Keyboard] Update keyboards using PS/2 to use new PS/2 driver selection * [Docs] Update PS/2 documentation to use new PS/2 driver selection * Fix indentation * [Core] Add PS2 to data driver * Fix oversight in property name Co-authored-by: Drashna Jaelre * Add PS/2 pins to data driven mappings Co-authored-by: Drashna Jaelre --- builddefs/common_features.mk | 32 +++++++++++++------------------- builddefs/show_options.mk | 2 ++ 2 files changed, 15 insertions(+), 19 deletions(-) (limited to 'builddefs') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index a23b5e82b9..9fa9e18814 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -805,31 +805,25 @@ ifeq ($(strip $(PS2_MOUSE_ENABLE)), yes) OPT_DEFS += -DMOUSE_ENABLE endif -ifeq ($(strip $(PS2_USE_BUSYWAIT)), yes) - PS2_ENABLE := yes - SRC += ps2_busywait.c - SRC += ps2_io.c - OPT_DEFS += -DPS2_USE_BUSYWAIT -endif +VALID_PS2_DRIVER_TYPES := busywait interrupt usart vendor -ifeq ($(strip $(PS2_USE_INT)), yes) - PS2_ENABLE := yes - SRC += ps2_interrupt.c - SRC += ps2_io.c - OPT_DEFS += -DPS2_USE_INT -endif +PS2_DRIVER ?= busywait +ifeq ($(strip $(PS2_ENABLE)), yes) + ifeq ($(filter $(PS2_DRIVER),$(VALID_PS2_DRIVER_TYPES)),) + $(call CATASTROPHIC_ERROR,Invalid PS2_DRIVER,PS2_DRIVER="$(PS2_DRIVER)" is not a valid PS/2 driver) + endif -ifeq ($(strip $(PS2_USE_USART)), yes) - PS2_ENABLE := yes - SRC += ps2_usart.c - SRC += ps2_io.c - OPT_DEFS += -DPS2_USE_USART -endif + OPT_DEFS += -DPS2_DRIVER_$(strip $(shell echo $(PS2_DRIVER) | tr '[:lower:]' '[:upper:]')) -ifeq ($(strip $(PS2_ENABLE)), yes) COMMON_VPATH += $(DRIVER_PATH)/ps2 COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/ps2 OPT_DEFS += -DPS2_ENABLE + + ifneq ($(strip $(PS2_DRIVER)), vendor) + SRC += ps2_io.c + endif + + SRC += ps2_$(strip $(PS2_DRIVER)).c endif JOYSTICK_ENABLE ?= no diff --git a/builddefs/show_options.mk b/builddefs/show_options.mk index 98537e6da2..8d992c080c 100644 --- a/builddefs/show_options.mk +++ b/builddefs/show_options.mk @@ -66,7 +66,9 @@ OTHER_OPTION_NAMES = \ KEYLOGGER_ENABLE \ LCD_BACKLIGHT_ENABLE \ MACROS_ENABLED \ + PS2_ENABLE \ PS2_MOUSE_ENABLE \ + PS2_DRIVER \ RAW_ENABLE \ SWAP_HANDS_ENABLE \ RING_BUFFERED_6KRO_REPORT_ENABLE \ -- cgit v1.2.3 From bb6f02883363b815de8e2510964787634f86d635 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 1 Sep 2022 00:17:24 +1000 Subject: Move bootloader.mk to platforms (#18228) --- builddefs/bootloader.mk | 223 -------------------------------------------- builddefs/build_keyboard.mk | 2 +- 2 files changed, 1 insertion(+), 224 deletions(-) delete mode 100644 builddefs/bootloader.mk (limited to 'builddefs') diff --git a/builddefs/bootloader.mk b/builddefs/bootloader.mk deleted file mode 100644 index 31004cab98..0000000000 --- a/builddefs/bootloader.mk +++ /dev/null @@ -1,223 +0,0 @@ -# Copyright 2017 Jack Humbert -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# If it's possible that multiple bootloaders can be used for one project, -# you can leave this unset, and the correct size will be selected -# automatically. -# -# Sets the bootloader defined in the keyboard's/keymap's rules.mk -# Current options: -# -# AVR: -# halfkay PJRC Teensy -# caterina Pro Micro (Sparkfun/generic) -# atmel-dfu Atmel factory DFU -# lufa-dfu LUFA DFU -# qmk-dfu QMK DFU (LUFA + blinkenlight) -# qmk-hid QMK HID (LUFA + blinkenlight) -# bootloadhid HIDBootFlash compatible (ATmega32A) -# usbasploader USBaspLoader (ATmega328P) -# ARM: -# halfkay PJRC Teensy -# kiibohd Input:Club Kiibohd bootloader (only used on their boards) -# stm32duino STM32Duino (STM32F103x8) -# stm32-dfu STM32 USB DFU in ROM -# apm32-dfu APM32 USB DFU in ROM -# RISC-V: -# gd32v-dfu GD32V USB DFU in ROM -# -# If you need to provide your own implementation, you can set inside `rules.mk` -# `BOOTLOADER = custom` -- you'll need to provide your own implementations. See -# the respective file under `platforms//bootloaders/custom.c` to see -# which functions may be overridden. -# -# BOOTLOADER_SIZE can still be defined manually, but it's recommended -# you add any possible configuration to this list - -ifeq ($(strip $(BOOTLOADER)), custom) - OPT_DEFS += -DBOOTLOADER_CUSTOM - BOOTLOADER_TYPE = custom -endif -ifeq ($(strip $(BOOTLOADER)), atmel-dfu) - OPT_DEFS += -DBOOTLOADER_ATMEL_DFU - OPT_DEFS += -DBOOTLOADER_DFU - BOOTLOADER_TYPE = dfu - - ifneq (,$(filter $(MCU), at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647)) - BOOTLOADER_SIZE = 4096 - endif - ifneq (,$(filter $(MCU), at90usb1286 at90usb1287)) - BOOTLOADER_SIZE = 8192 - endif -endif -ifeq ($(strip $(BOOTLOADER)), lufa-dfu) - OPT_DEFS += -DBOOTLOADER_LUFA_DFU - OPT_DEFS += -DBOOTLOADER_DFU - BOOTLOADER_TYPE = dfu - - ifneq (,$(filter $(MCU), at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647)) - BOOTLOADER_SIZE ?= 4096 - endif - ifneq (,$(filter $(MCU), at90usb1286 at90usb1287)) - BOOTLOADER_SIZE ?= 8192 - endif -endif -ifeq ($(strip $(BOOTLOADER)), qmk-dfu) - OPT_DEFS += -DBOOTLOADER_QMK_DFU - OPT_DEFS += -DBOOTLOADER_DFU - BOOTLOADER_TYPE = dfu - - ifneq (,$(filter $(MCU), at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647)) - BOOTLOADER_SIZE ?= 4096 - endif - ifneq (,$(filter $(MCU), at90usb1286 at90usb1287)) - BOOTLOADER_SIZE ?= 8192 - endif -endif -ifeq ($(strip $(BOOTLOADER)), qmk-hid) - OPT_DEFS += -DBOOTLOADER_QMK_HID - OPT_DEFS += -DBOOTLOADER_HID - BOOTLOADER_TYPE = dfu - - BOOTLOADER_SIZE ?= 4096 -endif -ifeq ($(strip $(BOOTLOADER)), halfkay) - OPT_DEFS += -DBOOTLOADER_HALFKAY - BOOTLOADER_TYPE = halfkay - - # Teensy 2.0 - ifeq ($(strip $(MCU)), atmega32u4) - BOOTLOADER_SIZE = 512 - endif - # Teensy 2.0++ - ifeq ($(strip $(MCU)), at90usb1286) - BOOTLOADER_SIZE = 1024 - endif - # Teensy LC, 3.0, 3.1/2, 3.5, 3.6 - ifneq (,$(filter $(MCU_ORIG), MKL26Z64 MK20DX128 MK20DX256 MK64FX512 MK66FX1M0)) - FIRMWARE_FORMAT = hex - endif -endif -ifeq ($(strip $(BOOTLOADER)), caterina) - OPT_DEFS += -DBOOTLOADER_CATERINA - BOOTLOADER_TYPE = caterina - - BOOTLOADER_SIZE = 4096 -endif -ifeq ($(strip $(BOOTLOADER)), bootloadhid) - OPT_DEFS += -DBOOTLOADER_BOOTLOADHID - BOOTLOADER_TYPE = bootloadhid - - BOOTLOADER_SIZE = 4096 -endif -ifeq ($(strip $(BOOTLOADER)), usbasploader) - OPT_DEFS += -DBOOTLOADER_USBASP - BOOTLOADER_TYPE = usbasploader - - BOOTLOADER_SIZE = 4096 -endif -ifeq ($(strip $(BOOTLOADER)), lufa-ms) - OPT_DEFS += -DBOOTLOADER_MS - BOOTLOADER_TYPE = dfu - - BOOTLOADER_SIZE ?= 8192 - FIRMWARE_FORMAT = bin -cpfirmware: lufa_warning -.INTERMEDIATE: lufa_warning -lufa_warning: $(FIRMWARE_FORMAT) - $(info @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@) - $(info LUFA MASS STORAGE Bootloader selected) - $(info DO NOT USE THIS BOOTLOADER IN NEW PROJECTS!) - $(info It is extremely prone to bricking, and is only included to support existing boards.) - $(info @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@) -endif -ifdef BOOTLOADER_SIZE - OPT_DEFS += -DBOOTLOADER_SIZE=$(strip $(BOOTLOADER_SIZE)) -endif - -ifeq ($(strip $(BOOTLOADER)), stm32-dfu) - OPT_DEFS += -DBOOTLOADER_STM32_DFU - BOOTLOADER_TYPE = stm32_dfu - - # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 -endif -ifeq ($(strip $(BOOTLOADER)), apm32-dfu) - OPT_DEFS += -DBOOTLOADER_APM32_DFU - BOOTLOADER_TYPE = stm32_dfu - - # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 314B:0106 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 314B -p 0106 -endif -ifeq ($(strip $(BOOTLOADER)), gd32v-dfu) - OPT_DEFS += -DBOOTLOADER_GD32V_DFU - BOOTLOADER_TYPE = gd32v_dfu - - # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 28E9:0189 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 28E9 -p 0189 -endif -ifeq ($(strip $(BOOTLOADER)), kiibohd) - OPT_DEFS += -DBOOTLOADER_KIIBOHD - BOOTLOADER_TYPE = kiibohd - - ifeq ($(strip $(MCU_ORIG)), MK20DX128) - MCU_LDSCRIPT = MK20DX128BLDR4 - endif - ifeq ($(strip $(MCU_ORIG)), MK20DX256) - MCU_LDSCRIPT = MK20DX256BLDR8 - endif - - # Options to pass to dfu-util when flashing - DFU_ARGS = -d 1C11:B007 - DFU_SUFFIX_ARGS = -v 1C11 -p B007 -endif -ifeq ($(strip $(BOOTLOADER)), stm32duino) - OPT_DEFS += -DBOOTLOADER_STM32DUINO - MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader - BOARD = STM32_F103_STM32DUINO - BOOTLOADER_TYPE = stm32duino - - # Options to pass to dfu-util when flashing - DFU_ARGS = -d 1EAF:0003 -a 2 -R - DFU_SUFFIX_ARGS = -v 1EAF -p 0003 -endif -ifeq ($(strip $(BOOTLOADER)), tinyuf2) - OPT_DEFS += -DBOOTLOADER_TINYUF2 - BOOTLOADER_TYPE = tinyuf2 - FIRMWARE_FORMAT = uf2 -endif -ifeq ($(strip $(BOOTLOADER)), rp2040) - OPT_DEFS += -DBOOTLOADER_RP2040 - BOOTLOADER_TYPE = rp2040 -endif -ifeq ($(strip $(BOOTLOADER)), halfkay) - OPT_DEFS += -DBOOTLOADER_HALFKAY - BOOTLOADER_TYPE = halfkay -endif -ifeq ($(strip $(BOOTLOADER)), md-boot) - OPT_DEFS += -DBOOTLOADER_MD_BOOT - BOOTLOADER_TYPE = md_boot -endif -ifeq ($(strip $(BOOTLOADER)), wb32-dfu) - OPT_DEFS += -DBOOTLOADER_WB32_DFU - BOOTLOADER_TYPE = wb32_dfu -endif - -ifeq ($(strip $(BOOTLOADER_TYPE)),) - $(call CATASTROPHIC_ERROR,Invalid BOOTLOADER,No bootloader specified. Please set an appropriate 'BOOTLOADER' in your keyboard's 'rules.mk' file.) -endif diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk index fe95dcaf15..65bc0451f7 100644 --- a/builddefs/build_keyboard.mk +++ b/builddefs/build_keyboard.mk @@ -428,7 +428,6 @@ include $(BUILDDEFS_PATH)/common_features.mk include $(BUILDDEFS_PATH)/generic_features.mk include $(TMK_PATH)/protocol.mk include $(PLATFORM_PATH)/common.mk -include $(BUILDDEFS_PATH)/bootloader.mk SRC += $(patsubst %.c,%.clib,$(LIB_SRC)) SRC += $(patsubst %.c,%.clib,$(QUANTUM_LIB_SRC)) @@ -443,6 +442,7 @@ ifneq ($(REQUIRE_PLATFORM_KEY),) endif endif +-include $(PLATFORM_PATH)/$(PLATFORM_KEY)/bootloader.mk include $(PLATFORM_PATH)/$(PLATFORM_KEY)/platform.mk -include $(PLATFORM_PATH)/$(PLATFORM_KEY)/flash.mk -- cgit v1.2.3 From f7d2b001bc4f79164e9ea3a4ff7faa54be0b7d82 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 8 Sep 2022 04:59:24 +1000 Subject: Move Bluetooth-related function calls up to host/keyboard level (#18274) * Move Bluetooth-related function calls up to host/keyboard level * Remove pointless set_output() call * Move bluetooth (rn42) init to end of keyboard_init() * Enable SPI/UART for ChibiOS targets * Some more slight tweaks --- builddefs/common_features.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'builddefs') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 9fa9e18814..f9618709c9 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -882,14 +882,14 @@ ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) SRC += outputselect.c ifeq ($(strip $(BLUETOOTH_DRIVER)), BluefruitLE) - OPT_DEFS += -DBLUETOOTH_BLUEFRUIT_LE - SRC += analog.c + OPT_DEFS += -DBLUETOOTH_BLUEFRUIT_LE -DHAL_USE_SPI=TRUE SRC += $(DRIVER_PATH)/bluetooth/bluefruit_le.cpp + QUANTUM_LIB_SRC += analog.c QUANTUM_LIB_SRC += spi_master.c endif ifeq ($(strip $(BLUETOOTH_DRIVER)), RN42) - OPT_DEFS += -DBLUETOOTH_RN42 + OPT_DEFS += -DBLUETOOTH_RN42 -DHAL_USE_SERIAL=TRUE SRC += $(DRIVER_PATH)/bluetooth/rn42.c QUANTUM_LIB_SRC += uart.c endif -- cgit v1.2.3 From 3d667f09705fa780bd5881cfa3b3cb10fa41b1fe Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 13 Sep 2022 01:49:04 +1000 Subject: Refactor Unicode feature (#18333) --- 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 f9618709c9..3d34c673d3 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -773,8 +773,10 @@ endif ifeq ($(strip $(UNICODE_COMMON)), yes) OPT_DEFS += -DUNICODE_COMMON_ENABLE + COMMON_VPATH += $(QUANTUM_DIR)/unicode SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c \ - $(QUANTUM_DIR)/utf8.c + $(QUANTUM_DIR)/unicode/unicode.c \ + $(QUANTUM_DIR)/unicode/utf8.c endif MAGIC_ENABLE ?= yes -- cgit v1.2.3 From fb29c0ae53e32fb049516fcbe0f7863882ca9173 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 17 Sep 2022 00:50:54 -0700 Subject: [Core] Add getreuer's Autocorrect feature to core (#15699) Co-authored-by: Albert Y <76888457+filterpaper@users.noreply.github.com> --- 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 f195e9fd75..0d897bc1c8 100644 --- a/builddefs/generic_features.mk +++ b/builddefs/generic_features.mk @@ -17,6 +17,7 @@ SPACE_CADET_ENABLE ?= yes GRAVE_ESC_ENABLE ?= yes GENERIC_FEATURES = \ + AUTOCORRECT \ CAPS_WORD \ COMBO \ COMMAND \ diff --git a/builddefs/show_options.mk b/builddefs/show_options.mk index 8d992c080c..fac6576ba1 100644 --- a/builddefs/show_options.mk +++ b/builddefs/show_options.mk @@ -84,7 +84,8 @@ OTHER_OPTION_NAMES = \ LTO_ENABLE \ PROGRAMMABLE_BUTTON_ENABLE \ SECURE_ENABLE \ - CAPS_WORD_ENABLE + CAPS_WORD_ENABLE \ + AUTOCORRECT_ENABLE define NAME_ECHO @printf " %-30s = %-16s # %s\\n" "$1" "$($1)" "$(origin $1)" -- cgit v1.2.3 From 20f142a7723b0362c0d936d600fb01c649cec951 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 19 Sep 2022 01:35:46 +0100 Subject: Tidy up LAYOUT macro generation (#18262) --- builddefs/build_keyboard.mk | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) (limited to 'builddefs') diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk index 65bc0451f7..91cd851ef6 100644 --- a/builddefs/build_keyboard.mk +++ b/builddefs/build_keyboard.mk @@ -241,21 +241,20 @@ endif # # https://docs.qmk.fm/#/feature_layouts?id=tips-for-making-layouts-keyboard-agnostic # -QMK_KEYBOARD_H = $(KEYBOARD_OUTPUT)/src/default_keyboard.h ifneq ("$(wildcard $(KEYBOARD_PATH_1)/$(KEYBOARD_FOLDER_1).h)","") - QMK_KEYBOARD_H = $(KEYBOARD_FOLDER_1).h + FOUND_KEYBOARD_H = $(KEYBOARD_FOLDER_1).h endif ifneq ("$(wildcard $(KEYBOARD_PATH_2)/$(KEYBOARD_FOLDER_2).h)","") - QMK_KEYBOARD_H = $(KEYBOARD_FOLDER_2).h + FOUND_KEYBOARD_H = $(KEYBOARD_FOLDER_2).h endif ifneq ("$(wildcard $(KEYBOARD_PATH_3)/$(KEYBOARD_FOLDER_3).h)","") - QMK_KEYBOARD_H = $(KEYBOARD_FOLDER_3).h + FOUND_KEYBOARD_H = $(KEYBOARD_FOLDER_3).h endif ifneq ("$(wildcard $(KEYBOARD_PATH_4)/$(KEYBOARD_FOLDER_4).h)","") - QMK_KEYBOARD_H = $(KEYBOARD_FOLDER_4).h + FOUND_KEYBOARD_H = $(KEYBOARD_FOLDER_4).h endif ifneq ("$(wildcard $(KEYBOARD_PATH_5)/$(KEYBOARD_FOLDER_5).h)","") - QMK_KEYBOARD_H = $(KEYBOARD_FOLDER_5).h + FOUND_KEYBOARD_H = $(KEYBOARD_FOLDER_5).h endif # Determine and set parameters based on the keyboard's processor family. @@ -329,7 +328,7 @@ ifneq ("$(wildcard $(KEYBOARD_PATH_5)/info.json)","") INFO_JSON_FILES += $(KEYBOARD_PATH_5)/info.json endif -CONFIG_H += $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/layouts.h +CONFIG_H += $(KEYBOARD_OUTPUT)/src/info_config.h KEYBOARD_SRC += $(KEYBOARD_OUTPUT)/src/default_keyboard.c $(KEYBOARD_OUTPUT)/src/info_config.h: $(INFO_JSON_FILES) @@ -344,15 +343,10 @@ $(KEYBOARD_OUTPUT)/src/default_keyboard.c: $(INFO_JSON_FILES) $(KEYBOARD_OUTPUT)/src/default_keyboard.h: $(INFO_JSON_FILES) @$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD) - $(eval CMD=$(QMK_BIN) generate-keyboard-h --quiet --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/default_keyboard.h) + $(eval CMD=$(QMK_BIN) generate-keyboard-h --quiet --keyboard $(KEYBOARD) --include $(FOUND_KEYBOARD_H) --output $(KEYBOARD_OUTPUT)/src/default_keyboard.h) @$(BUILD_CMD) -$(KEYBOARD_OUTPUT)/src/layouts.h: $(INFO_JSON_FILES) - @$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD) - $(eval CMD=$(QMK_BIN) generate-layouts --quiet --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/layouts.h) - @$(BUILD_CMD) - -generated-files: $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/default_keyboard.c $(KEYBOARD_OUTPUT)/src/default_keyboard.h $(KEYBOARD_OUTPUT)/src/layouts.h +generated-files: $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/default_keyboard.c $(KEYBOARD_OUTPUT)/src/default_keyboard.h .INTERMEDIATE : generated-files @@ -471,7 +465,7 @@ ALL_CONFIGS := $(PROJECT_CONFIG) $(CONFIG_H) OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT) $(KEYMAP_OUTPUT)_SRC := $(SRC) $(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) \ --DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYBOARD_H=\"$(QMK_KEYBOARD_H)\" \ +-DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYBOARD_H=\"$(KEYBOARD_OUTPUT)/src/default_keyboard.h\" \ -DQMK_KEYMAP=\"$(KEYMAP)\" -DQMK_KEYMAP_H=\"$(KEYMAP).h\" -DQMK_KEYMAP_CONFIG_H=\"$(KEYMAP_PATH)/config.h\" $(KEYMAP_OUTPUT)_INC := $(VPATH) $(EXTRAINCDIRS) $(KEYMAP_OUTPUT)_CONFIG := $(CONFIG_H) -- cgit v1.2.3 From 7c1797f52f74c9614615c0632ea1a2f5f11d3af6 Mon Sep 17 00:00:00 2001 From: Alabastard-64 <96358682+Alabastard-64@users.noreply.github.com> Date: Sat, 24 Sep 2022 00:43:55 -0600 Subject: [Core] Pointing Device Automatic Mouse Layer (#17962) Co-authored-by: Drashna Jaelre Co-authored-by: Stefan Kerkmann --- builddefs/common_features.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'builddefs') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 3d34c673d3..0e9e45220f 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -136,6 +136,7 @@ ifeq ($(strip $(POINTING_DEVICE_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:]')) -- cgit v1.2.3 From cbbb45c13f3de5ec28f62b6cd4a8b77143026500 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Fri, 30 Sep 2022 03:25:55 +1000 Subject: Start moving towards introspection-based data retrieval (#18441) --- builddefs/build_full_test.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'builddefs') diff --git a/builddefs/build_full_test.mk b/builddefs/build_full_test.mk index 4e4b4e4bfd..35f0a05b99 100644 --- a/builddefs/build_full_test.mk +++ b/builddefs/build_full_test.mk @@ -20,7 +20,7 @@ $(TEST)_SRC := \ $(TMK_COMMON_SRC) \ $(QUANTUM_SRC) \ $(SRC) \ - tests/test_common/keymap.c \ + $(QUANTUM_PATH)/keymap_introspection.c \ tests/test_common/matrix.c \ tests/test_common/test_driver.cpp \ tests/test_common/keyboard_report_util.cpp \ @@ -29,7 +29,7 @@ $(TEST)_SRC := \ tests/test_common/test_logger.cpp \ $(patsubst $(ROOTDIR)/%,%,$(wildcard $(TEST_PATH)/*.cpp)) -$(TEST)_DEFS := $(TMK_COMMON_DEFS) $(OPT_DEFS) +$(TEST)_DEFS := $(TMK_COMMON_DEFS) $(OPT_DEFS) "-DKEYMAP_C=\"keymap.c\"" $(TEST)_CONFIG := $(TEST_PATH)/config.h -- cgit v1.2.3 From f80058d96e2f1606f648166d320cda15986ced4c Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 30 Sep 2022 03:38:09 +1000 Subject: Start Bluetooth API (#18366) --- 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 0e9e45220f..951932ade9 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -882,7 +882,7 @@ ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) OPT_DEFS += -DBLUETOOTH_ENABLE NO_USB_STARTUP_CHECK := yes COMMON_VPATH += $(DRIVER_PATH)/bluetooth - SRC += outputselect.c + SRC += outputselect.c bluetooth.c ifeq ($(strip $(BLUETOOTH_DRIVER)), BluefruitLE) OPT_DEFS += -DBLUETOOTH_BLUEFRUIT_LE -DHAL_USE_SPI=TRUE -- cgit v1.2.3 From c4ff8192c2a43592e577e54b0019741c16fb1644 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 2 Oct 2022 09:36:07 +1100 Subject: Reverse keymap search order (#18449) --- builddefs/build_keyboard.mk | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'builddefs') diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk index 91cd851ef6..066b416b4b 100644 --- a/builddefs/build_keyboard.mk +++ b/builddefs/build_keyboard.mk @@ -124,26 +124,26 @@ include $(BUILDDEFS_PATH)/build_json.mk # Pull in keymap level rules.mk ifeq ("$(wildcard $(KEYMAP_PATH))", "") # Look through the possible keymap folders until we find a matching keymap.c - ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.c)","") - -include $(MAIN_KEYMAP_PATH_5)/rules.mk - KEYMAP_C := $(MAIN_KEYMAP_PATH_5)/keymap.c - KEYMAP_PATH := $(MAIN_KEYMAP_PATH_5) - else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_4)/keymap.c)","") - -include $(MAIN_KEYMAP_PATH_4)/rules.mk - KEYMAP_C := $(MAIN_KEYMAP_PATH_4)/keymap.c - KEYMAP_PATH := $(MAIN_KEYMAP_PATH_4) - else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_3)/keymap.c)","") - -include $(MAIN_KEYMAP_PATH_3)/rules.mk - KEYMAP_C := $(MAIN_KEYMAP_PATH_3)/keymap.c - KEYMAP_PATH := $(MAIN_KEYMAP_PATH_3) + ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.c)","") + -include $(MAIN_KEYMAP_PATH_1)/rules.mk + KEYMAP_C := $(MAIN_KEYMAP_PATH_1)/keymap.c + KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1) else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_2)/keymap.c)","") -include $(MAIN_KEYMAP_PATH_2)/rules.mk KEYMAP_C := $(MAIN_KEYMAP_PATH_2)/keymap.c KEYMAP_PATH := $(MAIN_KEYMAP_PATH_2) - else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.c)","") - -include $(MAIN_KEYMAP_PATH_1)/rules.mk - KEYMAP_C := $(MAIN_KEYMAP_PATH_1)/keymap.c - KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1) + else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_3)/keymap.c)","") + -include $(MAIN_KEYMAP_PATH_3)/rules.mk + KEYMAP_C := $(MAIN_KEYMAP_PATH_3)/keymap.c + KEYMAP_PATH := $(MAIN_KEYMAP_PATH_3) + else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_4)/keymap.c)","") + -include $(MAIN_KEYMAP_PATH_4)/rules.mk + KEYMAP_C := $(MAIN_KEYMAP_PATH_4)/keymap.c + KEYMAP_PATH := $(MAIN_KEYMAP_PATH_4) + else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.c)","") + -include $(MAIN_KEYMAP_PATH_5)/rules.mk + KEYMAP_C := $(MAIN_KEYMAP_PATH_5)/keymap.c + KEYMAP_PATH := $(MAIN_KEYMAP_PATH_5) else ifneq ($(LAYOUTS),) # If we haven't found a keymap yet fall back to community layouts include $(BUILDDEFS_PATH)/build_layout.mk -- cgit v1.2.3 From 86938fd958836e86cced081f46e8901bad245df8 Mon Sep 17 00:00:00 2001 From: jpe230 Date: Sat, 8 Oct 2022 11:13:58 -0500 Subject: Allow QK_MAKE to work with converters (#18637) --- builddefs/converters.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'builddefs') diff --git a/builddefs/converters.mk b/builddefs/converters.mk index b3e7bec007..c7e499226c 100644 --- a/builddefs/converters.mk +++ b/builddefs/converters.mk @@ -29,6 +29,7 @@ ifneq ($(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 += -DCONVERTER_ENABLED VPATH += $(CONVERTER) -- cgit v1.2.3 From aa8e0a3e7aa9268136fea31d5fd5832e91c0ccc4 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 19 Oct 2022 17:43:25 +0100 Subject: Build correctly when out of tree (#18775) --- builddefs/build_keyboard.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'builddefs') diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk index c137639eac..cfec9cdebe 100644 --- a/builddefs/build_keyboard.mk +++ b/builddefs/build_keyboard.mk @@ -162,7 +162,7 @@ ifneq ("$(wildcard $(KEYMAP_JSON))", "") -include $(KEYMAP_PATH)/rules.mk # Load any rules.mk content from keymap.json - INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --keyboard $(KEYBOARD) --keymap $(KEYMAP) --output $(KEYMAP_OUTPUT)/src/rules.mk) + INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --output $(KEYMAP_OUTPUT)/src/rules.mk $(KEYMAP_JSON)) include $(INFO_RULES_MK) # Add rules to generate the keymap files - indentation here is important @@ -173,7 +173,7 @@ $(KEYMAP_OUTPUT)/src/keymap.c: $(KEYMAP_JSON) $(KEYMAP_OUTPUT)/src/config.h: $(KEYMAP_JSON) @$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD) - $(eval CMD=$(QMK_BIN) generate-config-h --quiet --keyboard $(KEYBOARD) --keymap $(KEYMAP) --output $(KEYMAP_H)) + $(eval CMD=$(QMK_BIN) generate-config-h --quiet --output $(KEYMAP_H) $(KEYMAP_JSON)) @$(BUILD_CMD) generated-files: $(KEYMAP_OUTPUT)/src/config.h $(KEYMAP_OUTPUT)/src/keymap.c -- cgit v1.2.3 From af678521c1d786fe5578f82c2f671f5553b08dfe Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 21 Oct 2022 00:41:45 +1100 Subject: Remove quantum/audio from global VPATH (#18753) --- builddefs/common_features.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'builddefs') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 7f07be5144..8814d8b0f9 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -64,6 +64,7 @@ ifeq ($(strip $(AUDIO_ENABLE)), yes) OPT_DEFS += -DAUDIO_DRIVER_PWM endif OPT_DEFS += -DAUDIO_ENABLE + COMMON_VPATH += $(QUANTUM_PATH)/audio MUSIC_ENABLE = yes SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c SRC += $(QUANTUM_DIR)/process_keycode/process_clicky.c -- cgit v1.2.3 From 575db6949abb76d7f75ba69311a9492d7b79108a Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 22 Oct 2022 20:39:39 +0100 Subject: Generalise CTPC logic from common_features (#18803) --- builddefs/build_keyboard.mk | 4 ++++ builddefs/common_features.mk | 6 +----- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'builddefs') diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk index cfec9cdebe..499e6ffc69 100644 --- a/builddefs/build_keyboard.mk +++ b/builddefs/build_keyboard.mk @@ -368,6 +368,10 @@ endif # Disable features that a keyboard doesn't support -include $(BUILDDEFS_PATH)/disable_features.mk +ifneq ("$(CONVERTER)","") + -include $(CONVERTER)/post_converter.mk +endif + # Pull in post_rules.mk files from all our subfolders ifneq ("$(wildcard $(KEYBOARD_PATH_1)/post_rules.mk)","") include $(KEYBOARD_PATH_1)/post_rules.mk diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 8814d8b0f9..9939e0e5df 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -539,11 +539,7 @@ endif VALID_BACKLIGHT_TYPES := pwm timer software custom BACKLIGHT_ENABLE ?= no -ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes) - BACKLIGHT_DRIVER ?= software -else - BACKLIGHT_DRIVER ?= pwm -endif +BACKLIGHT_DRIVER ?= pwm ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) ifeq ($(filter $(BACKLIGHT_DRIVER),$(VALID_BACKLIGHT_TYPES)),) $(call CATASTROPHIC_ERROR,Invalid BACKLIGHT_DRIVER,BACKLIGHT_DRIVER="$(BACKLIGHT_DRIVER)" is not a valid backlight type) -- cgit v1.2.3 From 64ca14feea586442516a2ec50d7335445f5f08f6 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 23 Oct 2022 04:30:17 +0100 Subject: Fix garbled test output (#18822) * Fix garbled test output * Correct SRC listing --- builddefs/build_test.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builddefs') diff --git a/builddefs/build_test.mk b/builddefs/build_test.mk index 64db99fed9..7c8fdd20e5 100644 --- a/builddefs/build_test.mk +++ b/builddefs/build_test.mk @@ -71,7 +71,7 @@ include $(BUILDDEFS_PATH)/build_full_test.mk endif $(TEST)_SRC += \ - tests/test_common/main.c \ + tests/test_common/main.cpp \ $(QUANTUM_PATH)/logging/print.c $(TEST_OBJ)/$(TEST)_SRC := $($(TEST)_SRC) -- cgit v1.2.3 From 7ebc3968761b01202a36c57bb98e90067e733074 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 1 Nov 2022 11:35:38 +1100 Subject: compiler.txt: ensure file exists before comparison (#18921) --- builddefs/common_rules.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'builddefs') diff --git a/builddefs/common_rules.mk b/builddefs/common_rules.mk index 22746b92a3..5d100fec59 100644 --- a/builddefs/common_rules.mk +++ b/builddefs/common_rules.mk @@ -332,6 +332,7 @@ $1/asflags.txt: $1/force echo '$$($1_ASFLAGS)' | cmp -s - $$@ || echo '$$($1_ASFLAGS)' > $$@ $1/compiler.txt: $1/force + test -f $$@ || touch $$@ $$(CC) --version | cmp -s - $$@ || $$(CC) --version > $$@ endef -- cgit v1.2.3 From 5233c69bc60aa612709e5d74a005431594612b6e Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Sun, 6 Nov 2022 00:15:55 +1100 Subject: Remove thermal printer. (#18959) --- builddefs/common_features.mk | 6 ------ builddefs/disable_features.mk | 1 - builddefs/show_options.mk | 1 - 3 files changed, 8 deletions(-) (limited to 'builddefs') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 9939e0e5df..e597924469 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -514,12 +514,6 @@ ifeq ($(strip $(RGB_KEYCODES_ENABLE)), yes) SRC += $(QUANTUM_DIR)/process_keycode/process_rgb.c endif -ifeq ($(strip $(PRINTING_ENABLE)), yes) - OPT_DEFS += -DPRINTING_ENABLE - SRC += $(QUANTUM_DIR)/process_keycode/process_printer.c - QUANTUM_LIB_SRC += uart.c -endif - VARIABLE_TRACE ?= no ifneq ($(strip $(VARIABLE_TRACE)),no) SRC += $(QUANTUM_DIR)/variable_trace.c diff --git a/builddefs/disable_features.mk b/builddefs/disable_features.mk index 090a9b5a11..fe918b72b2 100644 --- a/builddefs/disable_features.mk +++ b/builddefs/disable_features.mk @@ -14,7 +14,6 @@ FEATURE_NAMES += LCD_BACKLIGHT FEATURE_NAMES += LCD FEATURE_NAMES += OLED FEATURE_NAMES += POINTING_DEVICE -FEATURE_NAMES += PRINTING FEATURE_NAMES += PS2_MOUSE FEATURE_NAMES += RGBLIGHT FEATURE_NAMES += RGB_MATRIX diff --git a/builddefs/show_options.mk b/builddefs/show_options.mk index fac6576ba1..e9f7e7d047 100644 --- a/builddefs/show_options.mk +++ b/builddefs/show_options.mk @@ -43,7 +43,6 @@ OTHER_OPTION_NAMES = \ KEY_LOCK_ENABLE \ KEY_OVERRIDE_ENABLE \ LEADER_ENABLE \ - PRINTING_ENABLE \ STENO_ENABLE \ STENO_PROTOCOL \ TAP_DANCE_ENABLE \ -- cgit v1.2.3 From 092228571c40a31d88940055b4d2fa749f135314 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Sat, 12 Nov 2022 10:57:44 +1100 Subject: Move EFL wear-leveling driver to be default for F1, F3, F4, L4, G4, WB32, GD32V. (#19020) --- builddefs/common_features.mk | 23 +++++++++++++++++------ builddefs/mcu_selection.mk | 7 +++---- 2 files changed, 20 insertions(+), 10 deletions(-) (limited to 'builddefs') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index e597924469..c6a67ee87d 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -177,7 +177,7 @@ ifeq ($(strip $(QUANTUM_PAINTER_ENABLE)), yes) include $(QUANTUM_DIR)/painter/rules.mk endif -VALID_EEPROM_DRIVER_TYPES := vendor custom transient i2c spi wear_leveling +VALID_EEPROM_DRIVER_TYPES := vendor custom transient i2c spi wear_leveling legacy_stm32_flash EEPROM_DRIVER ?= vendor ifeq ($(filter $(EEPROM_DRIVER),$(VALID_EEPROM_DRIVER_TYPES)),) $(call CATASTROPHIC_ERROR,Invalid EEPROM_DRIVER,EEPROM_DRIVER="$(EEPROM_DRIVER)" is not a valid EEPROM driver) @@ -204,6 +204,12 @@ else OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_SPI QUANTUM_LIB_SRC += spi_master.c SRC += eeprom_driver.c eeprom_spi.c + else ifeq ($(strip $(EEPROM_DRIVER)), legacy_stm32_flash) + # STM32 Emulated EEPROM, backed by MCU flash (soon to be deprecated) + OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_STM32_FLASH_EMULATED + COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/flash + COMMON_VPATH += $(DRIVER_PATH)/flash + SRC += eeprom_driver.c eeprom_stm32.c flash_stm32.c else ifeq ($(strip $(EEPROM_DRIVER)), transient) # Transient EEPROM implementation -- no data storage but provides runtime area for it OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_TRANSIENT @@ -214,20 +220,25 @@ else ifeq ($(PLATFORM),AVR) # Automatically provided by avr-libc, nothing required else ifeq ($(PLATFORM),CHIBIOS) - ifneq ($(filter STM32F3xx_% STM32F1xx_% %_STM32F401xC %_STM32F401xE %_STM32F405xG %_STM32F411xE %_STM32F072xB %_STM32F042x6 %_GD32VF103xB %_GD32VF103x8, $(MCU_SERIES)_$(MCU_LDSCRIPT)),) - # Emulated EEPROM + ifneq ($(filter %_STM32F072xB %_STM32F042x6, $(MCU_SERIES)_$(MCU_LDSCRIPT)),) + # STM32 Emulated EEPROM, backed by MCU flash (soon to be deprecated) OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_STM32_FLASH_EMULATED COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/flash COMMON_VPATH += $(DRIVER_PATH)/flash SRC += eeprom_driver.c eeprom_stm32.c flash_stm32.c + else ifneq ($(filter $(MCU_SERIES),STM32F1xx STM32F3xx STM32F4xx STM32L4xx STM32G4xx WB32F3G71xx WB32FQ95xx GD32VF103),) + # Wear-leveling EEPROM implementation, backed by MCU flash + OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_WEAR_LEVELING + SRC += eeprom_driver.c eeprom_wear_leveling.c + WEAR_LEVELING_DRIVER = embedded_flash else ifneq ($(filter $(MCU_SERIES),STM32L0xx STM32L1xx),) # True EEPROM on STM32L0xx, L1xx OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_STM32_L0_L1 SRC += eeprom_driver.c eeprom_stm32_L0_L1.c else ifneq ($(filter $(MCU_SERIES),RP2040),) - # Wear-leveling EEPROM implementation, backed by RP2040 flash - OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_WEAR_LEVELING - SRC += eeprom_driver.c eeprom_wear_leveling.c + # Wear-leveling EEPROM implementation, backed by RP2040 flash + OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_WEAR_LEVELING + SRC += eeprom_driver.c eeprom_wear_leveling.c WEAR_LEVELING_DRIVER = rp2040_flash else ifneq ($(filter $(MCU_SERIES),KL2x K20x),) # Teensy EEPROM implementations diff --git a/builddefs/mcu_selection.mk b/builddefs/mcu_selection.mk index 0ea9630d59..de919bd263 100644 --- a/builddefs/mcu_selection.mk +++ b/builddefs/mcu_selection.mk @@ -348,8 +348,6 @@ ifneq ($(findstring STM32F401, $(MCU)),) # or /ld/ ifeq ($(strip $(BOOTLOADER)), tinyuf2) MCU_LDSCRIPT ?= STM32F401xC_tinyuf2 - EEPROM_DRIVER ?= wear_leveling - WEAR_LEVELING_DRIVER ?= legacy else MCU_LDSCRIPT ?= STM32F401xC endif @@ -465,8 +463,6 @@ ifneq ($(findstring STM32F411, $(MCU)),) # or /ld/ ifeq ($(strip $(BOOTLOADER)), tinyuf2) MCU_LDSCRIPT ?= STM32F411xE_tinyuf2 - EEPROM_DRIVER ?= wear_leveling - WEAR_LEVELING_DRIVER ?= legacy else MCU_LDSCRIPT ?= STM32F411xE endif @@ -520,6 +516,9 @@ ifneq ($(findstring STM32F446, $(MCU)),) # Bootloader address for STM32 DFU STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000 + + # Default as no chibios efl config + EEPROM_DRIVER ?= transient endif ifneq ($(findstring STM32G431, $(MCU)),) -- cgit v1.2.3 From bebfdad795add9fbc8c6c1393d1b817d542474ed Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Wed, 23 Nov 2022 19:50:19 +1100 Subject: NVRAM refactor, phase 1. (#18969) * Rename `eeprom_stm32` to `eeprom_legacy_emulated_flash`. * Rename `flash_stm32` to `legacy_flash_ops`. * Rename `eeprom_teensy` to `eeprom_kinetis_flexram`. --- builddefs/common_features.mk | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'builddefs') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index c6a67ee87d..63814bbfae 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -222,10 +222,10 @@ else else ifeq ($(PLATFORM),CHIBIOS) ifneq ($(filter %_STM32F072xB %_STM32F042x6, $(MCU_SERIES)_$(MCU_LDSCRIPT)),) # STM32 Emulated EEPROM, backed by MCU flash (soon to be deprecated) - OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_STM32_FLASH_EMULATED + OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_LEGACY_EMULATED_FLASH COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/flash COMMON_VPATH += $(DRIVER_PATH)/flash - SRC += eeprom_driver.c eeprom_stm32.c flash_stm32.c + 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),) # Wear-leveling EEPROM implementation, backed by MCU flash OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_WEAR_LEVELING @@ -242,8 +242,8 @@ else WEAR_LEVELING_DRIVER = rp2040_flash else ifneq ($(filter $(MCU_SERIES),KL2x K20x),) # Teensy EEPROM implementations - OPT_DEFS += -DEEPROM_TEENSY - SRC += eeprom_teensy.c + OPT_DEFS += -DEEPROM_KINETIS_FLEXRAM + SRC += eeprom_kinetis_flexram.c else # Fall back to transient, i.e. non-persistent OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_TRANSIENT @@ -287,7 +287,7 @@ ifneq ($(strip $(WEAR_LEVELING_DRIVER)),none) POST_CONFIG_H += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_PATH)/wear_leveling/wear_leveling_rp2040_flash_config.h else ifeq ($(strip $(WEAR_LEVELING_DRIVER)), legacy) COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/flash - SRC += flash_stm32.c wear_leveling_legacy.c + SRC += legacy_flash_ops.c wear_leveling_legacy.c POST_CONFIG_H += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/wear_leveling/wear_leveling_legacy_config.h endif endif -- cgit v1.2.3