summaryrefslogtreecommitdiffstats
path: root/builddefs
diff options
context:
space:
mode:
authorlokher <lokher@gmail.com>2023-04-26 16:32:15 +0800
committerlokher <lokher@gmail.com>2023-04-26 16:32:15 +0800
commite4f4ceaf3f2e3d25fb282273a81f9b58790fc427 (patch)
treec0a257eab0ffe5238fdf2c04882e8ee1fe8fc46e /builddefs
parent103badc87cb50db1ff3851c84331e86ba78fb681 (diff)
merge upstream 713427c
Diffstat (limited to 'builddefs')
-rw-r--r--builddefs/build_full_test.mk2
-rw-r--r--builddefs/build_keyboard.mk53
-rw-r--r--builddefs/build_test.mk1
-rw-r--r--builddefs/common_features.mk16
-rw-r--r--builddefs/common_rules.mk4
-rw-r--r--builddefs/converters.mk24
-rw-r--r--builddefs/generic_features.mk1
-rw-r--r--builddefs/mcu_selection.mk911
-rw-r--r--builddefs/message.mk7
-rw-r--r--builddefs/show_options.mk3
-rw-r--r--builddefs/testlist.mk1
11 files changed, 58 insertions, 965 deletions
diff --git a/builddefs/build_full_test.mk b/builddefs/build_full_test.mk
index 35f0a05b99..964ba773d4 100644
--- a/builddefs/build_full_test.mk
+++ b/builddefs/build_full_test.mk
@@ -24,6 +24,8 @@ $(TEST)_SRC := \
tests/test_common/matrix.c \
tests/test_common/test_driver.cpp \
tests/test_common/keyboard_report_util.cpp \
+ tests/test_common/keycode_util.cpp \
+ tests/test_common/keycode_table.cpp \
tests/test_common/test_fixture.cpp \
tests/test_common/test_keymap_key.cpp \
tests/test_common/test_logger.cpp \
diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk
index 499e6ffc69..7a5412ccd2 100644
--- a/builddefs/build_keyboard.mk
+++ b/builddefs/build_keyboard.mk
@@ -46,11 +46,12 @@ ifdef SKIP_VERSION
endif
# Generate the version.h file
+VERSION_H_FLAGS :=
ifdef SKIP_VERSION
-VERSION_H_FLAGS := --skip-all
+VERSION_H_FLAGS += --skip-all
endif
ifdef SKIP_GIT
-VERSION_H_FLAGS := --skip-git
+VERSION_H_FLAGS += --skip-git
endif
# Generate the board's version.h file.
@@ -182,7 +183,14 @@ endif
include $(BUILDDEFS_PATH)/converters.mk
-include $(BUILDDEFS_PATH)/mcu_selection.mk
+MCU_ORIG := $(MCU)
+include $(wildcard $(PLATFORM_PATH)/*/mcu_selection.mk)
+
+# PLATFORM_KEY should be detected in info.json via key 'processor' (or rules.mk 'MCU')
+ifeq ($(PLATFORM_KEY),)
+ $(call CATASTROPHIC_ERROR,Platform not defined)
+endif
+PLATFORM=$(shell echo $(PLATFORM_KEY) | tr '[:lower:]' '[:upper:]')
# Find all the C source files to be compiled in subfolders.
KEYBOARD_SRC :=
@@ -257,24 +265,6 @@ ifneq ("$(wildcard $(KEYBOARD_PATH_5)/$(KEYBOARD_FOLDER_5).h)","")
FOUND_KEYBOARD_H = $(KEYBOARD_FOLDER_5).h
endif
-# Determine and set parameters based on the keyboard's processor family.
-# We can assume a ChibiOS target When MCU_FAMILY is defined since it's
-# not used for LUFA
-ifdef MCU_FAMILY
- PLATFORM=CHIBIOS
- PLATFORM_KEY=chibios
- FIRMWARE_FORMAT?=bin
- OPT_DEFS += -DMCU_$(MCU_FAMILY)
-else ifdef ARM_ATSAM
- PLATFORM=ARM_ATSAM
- PLATFORM_KEY=arm_atsam
- FIRMWARE_FORMAT=bin
-else
- PLATFORM=AVR
- PLATFORM_KEY=avr
- FIRMWARE_FORMAT?=hex
-endif
-
# Find all of the config.h files and add them to our CONFIG_H define.
CONFIG_H :=
ifneq ("$(wildcard $(KEYBOARD_PATH_5)/config.h)","")
@@ -433,13 +423,6 @@ SRC += $(TMK_COMMON_SRC)
OPT_DEFS += $(TMK_COMMON_DEFS)
EXTRALDFLAGS += $(TMK_COMMON_LDFLAGS)
-SKIP_COMPILE := no
-ifneq ($(REQUIRE_PLATFORM_KEY),)
- ifneq ($(REQUIRE_PLATFORM_KEY),$(PLATFORM_KEY))
- SKIP_COMPILE := yes
- endif
-endif
-
-include $(PLATFORM_PATH)/$(PLATFORM_KEY)/bootloader.mk
include $(PLATFORM_PATH)/$(PLATFORM_KEY)/platform.mk
-include $(PLATFORM_PATH)/$(PLATFORM_KEY)/flash.mk
@@ -479,28 +462,28 @@ $(KEYBOARD_OUTPUT)_INC := $(PROJECT_INC)
$(KEYBOARD_OUTPUT)_CONFIG := $(PROJECT_CONFIG)
# Default target.
-ifeq ($(SKIP_COMPILE),no)
all: build check-size
-else
-all:
- echo "skipped" >&2
-endif
build: elf cpfirmware
check-size: build
check-md5: build
objs-size: build
+ifneq ($(strip $(TOP_SYMBOLS)),)
ifeq ($(strip $(TOP_SYMBOLS)),yes)
+NUM_TOP_SYMBOLS := 10
+else
+NUM_TOP_SYMBOLS := $(strip $(TOP_SYMBOLS))
+endif
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'
+ $(NM) -Crtd --size-sort $(BUILD_DIR)/$(TARGET).elf | grep -i ' [t] ' | head -n$(NUM_TOP_SYMBOLS) | 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'
+ $(NM) -Crtd --size-sort $(BUILD_DIR)/$(TARGET).elf | grep -i ' [dbv] ' | head -n$(NUM_TOP_SYMBOLS) | 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
diff --git a/builddefs/build_test.mk b/builddefs/build_test.mk
index 7c8fdd20e5..4230598373 100644
--- a/builddefs/build_test.mk
+++ b/builddefs/build_test.mk
@@ -62,6 +62,7 @@ include $(PLATFORM_PATH)/common.mk
include $(TMK_PATH)/protocol.mk
include $(QUANTUM_PATH)/debounce/tests/rules.mk
include $(QUANTUM_PATH)/encoder/tests/rules.mk
+include $(QUANTUM_PATH)/os_detection/tests/rules.mk
include $(QUANTUM_PATH)/sequencer/tests/rules.mk
include $(QUANTUM_PATH)/wear_leveling/tests/rules.mk
include $(QUANTUM_PATH)/logging/print.mk
diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk
index be8b54db08..0795a5c547 100644
--- a/builddefs/common_features.mk
+++ b/builddefs/common_features.mk
@@ -84,6 +84,13 @@ endif
ifeq ($(strip $(MIDI_ENABLE)), yes)
OPT_DEFS += -DMIDI_ENABLE
MUSIC_ENABLE = yes
+ COMMON_VPATH += $(QUANTUM_PATH)/midi
+ SRC += $(QUANTUM_DIR)/midi/midi.c
+ SRC += $(QUANTUM_DIR)/midi/midi_device.c
+ SRC += $(QUANTUM_DIR)/midi/qmk_midi.c
+ SRC += $(QUANTUM_DIR)/midi/sysex_tools.c
+ SRC += $(QUANTUM_DIR)/midi/bytequeue/bytequeue.c
+ SRC += $(QUANTUM_DIR)/midi/bytequeue/interrupt_setting.c
SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c
endif
@@ -619,6 +626,7 @@ ifeq ($(strip $(VIA_ENABLE)), yes)
DYNAMIC_KEYMAP_ENABLE := yes
RAW_ENABLE := yes
BOOTMAGIC_ENABLE := yes
+ TRI_LAYER_ENABLE := yes
SRC += $(QUANTUM_DIR)/via.c
OPT_DEFS += -DVIA_ENABLE
endif
@@ -913,3 +921,11 @@ ifeq ($(strip $(ENCODER_ENABLE)), yes)
OPT_DEFS += -DENCODER_MAP_ENABLE
endif
endif
+
+ifeq ($(strip $(OS_DETECTION_ENABLE)), yes)
+ SRC += $(QUANTUM_DIR)/os_detection.c
+ OPT_DEFS += -DOS_DETECTION_ENABLE
+ ifeq ($(strip $(OS_DETECTION_DEBUG_ENABLE)), yes)
+ OPT_DEFS += -DOS_DETECTION_DEBUG_ENABLE
+ endif
+endif
diff --git a/builddefs/common_rules.mk b/builddefs/common_rules.mk
index 5d100fec59..e993cc350e 100644
--- a/builddefs/common_rules.mk
+++ b/builddefs/common_rules.mk
@@ -218,8 +218,8 @@ gccversion :
@$(SILENT) || printf "$(MSG_FLASH) $@" | $(AWK_CMD)
@$(BUILD_CMD)
-%.uf2: %.hex
- $(eval CMD=$(UF2CONV) $(BUILD_DIR)/$(TARGET).hex --output $(BUILD_DIR)/$(TARGET).uf2 --convert --family $(UF2_FAMILY) >/dev/null 2>&1)
+%.uf2: %.elf
+ $(eval CMD=$(HEX) $< $(BUILD_DIR)/$(TARGET).tmp && $(UF2CONV) $(BUILD_DIR)/$(TARGET).tmp --output $@ --convert --family $(UF2_FAMILY) >/dev/null 2>&1)
#@$(SILENT) || printf "$(MSG_EXECUTING) '$(CMD)':\n"
@$(SILENT) || printf "$(MSG_UF2) $@" | $(AWK_CMD)
@$(BUILD_CMD)
diff --git a/builddefs/converters.mk b/builddefs/converters.mk
index c7e499226c..17b1c3b6ee 100644
--- a/builddefs/converters.mk
+++ b/builddefs/converters.mk
@@ -1,30 +1,25 @@
# Note for new boards -- CTPC and CONVERT_TO_PROTON_C are deprecated terms
# and should not be replicated for new boards. These will be removed from
# documentation as well as existing keymaps in due course.
-ifeq ($(strip $(CTPC)), yes)
- CONVERT_TO_PROTON_C=yes
-endif
-ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes)
- CONVERT_TO=proton_c
-
-cpfirmware: ctpc_warning
-.INTERMEDIATE: ctpc_warning
-ctpc_warning: elf
- $(info @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@)
- $(info The `CONVERT_TO_PROTON_C` and `CTPC` options are soon to be deprecated.)
- $(info Boards should be changed to use `CONVERT_TO=proton_c` instead.)
- $(info @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@)
+ifneq ($(findstring yes, $(CTPC)$(CONVERT_TO_PROTON_C)),)
+$(call CATASTROPHIC_ERROR,The `CONVERT_TO_PROTON_C` and `CTPC` options are now deprecated. `CONVERT_TO=proton_c` should be used instead.)
endif
# TODO: opt in rather than assume everything uses a pro micro
PIN_COMPATIBLE ?= promicro
ifneq ($(CONVERT_TO),)
+ # stash so we can overwrite env provided vars if needed
+ ACTIVE_CONVERTER=$(CONVERT_TO)
+
# glob to search each platfrorm and/or check for valid converter
CONVERTER := $(wildcard $(PLATFORM_PATH)/*/converters/$(PIN_COMPATIBLE)_to_$(CONVERT_TO)/)
ifeq ($(CONVERTER),)
$(call CATASTROPHIC_ERROR,Converting from '$(PIN_COMPATIBLE)' to '$(CONVERT_TO)' not possible!)
endif
+ -include $(CONVERTER)/pre_converter.mk
+
+ PLATFORM_KEY = $(shell echo $(CONVERTER) | cut -d "/" -f2)
TARGET := $(TARGET)_$(CONVERT_TO)
# Configure any defaults
@@ -33,6 +28,9 @@ ifneq ($(CONVERT_TO),)
OPT_DEFS += -DCONVERTER_ENABLED
VPATH += $(CONVERTER)
+ # Configure for "alias" - worst case it produces an idential define
+ OPT_DEFS += -DCONVERT_TO_$(strip $(shell echo $(ACTIVE_CONVERTER) | tr '[:lower:]' '[:upper:]'))
+
# Finally run any converter specific logic
include $(CONVERTER)/converter.mk
endif
diff --git a/builddefs/generic_features.mk b/builddefs/generic_features.mk
index 0d897bc1c8..5a1ef5c6f0 100644
--- a/builddefs/generic_features.mk
+++ b/builddefs/generic_features.mk
@@ -39,6 +39,7 @@ GENERIC_FEATURES = \
VELOCIKEY \
WPM \
DYNAMIC_TAPPING_TERM \
+ TRI_LAYER
define HANDLE_GENERIC_FEATURE
# $$(info "Processing: $1_ENABLE $2.c")
diff --git a/builddefs/mcu_selection.mk b/builddefs/mcu_selection.mk
deleted file mode 100644
index de919bd263..0000000000
--- a/builddefs/mcu_selection.mk
+++ /dev/null
@@ -1,911 +0,0 @@
-MCU_ORIG := $(MCU)
-
-ifneq ($(findstring MKL26Z64, $(MCU)),)
- # Cortex version
- MCU = cortex-m0plus
-
- # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
- ARMV = 6
-
- ## chip/board settings
- # - the next two should match the directories in
- # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
- # OR
- # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
- MCU_FAMILY = KINETIS
- MCU_SERIES = KL2x
-
- # Linker script to use
- # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
- # or <keyboard_dir>/ld/
- MCU_LDSCRIPT ?= MKL26Z64
-
- # Startup code to use
- # - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
- MCU_STARTUP ?= kl2x
-
- # Board: it should exist either in <chibios>/os/hal/boards/,
- # <keyboard_dir>/boards/, or drivers/boards/
- BOARD ?= PJRC_TEENSY_LC
-endif
-
-ifneq ($(findstring MK20DX128, $(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
- # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
- # OR
- # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
- MCU_FAMILY = KINETIS
- MCU_SERIES = K20x
-
- # Linker script to use
- # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
- # or <keyboard_dir>/ld/
- MCU_LDSCRIPT ?= MK20DX128
-
- # Startup code to use
- # - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
- MCU_STARTUP ?= k20x5
-
- # Board: it should exist either in <chibios>/os/hal/boards/,
- # <keyboard_dir>/boards/, or drivers/boards/
- BOARD ?= PJRC_TEENSY_3
-endif
-
-ifneq ($(findstring MK20DX256, $(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
- # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
- # OR
- # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
- MCU_FAMILY = KINETIS
- MCU_SERIES = K20x
-
- # Linker script to use
- # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
- # or <keyboard_dir>/ld/
- MCU_LDSCRIPT ?= MK20DX256
-
- # Startup code to use
- # - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
- MCU_STARTUP ?= k20x7
-
- # Board: it should exist either in <chibios>/os/hal/boards/,
- # <keyboard_dir>/boards/, or drivers/boards/
- 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
- # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
- MCU_FAMILY = KINETIS
- MCU_SERIES = K60x
-
- # Linker script to use
- # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
- # or <keyboard_dir>/ld/
- MCU_LDSCRIPT ?= MK64FX512
-
- # Startup code to use
- # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
- MCU_STARTUP ?= k60x
-
- # Board: it should exist either in <chibios>/os/hal/boards/,
- # <keyboard_dir>/boards/, or drivers/boards/
- BOARD ?= PJRC_TEENSY_3_5
-endif
-
-ifneq ($(findstring MK66FX1M0, $(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
- # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
- # OR
- # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
- MCU_FAMILY = KINETIS
- MCU_SERIES = MK66F18
-
- # Linker script to use
- # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
- # or <keyboard_dir>/ld/
- MCU_LDSCRIPT ?= MK66FX1M0
-
- # Startup code to use
- # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
- MCU_STARTUP ?= MK66F18
-
- # Board: it should exist either in <chibios>/os/hal/boards/,
- # <keyboard_dir>/boards/, or drivers/boards/
- 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
- # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
- # OR
- # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
- MCU_FAMILY = RP
- MCU_SERIES = RP2040
-
- # Linker script to use
- # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
- # or <keyboard_dir>/ld/
- STARTUPLD_CONTRIB = $(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/compilers/GCC/ld
- MCU_LDSCRIPT ?= RP2040_FLASH_TIMECRIT
- LDFLAGS += -L $(STARTUPLD_CONTRIB)
-
- # Startup code to use
- # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
- MCU_STARTUP ?= rp2040
-
- # Board: it should exist either in <chibios>/os/hal/boards/,
- # <keyboard_dir>/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
-
- # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
- ARMV = 6
-
- ## chip/board settings
- # - the next two should match the directories in
- # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
- # OR
- # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
- MCU_FAMILY = STM32
- MCU_SERIES = STM32F0xx
-
- # Linker script to use
- # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
- # or <keyboard_dir>/ld/
- MCU_LDSCRIPT ?= STM32F042x6
-
- # Startup code to use
- # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
- MCU_STARTUP ?= stm32f0xx
-
- # Board: it should exist either in <chibios>/os/hal/boards/,
- # <keyboard_dir>/boards/, or drivers/boards/
- BOARD ?= GENERIC_STM32_F042X6
-
- USE_FPU ?= no
-
- # UF2 settings
- UF2_FAMILY ?= STM32F0
-
- # Stack sizes: Since this chip has limited RAM capacity, the stack area needs to be reduced.
- # This ensures that the EEPROM page buffer fits into RAM
- USE_PROCESS_STACKSIZE = 0x600
- USE_EXCEPTIONS_STACKSIZE = 0x300
-
- # Bootloader address for STM32 DFU
- STM32_BOOTLOADER_ADDRESS ?= 0x1FFFC400
-endif
-
-ifneq ($(findstring STM32F072, $(MCU)),)
- # Cortex version
- MCU = cortex-m0
-
- # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
- ARMV = 6
-
- ## chip/board settings
- # - the next two should match the directories in
- # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
- # OR
- # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
- MCU_FAMILY = STM32
- MCU_SERIES = STM32F0xx
-
- # Linker script to use
- # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
- # or <keyboard_dir>/ld/
- MCU_LDSCRIPT ?= STM32F072xB
-
- # Startup code to use
- # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
- MCU_STARTUP ?= stm32f0xx
-
- # Board: it should exist either in <chibios>/os/hal/boards/,
- # <keyboard_dir>/boards/, or drivers/boards/
- BOARD ?= GENERIC_STM32_F072XB
-
- USE_FPU ?= no
-
- # UF2 settings
- UF2_FAMILY ?= STM32F0
-
- # Bootloader address for STM32 DFU
- STM32_BOOTLOADER_ADDRESS ?= 0x1FFFC800
-endif
-
-ifneq ($(findstring STM32F103, $(MCU)),)
- # Cortex version
- MCU = cortex-m3
-
- # 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
- # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
- # OR
- # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
- MCU_FAMILY = STM32
- MCU_SERIES = STM32F1xx
-
- # Linker script to use
- # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
- # or <keyboard_dir>/ld/
- MCU_LDSCRIPT ?= STM32F103x8
-
- # Startup code to use
- # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
- MCU_STARTUP ?= stm32f1xx
-
- # Board: it should exist either in <chibios>/os/hal/boards/,
- # <keyboard_dir>/boards/, or drivers/boards/
- BOARD ?= GENERIC_STM32_F103
-
- USE_FPU ?= no
-
- # UF2 settings
- UF2_FAMILY ?= STM32F1
-endif
-
-ifneq ($(findstring STM32F303, $(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
- # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
- # OR
- # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
- MCU_FAMILY = STM32
- MCU_SERIES = STM32F3xx
-
- # Linker script to use
- # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
- # or <keyboard_dir>/ld/
- MCU_LDSCRIPT ?= STM32F303xC
-
- # Startup code to use
- # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
- MCU_STARTUP ?= stm32f3xx
-
- # Board: it should exist either in <chibios>/os/hal/boards/,
- # <keyboard_dir>/boards/, or drivers/boards/
- BOARD ?= GENERIC_STM32_F303XC
-
- USE_FPU ?= yes
-
- # UF2 settings
- UF2_FAMILY ?= STM32F3
-
- # Bootloader address for STM32 DFU
- STM32_BOOTLOADER_ADDRESS ?= 0x1FFFD800
-endif
-
-ifneq ($(findstring STM32F401, $(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
- # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
- # OR
- # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
- MCU_FAMILY = STM32
- MCU_SERIES = STM32F4xx
-
- # Linker script to use
- # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
- # or <keyboard_dir>/ld/
- ifeq ($(strip $(BOOTLOADER)), tinyuf2)
- MCU_LDSCRIPT ?= STM32F401xC_tinyuf2
- else
- MCU_LDSCRIPT ?= STM32F401xC
- endif
-
- # Startup code to use
- # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
- MCU_STARTUP ?= stm32f4xx
-
- # Board: it should exist either in <chibios>/os/hal/boards/,
- # <keyboard_dir>/boards/, or drivers/boards/
- BOARD ?= GENERIC_STM32_F401XC
-
- USE_FPU ?= yes
-
- # UF2 settings
- UF2_FAMILY ?= STM32F4
-
- # Bootloader address for STM32 DFU
- STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
-endif
-
-ifneq ($(findstring STM32F405, $(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
- # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
- # OR
- # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
- MCU_FAMILY = STM32
- MCU_SERIES = STM32F4xx
-
- # Linker script to use
- # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
- # or <keyboard_dir>/ld/
- MCU_LDSCRIPT ?= STM32F405xG
-
- # Startup code to use
- # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
- MCU_STARTUP ?= stm32f4xx
-
- # Board: it should exist either in <chibios>/os/hal/boards/,
- # <keyboard_dir>/boards/, or drivers/boards/
- BOARD ?= GENERIC_STM32_F405XG
-
- USE_FPU ?= yes
-
- # UF2 settings
- UF2_FAMILY ?= STM32F4
-
- # Bootloader address for STM32 DFU
- STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
-endif
-
-ifneq ($(findstring STM32F407, $(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
- # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
- # OR
- # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
- MCU_FAMILY = STM32
- MCU_SERIES = STM32F4xx
-
- # Linker script to use
- # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
- # or <keyboard_dir>/ld/
- MCU_LDSCRIPT ?= STM32F407xE
-
- # Startup code to use
- # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
- MCU_STARTUP ?= stm32f4xx
-
- # Board: it should exist either in <chibios>/os/hal/boards/,
- # <keyboard_dir>/boards/, or drivers/boards/
- BOARD ?= GENERIC_STM32_F407XE
-
- USE_FPU ?= yes
-
- # UF2 settings
- UF2_FAMILY ?= STM32F4
-
- # Bootloader address for STM32 DFU
- STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
-endif
-
-ifneq ($(findstring STM32F411, $(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
- # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
- # OR
- # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
- MCU_FAMILY = STM32
- MCU_SERIES = STM32F4xx
-
- # Linker script to use
- # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
- # or <keyboard_dir>/ld/
- ifeq ($(strip $(BOOTLOADER)), tinyuf2)
- MCU_LDSCRIPT ?= STM32F411xE_tinyuf2
- else
- MCU_LDSCRIPT ?= STM32F411xE
- endif
-
- # Startup code to use
- # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
- MCU_STARTUP ?= stm32f4xx
-
- # Board: it should exist either in <chibios>/os/hal/boards/,
- # <keyboard_dir>/boards/, or drivers/boards/
- BOARD ?= GENERIC_STM32_F411XE
-
- USE_FPU ?= yes
-
- # UF2 settings
- UF2_FAMILY ?= STM32F4
-
- # Bootloader address for STM32 DFU
- STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
-endif
-
-ifneq ($(findstring STM32F446, $(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
- # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
- # OR
- # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
- MCU_FAMILY = STM32
- MCU_SERIES = STM32F4xx
-
- # Linker script to use
- # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
- # or <keyboard_dir>/ld/
- MCU_LDSCRIPT ?= STM32F446xE
-
- # Startup code to use
- # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
- MCU_STARTUP ?= stm32f4xx
-
- # Board: it should exist either in <chibios>/os/hal/boards/,
- # <keyboard_dir>/boards/, or drivers/boards/
- BOARD ?= GENERIC_STM32_F446XE
-
- USE_FPU ?= yes
-
- # Bootloader address for STM32 DFU
- STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
-
- # Default as no chibios efl config
- EEPROM_DRIVER ?= transient
-endif
-
-ifneq ($(findstring STM32G431, $(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
- # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
- # OR
- # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
- MCU_FAMILY = STM32
- MCU_SERIES = STM32G4xx
-
- # Linker script to use
- # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
- # or <keyboard_dir>/ld/
- MCU_LDSCRIPT ?= STM32G431xB
-
- # Startup code to use
- # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
- MCU_STARTUP ?= stm32g4xx
-
- # Board: it should exist either in <chibios>/os/hal/boards/,
- # <keyboard_dir>/boards/, or drivers/boards/
- BOARD ?= GENERIC_STM32_G431XB
-
- USE_FPU ?= yes
-
- # UF2 settings
- UF2_FAMILY ?= STM32G4
-
- # Bootloader address for STM32 DFU
- STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
-endif
-
-ifneq ($(findstring STM32G474, $(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
- # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
- # OR
- # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
- MCU_FAMILY = STM32
- MCU_SERIES = STM32G4xx
-
- # Linker script to use
- # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
- # or <keyboard_dir>/ld/
- MCU_LDSCRIPT ?= STM32G474xE
-
- # Startup code to use
- # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
- MCU_STARTUP ?= stm32g4xx
-
- # Board: it should exist either in <chibios>/os/hal/boards/,
- # <keyboard_dir>/boards/, or drivers/boards/
- BOARD ?= GENERIC_STM32_G474XE
-
- USE_FPU ?= yes
-
- # UF2 settings
- UF2_FAMILY ?= STM32G4
-
- # Bootloader address for STM32 DFU
- STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
-endif
-
-ifneq (,$(filter $(MCU),STM32L432 STM32L442))
- # 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
- # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
- # OR
- # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
- MCU_FAMILY = STM32
- MCU_SERIES = STM32L4xx
-
- # Linker script to use
- # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
- # or <keyboard_dir>/ld/
- MCU_LDSCRIPT ?= STM32L432xC
-
- # Startup code to use
- # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
- MCU_STARTUP ?= stm32l4xx
-
- # Board: it should exist either in <chibios>/os/hal/boards/,
- # <keyboard_dir>/boards/, or drivers/boards/
- BOARD ?= GENERIC_STM32_L432XC
-
- PLATFORM_NAME ?= platform_l432
-
- USE_FPU ?= yes
-
- # UF2 settings
- UF2_FAMILY ?= STM32L4
-
- # Bootloader address for STM32 DFU
- STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
-endif
-
-ifneq (,$(filter $(MCU),STM32L433 STM32L443))
- # 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
- # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
- # OR
- # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
- MCU_FAMILY = STM32
- MCU_SERIES = STM32L4xx
-
- # Linker script to use
- # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
- # or <keyboard_dir>/ld/
- MCU_LDSCRIPT ?= STM32L432xC
-
- # Startup code to use
- # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
- MCU_STARTUP ?= stm32l4xx
-
- # Board: it should exist either in <chibios>/os/hal/boards/,
- # <keyboard_dir>/boards/, or drivers/boards/
- BOARD ?= GENERIC_STM32_L433XC
-
- PLATFORM_NAME ?= platform_l432
-
- USE_FPU ?= yes
-
- # UF2 settings
- UF2_FAMILY ?= STM32L4
-
- # Bootloader address for STM32 DFU
- STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
-endif
-
-ifneq (,$(filter $(MCU),STM32L412 STM32L422))
- # 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
- # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
- # OR
- # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
- MCU_FAMILY = STM32
- MCU_SERIES = STM32L4xx
-
- # Linker script to use
- # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
- # or <keyboard_dir>/ld/
- MCU_LDSCRIPT ?= STM32L412xB
-
- # Startup code to use
- # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
- MCU_STARTUP ?= stm32l4xx
-
- # Board: it should exist either in <chibios>/os/hal/boards/,
- # <keyboard_dir>/boards/, or drivers/boards/
- BOARD ?= GENERIC_STM32_L412XB
-
- PLATFORM_NAME ?= platform_l412_l422
-
- USE_FPU ?= yes
-
- # UF2 settings
- UF2_FAMILY ?= STM32L4
-
- # Bootloader address for STM32 DFU
- STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
-endif
-
-ifneq ($(findstring WB32F3G71, $(MCU)),)
- # Cortex version
- MCU = cortex-m3
-
- # 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
- # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
- # OR
- # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
- MCU_FAMILY = WB32
- MCU_SERIES = WB32F3G71xx
-
- # Linker script to use
- # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
- # or <keyboard_dir>/ld/
- MCU_LDSCRIPT ?= WB32F3G71x9
-
- # Startup code to use
- # - it sh