From 854547330704fb1b1f07d547d49728da8b92b2a3 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Tue, 31 May 2022 15:38:08 +1000 Subject: Removes terminal from QMK. (#17258) --- builddefs/common_features.mk | 6 ------ builddefs/show_options.mk | 1 - 2 files changed, 7 deletions(-) (limited to 'builddefs') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index c976b8296d..631558ef27 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -542,12 +542,6 @@ ifeq ($(strip $(LED_TABLES)), yes) SRC += $(QUANTUM_DIR)/led_tables.c endif -ifeq ($(strip $(TERMINAL_ENABLE)), yes) - SRC += $(QUANTUM_DIR)/process_keycode/process_terminal.c - OPT_DEFS += -DTERMINAL_ENABLE - OPT_DEFS += -DUSER_PRINT -endif - ifeq ($(strip $(VIA_ENABLE)), yes) DYNAMIC_KEYMAP_ENABLE := yes RAW_ENABLE := yes diff --git a/builddefs/show_options.mk b/builddefs/show_options.mk index f67d009191..1c1c189f27 100644 --- a/builddefs/show_options.mk +++ b/builddefs/show_options.mk @@ -5,7 +5,6 @@ BUILD_OPTION_NAMES = \ CONSOLE_ENABLE \ COMMAND_ENABLE \ NKRO_ENABLE \ - TERMINAL_ENABLE \ CUSTOM_MATRIX \ DEBOUNCE_TYPE \ SPLIT_KEYBOARD \ -- cgit v1.2.3 From 08c556b78b9dc672a2aa2388bbd3fdf408e3ce98 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Sun, 5 Jun 2022 10:26:02 +1000 Subject: Add keymap wrappers for introspection into the keymap. (#17229) * Introspection handlers for keymaps. * Renaming. --- builddefs/build_keyboard.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'builddefs') diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk index dc86b232df..a258f33216 100644 --- a/builddefs/build_keyboard.mk +++ b/builddefs/build_keyboard.mk @@ -390,10 +390,12 @@ ifneq ("$(KEYMAP_H)","") CONFIG_H += $(KEYMAP_H) endif +OPT_DEFS += -DKEYMAP_C=\"$(KEYMAP_C)\" + # project specific files SRC += \ $(KEYBOARD_SRC) \ - $(KEYMAP_C) \ + $(QUANTUM_DIR)/keymap_introspection.c \ $(QUANTUM_SRC) \ $(QUANTUM_DIR)/main.c \ -- cgit v1.2.3 From e89478eb0fe582d1a30a882e278927e31c9cdcc7 Mon Sep 17 00:00:00 2001 From: Stefan Kerkmann Date: Mon, 6 Jun 2022 00:47:22 +0200 Subject: [Core] Update C standard to GNU11, C++ to GNU++14 (#17114) --- builddefs/common_rules.mk | 117 ++++------------------------------------------ 1 file changed, 10 insertions(+), 107 deletions(-) (limited to 'builddefs') diff --git a/builddefs/common_rules.mk b/builddefs/common_rules.mk index d3acddc87b..6573257c78 100644 --- a/builddefs/common_rules.mk +++ b/builddefs/common_rules.mk @@ -1,19 +1,5 @@ # Hey Emacs, this is a -*- makefile -*- #---------------------------------------------------------------------------- -# WinAVR Makefile Template written by Eric B. Weddington, Jg Wunsch, et al. -# -# Released to the Public Domain -# -# Additional material for this makefile was written by: -# Peter Fleury -# Tim Henigan -# Colin O'Flynn -# Reiner Patommel -# Markus Pfaff -# Sander Pool -# Frederik Rouleau -# Carlos Lamas -# # Enable vpath seraching for source files only # Without this, output files, could be read from the wrong .build directories @@ -38,36 +24,15 @@ NO_LTO_OBJ := $(filter %.a,$(OBJ)) MASTER_OUTPUT := $(firstword $(OUTPUTS)) - - # Output format. (can be srec, ihex, binary) FORMAT = ihex # Optimization level, can be [0, 1, 2, 3, s]. -# 0 = turn off optimization. s = optimize for size. -# (Note: 3 is not always the best optimization level. See avr-libc FAQ.) OPT ?= s -# Compiler flag to set the C Standard level. -# c89 = "ANSI" C -# gnu89 = c89 plus GCC extensions -# c99 = ISO C99 standard (not yet fully implemented) -# gnu99 = c99 plus GCC extensions -CSTANDARD = -std=gnu99 - - -# Place -D or -U options here for C sources -#CDEFS += - - -# Place -D or -U options here for ASM sources -#ADEFS += - - -# Place -D or -U options here for C++ sources -#CXXDEFS += -D__STDC_LIMIT_MACROS -#CXXDEFS += -D__STDC_CONSTANT_MACROS -#CXXDEFS += +# Compiler flag to set the C and C++ language standard level +CSTANDARD = -std=gnu11 +CXXSTANDARD = -std=gnu++14 # Speed up recompilations by opt-in usage of ccache USE_CCACHE ?= no @@ -75,12 +40,8 @@ ifneq ($(USE_CCACHE),no) CC_PREFIX ?= ccache endif -#---------------- Compiler Options C ---------------- -# -g*: generate debugging information -# -O*: optimization level -# -f...: tuning, see GCC manual and avr-libc documentation -# -Wall...: warning level -# -Wa,...: tell GCC to pass this to the assembler. +#---------------- 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.) @@ -111,23 +72,14 @@ CFLAGS += -Wstrict-prototypes ifneq ($(strip $(ALLOW_WARNINGS)), yes) CFLAGS += -Werror endif -#CFLAGS += -mshort-calls -#CFLAGS += -fno-unit-at-a-time -#CFLAGS += -Wundef -#CFLAGS += -Wunreachable-code -#CFLAGS += -Wsign-compare CFLAGS += $(CSTANDARD) # This fixes lots of keyboards linking errors but SHOULDN'T BE A FINAL SOLUTION # Fixing of multiple variable definitions must be made. CFLAGS += -fcommon -#---------------- Compiler Options C++ ---------------- -# -g*: generate debugging information -# -O*: optimization level -# -f...: tuning, see GCC manual and avr-libc documentation -# -Wall...: warning level -# -Wa,...: tell GCC to pass this to the assembler. +#---------------- C++ Compiler Options ---------------- + ifeq ($(strip $(DEBUG_ENABLE)),yes) CXXFLAGS += -g$(DEBUG) endif @@ -141,57 +93,17 @@ CXXFLAGS += -Wundef ifneq ($(strip $(ALLOW_WARNINGS)), yes) CXXFLAGS += -Werror endif -#CXXFLAGS += -mshort-calls -#CXXFLAGS += -fno-unit-at-a-time -#CXXFLAGS += -Wstrict-prototypes -#CXXFLAGS += -Wunreachable-code -#CXXFLAGS += -Wsign-compare -#CXXFLAGS += $(CSTANDARD) #---------------- Assembler Options ---------------- + ASFLAGS += $(ADEFS) ifeq ($(VERBOSE_AS_CMD),yes) ASFLAGS += -v endif -#---------------- Library Options ---------------- -# Minimalistic printf version -PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min - -# Floating point printf version (requires MATH_LIB = -lm below) -PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt - -# If this is left blank, then it will use the Standard printf version. -PRINTF_LIB = -#PRINTF_LIB = $(PRINTF_LIB_MIN) -#PRINTF_LIB = $(PRINTF_LIB_FLOAT) - - -# Minimalistic scanf version -SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min - -# Floating point + %[ scanf version (requires MATH_LIB = -lm below) -SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt - -# If this is left blank, then it will use the Standard scanf version. -SCANF_LIB = -#SCANF_LIB = $(SCANF_LIB_MIN) -#SCANF_LIB = $(SCANF_LIB_FLOAT) - - -MATH_LIB = -lm -CREATE_MAP ?= yes - - #---------------- Linker Options ---------------- -# -Wl,...: tell GCC to pass this to linker. -# -Map: create map file -# --cref: add cross reference to map file -# -# Comennt out "--relax" option to avoid a error such: -# (.vectors+0x30): relocation truncated to fit: R_AVR_13_PCREL against symbol `__vector_12' -# +CREATE_MAP ?= yes ifeq ($(CREATE_MAP),yes) LDFLAGS += -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref endif @@ -201,20 +113,11 @@ endif #LDFLAGS += -Wl,--relax LDFLAGS += $(EXTMEMOPTS) LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS)) -LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB) -#LDFLAGS += -T linker_script.x +LDFLAGS += -lm # You can give EXTRALDFLAGS at 'make' command line. LDFLAGS += $(EXTRALDFLAGS) #---------------- Assembler Listings ---------------- -# -Wa,...: tell GCC to pass this to the assembler. -# -adhlns: create listing -# -gstabs: have the assembler create line number information; note that -# for use in COFF files, additional information about filenames -# and function names needs to be present in the assembler source -# files -- see avr-libc docs [FIXME: not yet described there] -# -listing-cont-lines: Sets the maximum number of continuation lines of hex -# dump that will be displayed for a given single line of source input. ADHLNS_ENABLE ?= no ifeq ($(ADHLNS_ENABLE),yes) -- cgit v1.2.3 From 1085500e894d9d31c4e97e7f1b74091bb9043a91 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Wed, 8 Jun 2022 09:42:35 +1000 Subject: Rework paths for eeprom locations. (#17326) * Rework paths for eeprom locations. * File relocation. * Wrong file move. * Fixup test paths. --- builddefs/common_features.mk | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) (limited to 'builddefs') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 631558ef27..ff0c6b0cc6 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -160,27 +160,26 @@ ifeq ($(filter $(EEPROM_DRIVER),$(VALID_EEPROM_DRIVER_TYPES)),) $(call CATASTROPHIC_ERROR,Invalid EEPROM_DRIVER,EEPROM_DRIVER="$(EEPROM_DRIVER)" is not a valid EEPROM driver) else OPT_DEFS += -DEEPROM_ENABLE + COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/eeprom + COMMON_VPATH += $(DRIVER_PATH)/eeprom + COMMON_VPATH += $(PLATFORM_COMMON_DIR) ifeq ($(strip $(EEPROM_DRIVER)), custom) # Custom EEPROM implementation -- only needs to implement init/erase/read_block/write_block OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_CUSTOM - COMMON_VPATH += $(DRIVER_PATH)/eeprom SRC += eeprom_driver.c else ifeq ($(strip $(EEPROM_DRIVER)), i2c) # External I2C EEPROM implementation OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_I2C - COMMON_VPATH += $(DRIVER_PATH)/eeprom QUANTUM_LIB_SRC += i2c_master.c SRC += eeprom_driver.c eeprom_i2c.c else ifeq ($(strip $(EEPROM_DRIVER)), spi) # External SPI EEPROM implementation OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_SPI - COMMON_VPATH += $(DRIVER_PATH)/eeprom QUANTUM_LIB_SRC += spi_master.c SRC += eeprom_driver.c eeprom_spi.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 - COMMON_VPATH += $(DRIVER_PATH)/eeprom SRC += eeprom_driver.c eeprom_transient.c else ifeq ($(strip $(EEPROM_DRIVER)), vendor) # Vendor-implemented EEPROM @@ -191,17 +190,13 @@ else ifneq ($(filter STM32F3xx_% STM32F1xx_% %_STM32F401xC %_STM32F401xE %_STM32F405xG %_STM32F411xE %_STM32F072xB %_STM32F042x6 %_GD32VF103xB %_GD32VF103x8, $(MCU_SERIES)_$(MCU_LDSCRIPT)),) # Emulated EEPROM OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_STM32_FLASH_EMULATED - COMMON_VPATH += $(DRIVER_PATH)/eeprom - SRC += eeprom_driver.c - SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c - SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c + 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),STM32L0xx STM32L1xx),) # True EEPROM on STM32L0xx, L1xx OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_STM32_L0_L1 - COMMON_VPATH += $(DRIVER_PATH)/eeprom - COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/eeprom - SRC += eeprom_driver.c - SRC += eeprom_stm32_L0_L1.c + SRC += eeprom_driver.c eeprom_stm32_L0_L1.c else ifneq ($(filter $(MCU_SERIES),KL2x K20x),) # Teensy EEPROM implementations OPT_DEFS += -DEEPROM_TEENSY @@ -209,17 +204,16 @@ else else # Fall back to transient, i.e. non-persistent OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_TRANSIENT - COMMON_VPATH += $(DRIVER_PATH)/eeprom SRC += eeprom_driver.c eeprom_transient.c endif else ifeq ($(PLATFORM),ARM_ATSAM) # arm_atsam EEPROM OPT_DEFS += -DEEPROM_SAMD - SRC += $(PLATFORM_COMMON_DIR)/eeprom_samd.c + SRC += eeprom_samd.c else ifeq ($(PLATFORM),TEST) # Test harness "EEPROM" OPT_DEFS += -DEEPROM_TEST_HARNESS - SRC += $(PLATFORM_COMMON_DIR)/eeprom.c + SRC += eeprom.c endif endif endif -- cgit v1.2.3 From 1706da9054f8c4aa77493062a8937a7b64970a9e Mon Sep 17 00:00:00 2001 From: Jouke Witteveen Date: Mon, 13 Jun 2022 22:12:55 +0200 Subject: tap-dance: Restructure code and document in more detail (#16394) --- 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 5ad33b19c5..834184f221 100644 --- a/builddefs/build_test.mk +++ b/builddefs/build_test.mk @@ -42,7 +42,7 @@ VPATH += \ all: elf -VPATH += $(COMMON_VPATH) +VPATH += $(TEST_PATH) $(COMMON_VPATH) PLATFORM:=TEST PLATFORM_KEY:=test BOOTLOADER_TYPE:=none -- cgit v1.2.3 From fa8fb6027952cfeda532ff4712c07e80cde8cfbf Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Thu, 16 Jun 2022 09:55:15 +1000 Subject: Dump out the largest symbols in flash and in RAM. (#17397) --- builddefs/build_keyboard.mk | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'builddefs') diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk index a258f33216..2b9ec48e70 100644 --- a/builddefs/build_keyboard.mk +++ b/builddefs/build_keyboard.mk @@ -471,6 +471,19 @@ check-size: build check-md5: build objs-size: build +ifeq ($(strip $(TOP_SYMBOLS)),yes) +all: top-symbols +check-size: top-symbols +top-symbols: build + echo "###########################################" + echo "# Highest flash usage:" + $(NM) -Crtd --size-sort $(BUILD_DIR)/$(TARGET).elf | grep -i ' [t] ' | head -n10 | sed -e 's#^0000000# #g' -e 's#^000000# #g' -e 's#^00000# #g' -e 's#^0000# #g' -e 's#^000# #g' -e 's#^00# #g' -e 's#^0# #g' + echo "###########################################" + echo "# Highest RAM usage:" + $(NM) -Crtd --size-sort $(BUILD_DIR)/$(TARGET).elf | grep -i ' [dbv] ' | head -n10 | sed -e 's#^0000000# #g' -e 's#^000000# #g' -e 's#^00000# #g' -e 's#^0000# #g' -e 's#^000# #g' -e 's#^00# #g' -e 's#^0# #g' + echo "###########################################" +endif + include $(BUILDDEFS_PATH)/show_options.mk include $(BUILDDEFS_PATH)/common_rules.mk -- cgit v1.2.3 From fe680a8568d275732738b07166b8f8a950d1e282 Mon Sep 17 00:00:00 2001 From: Stefan Kerkmann Date: Sat, 18 Jun 2022 00:04:17 +0200 Subject: [Core] Split ChibiOS usart split driver in protocol and hardware driver part (#16669) --- builddefs/common_features.mk | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'builddefs') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index ff0c6b0cc6..83505596d2 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -583,6 +583,14 @@ ifneq ($(strip $(DEBOUNCE_TYPE)), custom) QUANTUM_SRC += $(QUANTUM_DIR)/debounce/$(strip $(DEBOUNCE_TYPE)).c endif + +VALID_SERIAL_DRIVER_TYPES := bitbang usart + +SERIAL_DRIVER ?= bitbang +ifeq ($(filter $(SERIAL_DRIVER),$(VALID_SERIAL_DRIVER_TYPES)),) + $(call CATASTROPHIC_ERROR,Invalid SERIAL_DRIVER,SERIAL_DRIVER="$(SERIAL_DRIVER)" is not a valid SERIAL driver) +endif + ifeq ($(strip $(SPLIT_KEYBOARD)), yes) POST_CONFIG_H += $(QUANTUM_DIR)/split_common/post_config.h OPT_DEFS += -DSPLIT_KEYBOARD @@ -607,11 +615,11 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes) endif endif - SERIAL_DRIVER ?= bitbang OPT_DEFS += -DSERIAL_DRIVER_$(strip $(shell echo $(SERIAL_DRIVER) | tr '[:lower:]' '[:upper:]')) ifeq ($(strip $(SERIAL_DRIVER)), bitbang) QUANTUM_LIB_SRC += serial.c else + QUANTUM_LIB_SRC += serial_protocol.c QUANTUM_LIB_SRC += serial_$(strip $(SERIAL_DRIVER)).c endif endif -- cgit v1.2.3 From 7060cb7b267e78ba693a77a3346c77c2d4209b01 Mon Sep 17 00:00:00 2001 From: precondition <57645186+precondition@users.noreply.github.com> Date: Thu, 23 Jun 2022 20:43:24 +0200 Subject: Refactor steno and add `STENO_PROTOCOL = [all|txbolt|geminipr]` (#17065) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Refactor steno into STENO_ENABLE_[ALL|GEMINI|BOLT] * Update stenography documentation * STENO_ENABLE_TXBOLT → STENO_ENABLE_BOLT TXBOLT is a better name but BOLT is more consistent with the pre-existing TX Bolt related constants, which all drop the "TX " prefix * Comments * STENO_ENABLE_[GEMINI|BOLT|ALL] → STENO_PROTOCOL = [geminipr|txbolt|all] * Add note on lacking V-USB support * Clear chord at the end of the switch(mode){send_steno_chord} block * Return true if NOEVENT * update_chord_xxx → add_xxx_key_to_chord * Enable the defines for all the protocols if STENO_PROTOCOL = all * Mention how to use `steno_set_mode` * Set the default steno protocol to "all" This is done so that existing keymaps invoking `steno_set_mode` don't all suddenly break * Add data driver equivalents for stenography feature * Document format of serial steno packets (Thanks dnaq) * Add missing comma --- builddefs/common_features.mk | 25 ++++++++++++++++++++++--- builddefs/show_options.mk | 1 + 2 files changed, 23 insertions(+), 3 deletions(-) (limited to 'builddefs') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 83505596d2..b9ee0a30a7 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -92,10 +92,29 @@ ifeq ($(MUSIC_ENABLE), yes) SRC += $(QUANTUM_DIR)/process_keycode/process_music.c endif +VALID_STENO_PROTOCOL_TYPES := geminipr txbolt all +STENO_PROTOCOL ?= all ifeq ($(strip $(STENO_ENABLE)), yes) - OPT_DEFS += -DSTENO_ENABLE - VIRTSER_ENABLE ?= yes - SRC += $(QUANTUM_DIR)/process_keycode/process_steno.c + ifeq ($(filter $(STENO_PROTOCOL),$(VALID_STENO_PROTOCOL_TYPES)),) + $(call CATASTROPHIC_ERROR,Invalid STENO_PROTOCOL,STENO_PROTOCOL="$(STENO_PROTOCOL)" is not a valid stenography protocol) + else + OPT_DEFS += -DSTENO_ENABLE + VIRTSER_ENABLE ?= yes + + ifeq ($(strip $(STENO_PROTOCOL)), geminipr) + OPT_DEFS += -DSTENO_ENABLE_GEMINI + endif + ifeq ($(strip $(STENO_PROTOCOL)), txbolt) + OPT_DEFS += -DSTENO_ENABLE_BOLT + endif + ifeq ($(strip $(STENO_PROTOCOL)), all) + OPT_DEFS += -DSTENO_ENABLE_ALL + OPT_DEFS += -DSTENO_ENABLE_GEMINI + OPT_DEFS += -DSTENO_ENABLE_BOLT + endif + + SRC += $(QUANTUM_DIR)/process_keycode/process_steno.c + endif endif ifeq ($(strip $(VIRTSER_ENABLE)), yes) diff --git a/builddefs/show_options.mk b/builddefs/show_options.mk index 1c1c189f27..98537e6da2 100644 --- a/builddefs/show_options.mk +++ b/builddefs/show_options.mk @@ -45,6 +45,7 @@ OTHER_OPTION_NAMES = \ LEADER_ENABLE \ PRINTING_ENABLE \ STENO_ENABLE \ + STENO_PROTOCOL \ TAP_DANCE_ENABLE \ VIRTSER_ENABLE \ OLED_ENABLE \ -- cgit v1.2.3 From 01ecf332ff9f0c8f61e493cdca116f58d80bb5fb Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Mon, 27 Jun 2022 07:18:21 +1000 Subject: Generic wear-leveling algorithm (#16996) * Initial import of wear-leveling algorithm. * Alignment. * Docs tweaks. * Lock/unlock. * Update quantum/wear_leveling/wear_leveling_internal.h Co-authored-by: Stefan Kerkmann * More tests, fix issue with consolidation when unlocked. * More tests. * Review comments. * Add plumbing for FNV1a. * Another test checking that checksum mismatch clears the cache. * Check that the write log still gets played back. Co-authored-by: Stefan Kerkmann --- builddefs/build_test.mk | 1 + builddefs/common_features.mk | 6 ++++++ builddefs/testlist.mk | 1 + 3 files changed, 8 insertions(+) (limited to 'builddefs') diff --git a/builddefs/build_test.mk b/builddefs/build_test.mk index 834184f221..bd9b372c33 100644 --- a/builddefs/build_test.mk +++ b/builddefs/build_test.mk @@ -63,6 +63,7 @@ include $(TMK_PATH)/protocol.mk include $(QUANTUM_PATH)/debounce/tests/rules.mk include $(QUANTUM_PATH)/encoder/tests/rules.mk include $(QUANTUM_PATH)/sequencer/tests/rules.mk +include $(QUANTUM_PATH)/wear_leveling/tests/rules.mk include $(PLATFORM_PATH)/test/rules.mk ifneq ($(filter $(FULL_TESTS),$(TEST)),) include $(BUILDDEFS_PATH)/build_full_test.mk diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index b9ee0a30a7..552171fe68 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -650,6 +650,12 @@ ifeq ($(strip $(CRC_ENABLE)), yes) SRC += crc.c endif +ifeq ($(strip $(FNV_ENABLE)), yes) + OPT_DEFS += -DFNV_ENABLE + VPATH += $(LIB_PATH)/fnv + SRC += qmk_fnv_type_validation.c hash_32a.c hash_64a.c +endif + ifeq ($(strip $(HAPTIC_ENABLE)),yes) COMMON_VPATH += $(DRIVER_PATH)/haptic diff --git a/builddefs/testlist.mk b/builddefs/testlist.mk index b8d22bce80..8a30a44972 100644 --- a/builddefs/testlist.mk +++ b/builddefs/testlist.mk @@ -4,6 +4,7 @@ FULL_TESTS := $(notdir $(TEST_LIST)) include $(QUANTUM_PATH)/debounce/tests/testlist.mk include $(QUANTUM_PATH)/encoder/tests/testlist.mk include $(QUANTUM_PATH)/sequencer/tests/testlist.mk +include $(QUANTUM_PATH)/wear_leveling/tests/testlist.mk include $(PLATFORM_PATH)/test/testlist.mk define VALIDATE_TEST_LIST -- cgit v1.2.3 From 34e244cecf62afb30ee5a4362867f24b03675691 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Thu, 30 Jun 2022 07:42:23 +1000 Subject: Wear-leveling EEPROM drivers: `embedded_flash`, `spi_flash`, `legacy` (#17376) --- builddefs/build_keyboard.mk | 16 ++++++++++++++++ builddefs/common_features.mk | 44 +++++++++++++++++++++++++++++++++++++++----- 2 files changed, 55 insertions(+), 5 deletions(-) (limited to 'builddefs') diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk index 2b9ec48e70..b5616a438f 100644 --- a/builddefs/build_keyboard.mk +++ b/builddefs/build_keyboard.mk @@ -13,6 +13,14 @@ endif include paths.mk include $(BUILDDEFS_PATH)/message.mk +# Helper to add defines with a 'QMK_' prefix +define add_qmk_prefix_defs + ifdef $1 + # Need to cater for 'STM32L4xx+' + OPT_DEFS += -DQMK_$(2)="$($1)" -DQMK_$(2)_$(shell echo $($1) | sed -e 's@+@Plus@g' -e 's@[^a-zA-Z0-9]@_@g' | tr '[:lower:]' '[:upper:]') + endif +endef + # Set the qmk cli to use QMK_BIN ?= qmk @@ -438,6 +446,14 @@ else include $(TMK_PATH)/protocol/$(PLATFORM_KEY).mk endif +# Setup definitions based on the selected MCU +$(eval $(call add_qmk_prefix_defs,MCU_ORIG,MCU)) +$(eval $(call add_qmk_prefix_defs,MCU_ARCH,MCU_ARCH)) +$(eval $(call add_qmk_prefix_defs,MCU_PORT_NAME,MCU_PORT_NAME)) +$(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)) + # TODO: remove this bodge? PROJECT_DEFS := $(OPT_DEFS) PROJECT_INC := $(VPATH) $(EXTRAINCDIRS) $(KEYBOARD_PATHS) diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 552171fe68..b447c6743d 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -173,7 +173,7 @@ ifeq ($(strip $(QUANTUM_PAINTER_ENABLE)), yes) include $(QUANTUM_DIR)/painter/rules.mk endif -VALID_EEPROM_DRIVER_TYPES := vendor custom transient i2c spi +VALID_EEPROM_DRIVER_TYPES := vendor custom transient i2c spi wear_leveling 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) @@ -186,6 +186,10 @@ else # Custom EEPROM implementation -- only needs to implement init/erase/read_block/write_block OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_CUSTOM SRC += eeprom_driver.c + else ifeq ($(strip $(EEPROM_DRIVER)), wear_leveling) + # Wear-leveling EEPROM implementation + OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_WEAR_LEVELING + SRC += eeprom_driver.c eeprom_wear_leveling.c else ifeq ($(strip $(EEPROM_DRIVER)), i2c) # External I2C EEPROM implementation OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_I2C @@ -237,17 +241,47 @@ else endif endif +VALID_WEAR_LEVELING_DRIVER_TYPES := custom embedded_flash spi_flash legacy +WEAR_LEVELING_DRIVER ?= none +ifneq ($(strip $(WEAR_LEVELING_DRIVER)),none) + ifeq ($(filter $(WEAR_LEVELING_DRIVER),$(VALID_WEAR_LEVELING_DRIVER_TYPES)),) + $(call CATASTROPHIC_ERROR,Invalid WEAR_LEVELING_DRIVER,WEAR_LEVELING_DRIVER="$(WEAR_LEVELING_DRIVER)" is not a valid wear leveling driver) + else + FNV_ENABLE := yes + OPT_DEFS += -DWEAR_LEVELING_ENABLE + OPT_DEFS += -DWEAR_LEVELING_$(strip $(shell echo $(WEAR_LEVELING_DRIVER) | tr '[:lower:]' '[:upper:]')) + COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/wear_leveling + COMMON_VPATH += $(DRIVER_PATH)/wear_leveling + COMMON_VPATH += $(QUANTUM_DIR)/wear_leveling + SRC += wear_leveling.c + ifeq ($(strip $(WEAR_LEVELING_DRIVER)), embedded_flash) + OPT_DEFS += -DHAL_USE_EFL + SRC += wear_leveling_efl.c + POST_CONFIG_H += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/wear_leveling/wear_leveling_efl_config.h + else ifeq ($(strip $(WEAR_LEVELING_DRIVER)), spi_flash) + FLASH_DRIVER := spi + SRC += wear_leveling_flash_spi.c + POST_CONFIG_H += $(DRIVER_PATH)/wear_leveling/wear_leveling_flash_spi_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 + POST_CONFIG_H += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/wear_leveling/wear_leveling_legacy_config.h + endif + endif +endif + VALID_FLASH_DRIVER_TYPES := spi -FLASH_DRIVER ?= no -ifneq ($(strip $(FLASH_DRIVER)), no) +FLASH_DRIVER ?= none +ifneq ($(strip $(FLASH_DRIVER)), none) ifeq ($(filter $(FLASH_DRIVER),$(VALID_FLASH_DRIVER_TYPES)),) - $(error FLASH_DRIVER="$(FLASH_DRIVER)" is not a valid FLASH driver) + $(call CATASTROPHIC_ERROR,Invalid FLASH_DRIVER,FLASH_DRIVER="$(FLASH_DRIVER)" is not a valid flash driver) else OPT_DEFS += -DFLASH_ENABLE - ifeq ($(strip $(FLASH_DRIVER)), spi) + ifeq ($(strip $(FLASH_DRIVER)),spi) OPT_DEFS += -DFLASH_DRIVER -DFLASH_SPI COMMON_VPATH += $(DRIVER_PATH)/flash SRC += flash_spi.c + QUANTUM_LIB_SRC += spi_master.c endif endif endif -- cgit v1.2.3 From d7173967087e022d20d1f9c812b1b668e9d3f71b Mon Sep 17 00:00:00 2001 From: Stefan Kerkmann Date: Thu, 30 Jun 2022 13:19:27 +0200 Subject: [Core] Add Raspberry Pi RP2040 support (#14877) * Disable RESET keycode because of naming conflicts * Add Pico SDK as submodule * Add RP2040 build support to QMK * Adjust USB endpoint structs for RP2040 * Add RP2040 bootloader and double-tap reset routine * Add generic and pro micro RP2040 boards * Add RP2040 onekey keyboard * Add WS2812 PIO DMA enabled driver and documentation Supports regular and open-drain output configuration. RP2040 GPIOs are sadly not 5V tolerant, so this is a bit use-less or needs extra hardware or you take the risk to fry your hardware. * Adjust SIO Driver for RP2040 * Adjust I2C Driver for RP2040 * Adjust SPI Driver for RP2040 * Add PIO serial driver and documentation * Add general RP2040 documentation * Apply suggestions from code review Co-authored-by: Nick Brassel Co-authored-by: Nick Brassel --- builddefs/bootloader.mk | 4 ++++ builddefs/common_features.mk | 4 ++-- builddefs/mcu_selection.mk | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 2 deletions(-) (limited to 'builddefs') diff --git a/builddefs/bootloader.mk b/builddefs/bootloader.mk index eba8e280e4..3d4c03b01c 100644 --- a/builddefs/bootloader.mk +++ b/builddefs/bootloader.mk @@ -200,6 +200,10 @@ ifeq ($(strip $(BOOTLOADER)), tinyuf2) OPT_DEFS += -DBOOTLOADER_TINYUF2 BOOTLOADER_TYPE = tinyuf2 endif +ifeq ($(strip $(BOOTLOADER)), rp2040) + OPT_DEFS += -DBOOTLOADER_RP2040 + BOOTLOADER_TYPE = rp2040 +endif ifeq ($(strip $(BOOTLOADER)), halfkay) OPT_DEFS += -DBOOTLOADER_HALFKAY BOOTLOADER_TYPE = halfkay diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index b447c6743d..2edc1bdef0 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -547,7 +547,7 @@ ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) endif endif -VALID_WS2812_DRIVER_TYPES := bitbang pwm spi i2c +VALID_WS2812_DRIVER_TYPES := bitbang pwm spi i2c vendor WS2812_DRIVER ?= bitbang ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes) @@ -637,7 +637,7 @@ ifneq ($(strip $(DEBOUNCE_TYPE)), custom) endif -VALID_SERIAL_DRIVER_TYPES := bitbang usart +VALID_SERIAL_DRIVER_TYPES := bitbang usart vendor SERIAL_DRIVER ?= bitbang ifeq ($(filter $(SERIAL_DRIVER),$(VALID_SERIAL_DRIVER_TYPES)),) diff --git a/builddefs/mcu_selection.mk b/builddefs/mcu_selection.mk index d5fb731e08..d676e0c06a 100644 --- a/builddefs/mcu_selection.mk +++ b/builddefs/mcu_selection.mk @@ -116,6 +116,41 @@ ifneq ($(findstring MK66FX1M0, $(MCU)),) BOARD ?= PJRC_TEENSY_3_6 endif +ifneq ($(findstring RP2040, $(MCU)),) + # Cortex version + MCU = cortex-m0plus + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + CHIBIOS_PORT = ARMv6-M-RP2 + + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES) + # OR + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = RP + MCU_SERIES = RP2040 + + # Linker script to use + # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ + # or /ld/ + STARTUPLD_CONTRIB = $(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/compilers/GCC/ld + MCU_LDSCRIPT ?= RP2040_FLASH + LDFLAGS += -L $(STARTUPLD_CONTRIB) + + # Startup code to use + # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= rp2040 + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= GENERIC_PROMICRO_RP2040 + + # Default UF2 Bootloader settings + UF2_FAMILY ?= RP2040 + FIRMWARE_FORMAT ?= uf2 +endif + ifneq ($(findstring STM32F042, $(MCU)),) # Cortex version MCU = cortex-m0 -- cgit v1.2.3 From 5846b40f7444af96b0d8ddf3af9b558193c2475d Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Sat, 2 Jul 2022 15:18:50 +1000 Subject: RP2040 emulated EEPROM. (#17519) --- builddefs/common_features.mk | 10 +++++++++- builddefs/mcu_selection.mk | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'builddefs') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 2edc1bdef0..c11e5688e3 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -220,6 +220,11 @@ else # 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_DRIVER = rp2040_flash else ifneq ($(filter $(MCU_SERIES),KL2x K20x),) # Teensy EEPROM implementations OPT_DEFS += -DEEPROM_TEENSY @@ -241,7 +246,7 @@ else endif endif -VALID_WEAR_LEVELING_DRIVER_TYPES := custom embedded_flash spi_flash legacy +VALID_WEAR_LEVELING_DRIVER_TYPES := custom embedded_flash spi_flash rp2040_flash legacy WEAR_LEVELING_DRIVER ?= none ifneq ($(strip $(WEAR_LEVELING_DRIVER)),none) ifeq ($(filter $(WEAR_LEVELING_DRIVER),$(VALID_WEAR_LEVELING_DRIVER_TYPES)),) @@ -262,6 +267,9 @@ ifneq ($(strip $(WEAR_LEVELING_DRIVER)),none) FLASH_DRIVER := spi SRC += wear_leveling_flash_spi.c POST_CONFIG_H += $(DRIVER_PATH)/wear_leveling/wear_leveling_flash_spi_config.h + else ifeq ($(strip $(WEAR_LEVELING_DRIVER)), rp2040_flash) + SRC += wear_leveling_rp2040_flash.c + POST_CONFIG_H += $(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 diff --git a/builddefs/mcu_selection.mk b/builddefs/mcu_selection.mk index d676e0c06a..135f663c14 100644 --- a/builddefs/mcu_selection.mk +++ b/builddefs/mcu_selection.mk @@ -135,7 +135,7 @@ ifneq ($(findstring RP2040, $(MCU)),) # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ # or /ld/ STARTUPLD_CONTRIB = $(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/compilers/GCC/ld - MCU_LDSCRIPT ?= RP2040_FLASH + MCU_LDSCRIPT ?= RP2040_FLASH_TIMECRIT LDFLAGS += -L $(STARTUPLD_CONTRIB) # Startup code to use -- cgit v1.2.3 From 3ecb0a80af9e4ce4194a34032642933641730706 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 2 Jul 2022 22:10:08 +1000 Subject: Feature-ify Send String (#17275) --- builddefs/common_features.mk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'builddefs') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index c11e5688e3..5cc4508307 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -15,7 +15,6 @@ QUANTUM_SRC += \ $(QUANTUM_DIR)/quantum.c \ - $(QUANTUM_DIR)/send_string.c \ $(QUANTUM_DIR)/bitwise.c \ $(QUANTUM_DIR)/led.c \ $(QUANTUM_DIR)/action.c \ @@ -774,6 +773,13 @@ ifeq ($(strip $(MAGIC_ENABLE)), yes) OPT_DEFS += -DMAGIC_KEYCODE_ENABLE endif +SEND_STRING_ENABLE ?= yes +ifeq ($(strip $(SEND_STRING_ENABLE)), yes) + OPT_DEFS += -DSEND_STRING_ENABLE + COMMON_VPATH += $(QUANTUM_DIR)/send_string + SRC += $(QUANTUM_DIR)/send_string/send_string.c +endif + ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes) SRC += $(QUANTUM_DIR)/process_keycode/process_auto_shift.c OPT_DEFS += -DAUTO_SHIFT_ENABLE -- cgit v1.2.3 From ac5e6b6a3bfad12ab7d9786a18fcc90f8bf4caf7 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 3 Jul 2022 00:12:45 +1000 Subject: Tentative Teensy 3.5 support (#14420) * Tentative Teensy 3.5 support * Set firmware format to .hex for ARM Teensys * Got to "device descriptor failed" by comparing with Teensy 3.6 code * Drop down to 96MHz... * Bump back up to 120MHz --- builddefs/bootloader.mk | 4 ++-- builddefs/mcu_selection.mk | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) (limited to 'builddefs') diff --git a/builddefs/bootloader.mk b/builddefs/bootloader.mk index 3d4c03b01c..51e9b7d558 100644 --- a/builddefs/bootloader.mk +++ b/builddefs/bootloader.mk @@ -105,8 +105,8 @@ ifeq ($(strip $(BOOTLOADER)), halfkay) ifeq ($(strip $(MCU)), at90usb1286) BOOTLOADER_SIZE = 1024 endif - # Teensy LC, 3.x - ifneq (,$(filter $(MCU_ORIG), MKL26Z64 MK20DX128 MK20DX256 MK66FX1M0)) + # 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 diff --git a/builddefs/mcu_selection.mk b/builddefs/mcu_selection.mk index 135f663c14..7528aa6842 100644 --- a/builddefs/mcu_selection.mk +++ b/builddefs/mcu_selection.mk @@ -87,6 +87,33 @@ ifneq ($(findstring MK20DX256, $(MCU)),) BOARD ?= PJRC_TEENSY_3_1 endif +ifneq ($(findstring MK64FX512, $(MCU)),) + # Cortex version + MCU = cortex-m4 + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 7 + + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = KINETIS + MCU_SERIES = K60x + + # Linker script to use + # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= MK64FX512 + + # Startup code to use + # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= k60x + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= PJRC_TEENSY_3_5 +endif + ifneq ($(findstring MK66FX1M0, $(MCU)),) # Cortex version MCU = cortex-m4 -- cgit v1.2.3 From 0e5d67145a649480fd49a72712997feb6303a471 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Tue, 5 Jul 2022 08:58:35 +1000 Subject: Allow for `keymaps` array to be implemented in a file other than `$(KEYMAP_C)` (#17559) --- builddefs/build_keyboard.mk | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'builddefs') diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk index b5616a438f..fe95dcaf15 100644 --- a/builddefs/build_keyboard.mk +++ b/builddefs/build_keyboard.mk @@ -400,6 +400,12 @@ endif OPT_DEFS += -DKEYMAP_C=\"$(KEYMAP_C)\" +# If a keymap or userspace places their keymap array in another file instead, allow for it to be included +# !!NOTE!! -- For this to work, the source file cannot be part of $(SRC), so users should not add it via `SRC += ` +ifneq ($(strip $(INTROSPECTION_KEYMAP_C)),) +OPT_DEFS += -DINTROSPECTION_KEYMAP_C=\"$(strip $(INTROSPECTION_KEYMAP_C))\" +endif + # project specific files SRC += \ $(KEYBOARD_SRC) \ -- cgit v1.2.3 From d9bb189e25f14578ca74d6a3aa9f9a467f6f6595 Mon Sep 17 00:00:00 2001 From: Stefan Kerkmann Date: Thu, 7 Jul 2022 09:27:50 +0200 Subject: [Core] Update mpaland/printf to eyalroz/printf fork (#16163) mpaland printf implementation was abandoned in ~2019 and the fork by eyalroz is now regarded to be the goto replacement of it. So this commit incoporates the changes needed to use this fork in QMK. Note that pointer ptrdiff_t is always supported since commit 51c90f93a97fdaef895783ecbe24569be0db7cb8 --- builddefs/build_test.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'builddefs') diff --git a/builddefs/build_test.mk b/builddefs/build_test.mk index bd9b372c33..64db99fed9 100644 --- a/builddefs/build_test.mk +++ b/builddefs/build_test.mk @@ -38,11 +38,11 @@ CREATE_MAP := no VPATH += \ $(LIB_PATH)/googletest \ $(LIB_PATH)/googlemock \ - $(LIB_PATH)/printf + $(COMMON_VPATH) \ + $(TEST_PATH) all: elf -VPATH += $(TEST_PATH) $(COMMON_VPATH) PLATFORM:=TEST PLATFORM_KEY:=test BOOTLOADER_TYPE:=none @@ -64,6 +64,7 @@ include $(QUANTUM_PATH)/debounce/tests/rules.mk include $(QUANTUM_PATH)/encoder/tests/rules.mk include $(QUANTUM_PATH)/sequencer/tests/rules.mk include $(QUANTUM_PATH)/wear_leveling/tests/rules.mk +include $(QUANTUM_PATH)/logging/print.mk include $(PLATFORM_PATH)/test/rules.mk ifneq ($(filter $(FULL_TESTS),$(TEST)),) include $(BUILDDEFS_PATH)/build_full_test.mk @@ -71,7 +72,6 @@ endif $(TEST)_SRC += \ tests/test_common/main.c \ - $(LIB_PATH)/printf/printf.c \ $(QUANTUM_PATH)/logging/print.c $(TEST_OBJ)/$(TEST)_SRC := $($(TEST)_SRC) -- cgit v1.2.3 From 5db705d054e54a901f8968e3380e13c791991ab3 Mon Sep 17 00:00:00 2001 From: Daniel Kao Date: Tue, 12 Jul 2022 21:17:40 -0700 Subject: Cirque trackpad features: circular scroll, inertial cursor (#17482) --- builddefs/common_features.mk | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'builddefs') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 5cc4508307..01dbdc3330 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -149,10 +149,14 @@ ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes) else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), cirque_pinnacle_i2c) OPT_DEFS += -DSTM32_I2C -DHAL_USE_I2C=TRUE SRC += drivers/sensors/cirque_pinnacle.c + SRC += drivers/sensors/cirque_pinnacle_gestures.c + SRC += $(QUANTUM_DIR)/pointing_device_gestures.c QUANTUM_LIB_SRC += i2c_master.c else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), cirque_pinnacle_spi) OPT_DEFS += -DSTM32_SPI -DHAL_USE_SPI=TRUE SRC += drivers/sensors/cirque_pinnacle.c + SRC += drivers/sensors/cirque_pinnacle_gestures.c + SRC += $(QUANTUM_DIR)/pointing_device_gestures.c QUANTUM_LIB_SRC += spi_master.c else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), pimoroni_trackball) OPT_DEFS += -DSTM32_SPI -DHAL_USE_I2C=TRUE -- cgit v1.2.3 From 3c58f989295e17d03b66db9a154e02cde7336ece Mon Sep 17 00:00:00 2001 From: Stefan Kerkmann Date: Thu, 14 Jul 2022 11:50:00 +0200 Subject: [Core] PMW33XX drivers overhaul (#17613) * PMW33XX drivers overhaul This combines the PMW3389 and PM3360 drivers as they only differ in the firmware blobs and CPI get and set functions. The following changes have been made: * PMW3389 now gets the same multi-sensor feature that is already available on the PMW3360. * Introduced a shared pmw33xx_report_t struct is now directly readable via SPI transactions instead of individual byte-sized reads, saving multiple copies and bitshift operations. * pmw33(89/60)_get_report functions had unreachable branches in their motion detection logic these have been simplied as much as possible. * The fast firmware upload option has been removed as this becomes obsolete by the newly introduced polled waiting functions for ChibiOS polled waiting * PMW33(60/89)_SPI_LSBFIRST and PMW33(60/89)_SPI_MODE config options have been removed as they don't need to be configurable. * All PMW3389 and PMW3360 defines have been unified to a PMW33XX prefix to reduce code duplication and make the defines interchangeable * Adjust keyboards to PMW33XX naming scheme --- builddefs/common_features.mk | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'builddefs') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 01dbdc3330..d7a00ba944 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -161,11 +161,9 @@ ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes) else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), pimoroni_trackball) OPT_DEFS += -DSTM32_SPI -DHAL_USE_I2C=TRUE QUANTUM_LIB_SRC += i2c_master.c - else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), pmw3360) - OPT_DEFS += -DSTM32_SPI -DHAL_USE_SPI=TRUE - QUANTUM_LIB_SRC += spi_master.c - else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), pmw3389) + else ifneq ($(filter $(strip $(POINTING_DEVICE_DRIVER)),pmw3360 pmw3389),) OPT_DEFS += -DSTM32_SPI -DHAL_USE_SPI=TRUE + SRC += drivers/sensors/pmw33xx_common.c QUANTUM_LIB_SRC += spi_master.c endif endif -- cgit v1.2.3 From 12eb6444c67456d522c815120de8eed431ead2f8 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 19 Jul 2022 17:46:22 -0700 Subject: Add support for PAW3204 Optical Sensor (#17669) Co-authored-by: gompa Co-authored-by: Stefan Kerkmann --- 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 d7a00ba944..9ee51149ef 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -126,7 +126,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 pmw3360 pmw3389 pimoroni_trackball custom +VALID_POINTING_DEVICE_DRIVER_TYPES := adns5050 adns9800 analog_joystick cirque_pinnacle_i2c cirque_pinnacle_spi paw3204 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 ee17ffadea41241fc2b397e0bbea8903591dd21c Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 20 Jul 2022 09:32:00 -0700 Subject: Move Pointing Device code to a subdirectory (#17684) --- builddefs/common_features.mk | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'builddefs') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 9ee51149ef..8d31f694a7 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -133,8 +133,9 @@ ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes) else OPT_DEFS += -DPOINTING_DEVICE_ENABLE MOUSE_ENABLE := yes - SRC += $(QUANTUM_DIR)/pointing_device.c - SRC += $(QUANTUM_DIR)/pointing_device_drivers.c + VPATH += $(QUANTUM_DIR)/pointing_device + SRC += $(QUANTUM_DIR)/pointing_device/pointing_device.c + SRC += $(QUANTUM_DIR)/pointing_device/pointing_device_drivers.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:]')) @@ -150,13 +151,13 @@ ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes) OPT_DEFS += -DSTM32_I2C -DHAL_USE_I2C=TRUE SRC += drivers/sensors/cirque_pinnacle.c SRC += drivers/sensors/cirque_pinnacle_gestures.c - SRC += $(QUANTUM_DIR)/pointing_device_gestures.c + SRC += $(QUANTUM_DIR)/pointing_device/pointing_device_gestures.c QUANTUM_LIB_SRC += i2c_master.c else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), cirque_pinnacle_spi) OPT_DEFS += -DSTM32_SPI -DHAL_USE_SPI=TRUE SRC += drivers/sensors/cirque_pinnacle.c SRC += drivers/sensors/cirque_pinnacle_gestures.c - SRC += $(QUANTUM_DIR)/pointing_device_gestures.c + SRC += $(QUANTUM_DIR)/pointing_device/pointing_device_gestures.c QUANTUM_LIB_SRC += spi_master.c else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), pimoroni_trackball) OPT_DEFS += -DSTM32_SPI -DHAL_USE_I2C=TRUE -- cgit v1.2.3 From 543f54a483842474d2333581597dd4691bb77fac Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Thu, 4 Aug 2022 21:05:16 +1000 Subject: [Core] `STM32_USB_USE_OTG1` => `USB_ENDPOINTS_ARE_REORDERABLE` (#17647) --- 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 6573257c78..c8816639f8 100644 --- a/builddefs/common_rules.mk +++ b/builddefs/common_rules.mk @@ -371,6 +371,7 @@ show_path: dump_vars: ERROR_IF_EMPTY="" dump_vars: ERROR_IF_NONBOOL="" dump_vars: ERROR_IF_UNSET="" +dump_vars: CATASTROPHIC_ERROR="" dump_vars: @$(foreach V,$(sort $(.VARIABLES)),$(if $(filter-out environment% default automatic,$(origin $V)),$(info $V=$($V)))) -- cgit v1.2.3 From aed82bc6a07ab72a3bec7b4b578b6cb644a92d51 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 12 Aug 2022 18:04:02 -0700 Subject: Move Encoder+Encoder Map from generic features (#18018) --- builddefs/common_features.mk | 8 ++++++++ builddefs/generic_features.mk | 2 -- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'builddefs') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 8d31f694a7..1f1f945760 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -893,3 +893,11 @@ ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) QUANTUM_LIB_SRC += uart.c endif endif + +ifeq ($(strip $(ENCODER_ENABLE)), yes) + COMMON_VPATH += $(QUANTUM_DIR)/encoder.c + OPT_DEFS += -DENCODER_ENABLE + ifeq ($(strip $(ENCODER_MAP_ENABLE)), yes) + OPT_DEFS += -DENCODER_MAP_ENABLE + endif +endif diff --git a/builddefs/generic_features.mk b/builddefs/generic_features.mk index c3f1ec0f72..f195e9fd75 100644 --- a/builddefs/generic_features.mk +++ b/builddefs/generic_features.mk @@ -25,8 +25,6 @@ GENERIC_FEATURES = \ DIP_SWITCH \ DYNAMIC_KEYMAP \ DYNAMIC_MACRO \ - ENCODER \ - ENCODER_MAP \ GRAVE_ESC \ HAPTIC \ KEY_LOCK \ -- cgit v1.2.3 From 3d248450161b96fcfad5f04e3d278e7d48489321 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 12 Aug 2022 19:55:59 -0700 Subject: [Bug] Fix wrong varaible in encoder block (#18020) --- 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 1f1f945760..755a1735e0 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -895,7 +895,7 @@ ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) endif ifeq ($(strip $(ENCODER_ENABLE)), yes) - COMMON_VPATH += $(QUANTUM_DIR)/encoder.c + SRC += $(QUANTUM_DIR)/encoder.c OPT_DEFS += -DENCODER_ENABLE ifeq ($(strip $(ENCODER_MAP_ENABLE)), yes) OPT_DEFS += -DENCODER_MAP_ENABLE -- cgit v1.2.3 From a02aff9c77c15ca9e248f84b09a88386a8f4b0a6 Mon Sep 17 00:00:00 2001 From: lokher Date: Sat, 13 Aug 2022 21:39:06 +0800 Subject: Add led matrix support for CKLED2001 (#17643) --- 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 755a1735e0..a23b5e82b9 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -332,7 +332,7 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) endif LED_MATRIX_ENABLE ?= no -VALID_LED_MATRIX_TYPES := IS31FL3731 IS31FL3742A IS31FL3743A IS31FL3745 IS31FL3746A custom +VALID_LED_MATRIX_TYPES := IS31FL3731 IS31FL3742A IS31FL3743A IS31FL3745 IS31FL3746A CKLED2001 custom # TODO: IS31FL3733 IS31FL3737 IS31FL3741 ifeq ($(strip $(LED_MATRIX_ENABLE)), yes) @@ -388,6 +388,13 @@ endif QUANTUM_LIB_SRC += i2c_master.c endif + ifeq ($(strip $(LED_MATRIX_DRIVER)), CKLED2001) + OPT_DEFS += -DCKLED2001 -DSTM32_I2C -DHAL_USE_I2C=TRUE + COMMON_VPATH += $(DRIVER_PATH)/led + SRC += ckled2001-simple.c + QUANTUM_LIB_SRC += i2c_master.c + endif + endif RGB_MATRIX_ENABLE ?= no -- cgit v1.2.3 From 69fa2d83781104fafd3992c1cece2ee98e862a69 Mon Sep 17 00:00:00 2001 From: Albert Y <76888457+filterpaper@users.noreply.github.com> Date: Sat, 13 Aug 2022 21:57:07 +0800 Subject: [Core] Re-order user space rules inclusion (#17459) --- builddefs/build_keyboard.mk | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'builddefs') diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk index fe95dcaf15..5840378d9c 100644 --- a/builddefs/build_keyboard.mk +++ b/builddefs/build_keyboard.mk @@ -118,6 +118,15 @@ MAIN_KEYMAP_PATH_5 := $(KEYBOARD_PATH_5)/keymaps/$(KEYMAP) INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/info_rules.mk) include $(INFO_RULES_MK) +# Userspace setup and definitions +ifeq ("$(USER_NAME)","") + USER_NAME := $(KEYMAP) +endif +USER_PATH := users/$(USER_NAME) + +# Pull in user level rules.mk +-include $(USER_PATH)/rules.mk + # Check for keymap.json first, so we can regenerate keymap.c include $(BUILDDEFS_PATH)/build_json.mk @@ -356,14 +365,7 @@ generated-files: $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/def .INTERMEDIATE : generated-files -# Userspace setup and definitions -ifeq ("$(USER_NAME)","") - USER_NAME := $(KEYMAP) -endif -USER_PATH := users/$(USER_NAME) - -# Pull in user level rules.mk --include $(USER_PATH)/rules.mk +# Include user level config ifneq ("$(wildcard $(USER_PATH)/config.h)","") CONFIG_H += $(USER_PATH)/config.h endif -- cgit v1.2.3 From 2f87abd4ef8ef13d13ad10b80490bc74de7a5686 Mon Sep 17 00:00:00 2001 From: Joshua Diamond Date: Sat, 13 Aug 2022 17:13:15 -0400 Subject: Revert "[Core] Re-order user space rules inclusion (#17459)" (#18032) --- builddefs/build_keyboard.mk | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'builddefs') diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk index 5840378d9c..fe95dcaf15 100644 --- a/builddefs/build_keyboard.mk +++ b/builddefs/build_keyboard.mk @@ -118,15 +118,6 @@ MAIN_KEYMAP_PATH_5 := $(KEYBOARD_PATH_5)/keymaps/$(KEYMAP) INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/info_rules.mk) include $(INFO_RULES_MK) -# Userspace setup and definitions -ifeq ("$(USER_NAME)","") - USER_NAME := $(KEYMAP) -endif -USER_PATH := users/$(USER_NAME) - -# Pull in user level rules.mk --include $(USER_PATH)/rules.mk - # Check for keymap.json first, so we can regenerate keymap.c include $(BUILDDEFS_PATH)/build_json.mk @@ -365,7 +356,14 @@ generated-files: $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/def .INTERMEDIATE : generated-files -# Include user level config +# Userspace setup and definitions +ifeq ("$(USER_NAME)","") + USER_NAME := $(KEYMAP) +endif +USER_PATH := users/$(USER_NAME) + +# Pull in user level rules.mk +-include $(USER_PATH)/rules.mk ifneq ("$(wildcard $(USER_PATH)/config.h)","") CONFIG_H += $(USER_PATH)/config.h endif -- cgit v1.2.3 From fce99f38757d7ddbcaada0f5f0157ca24b6162b7 Mon Sep 17 00:00:00 2001 From: Mega Mind <68985133+megamind4089@users.noreply.github.com> Date: Sun, 14 Aug 2022 19:27:26 +0800 Subject: [Controller] Added board config for custom controller STeMCell (#16287) Co-authored-by: Mariappan Ramasamy <947300+Mariappan@users.noreply.github.com> Co-authored-by: Mariappan Ramasamy Co-authored-by: Sadek Baroudi --- 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 a23b5e82b9..3d416773f7 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -212,7 +212,7 @@ 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)),) + ifneq ($(filter STM32F3xx_% STM32F1xx_% STM32F4xx_% %_STM32F401xC %_STM32F401xE %_STM32F405xG %_STM32F411xE %_STM32F072xB %_STM32F042x6 %_GD32VF103xB %_GD32VF103x8, $(MCU_SERIES)_$(MCU_LDSCRIPT)),) # Emulated EEPROM OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_STM32_FLASH_EMULATED COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/flash -- cgit v1.2.3 From 4da34828720d6daa9fd45d811129370cf11ba874 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sun, 14 Aug 2022 09:18:59 -0700 Subject: Fix Emulated EEPROM issue with F466 (#18039) --- 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 3d416773f7..a23b5e82b9 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -212,7 +212,7 @@ else ifeq ($(PLATFORM),AVR) # Automatically provided by avr-libc, nothing required else ifeq ($(PLATFORM),CHIBIOS) - ifneq ($(filter STM32F3xx_% STM32F1xx_% STM32F4xx_% %_STM32F401xC %_STM32F401xE %_STM32F405xG %_STM32F411xE %_STM32F072xB %_STM32F042x6 %_GD32VF103xB %_GD32VF103x8, $(MCU_SERIES)_$(MCU_LDSCRIPT)),) + ifneq ($(filter STM32F3xx_% STM32F1xx_% %_STM32F401xC %_STM32F401xE %_STM32F405xG %_STM32F411xE %_STM32F072xB %_STM32F042x6 %_GD32VF103xB %_GD32VF103x8, $(MCU_SERIES)_$(MCU_LDSCRIPT)),) # Emulated EEPROM OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_STM32_FLASH_EMULATED COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/flash -- cgit v1.2.3 From 0fcebdcdf1b193268c0e8979faa583fa6253a29c Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 19 Aug 2022 00:52:50 +0100 Subject: Swap F4x1 default board files away from blackpill (#17522) --- builddefs/mcu_selection.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'builddefs') diff --git a/builddefs/mcu_selection.mk b/builddefs/mcu_selection.mk index 7528aa6842..597591a455 100644 --- a/builddefs/mcu_selection.mk +++ b/builddefs/mcu_selection.mk @@ -359,7 +359,7 @@ ifneq ($(findstring STM32F401, $(MCU)),) # Board: it should exist either in /os/hal/boards/, # /boards/, or drivers/boards/ - BOARD ?= BLACKPILL_STM32_F401 + BOARD ?= GENERIC_STM32_F401XC USE_FPU ?= yes @@ -475,7 +475,7 @@ ifneq ($(findstring STM32F411, $(MCU)),) # Board: it should exist either in /os/hal/boards/, # /boards/, or drivers/boards/ - BOARD ?= BLACKPILL_STM32_F411 + BOARD ?= GENERIC_STM32_F411XE USE_FPU ?= yes -- cgit v1.2.3 From 43fd6471305d3ebd9e6cb537d4d39c71e480922e Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 25 Aug 2022 12:17:41 +0100 Subject: Add eeprom defaults for tinyuf2 bootloader (#18042) --- builddefs/bootloader.mk | 1 + builddefs/mcu_selection.mk | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'builddefs') diff --git a/builddefs/bootloader.mk b/builddefs/bootloader.mk index 51e9b7d558..9f55536423 100644 --- a/builddefs/bootloader.mk +++ b/builddefs/bootloader.mk @@ -199,6 +199,7 @@ endif ifeq ($(strip $(BOOTLOADER)), tinyuf2) OPT_DEFS += -DBOOTLOADER_TINYUF2 BOOTLOADER_TYPE = tinyuf2 + FIRMWARE_FORMAT = uf2 endif ifeq ($(strip $(BOOTLOADER)), rp2040) OPT_DEFS += -DBOOTLOADER_RP2040 diff --git a/builddefs/mcu_selection.mk b/builddefs/mcu_selection.mk index 597591a455..0ea9630d59 100644 --- a/builddefs/mcu_selection.mk +++ b/builddefs/mcu_selection.mk @@ -348,7 +348,8 @@ ifneq ($(findstring STM32F401, $(MCU)),) # or /ld/ ifeq ($(strip $(BOOTLOADER)), tinyuf2) MCU_LDSCRIPT ?= STM32F401xC_tinyuf2 - FIRMWARE_FORMAT ?= uf2 + EEPROM_DRIVER ?= wear_leveling + WEAR_LEVELING_DRIVER ?= legacy else MCU_LDSCRIPT ?= STM32F401xC endif @@ -464,7 +465,8 @@ ifneq ($(findstring STM32F411, $(MCU)),) # or /ld/ ifeq ($(strip $(BOOTLOADER)), tinyuf2) MCU_LDSCRIPT ?= STM32F411xE_tinyuf2 - FIRMWARE_FORMAT ?= uf2 + EEPROM_DRIVER ?= wear_leveling + WEAR_LEVELING_DRIVER ?= legacy else MCU_LDSCRIPT ?= STM32F411xE endif -- cgit v1.2.3