Skip to content

Commit

Permalink
Merge remote-tracking branch 'qmk/master' into merge-2022-09-10
Browse files Browse the repository at this point in the history
  • Loading branch information
xyzz committed Sep 10, 2022
2 parents dda43c8 + 405a32d commit d4fa670
Show file tree
Hide file tree
Showing 10,019 changed files with 150,743 additions and 51,812 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 3 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@ version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
labels: CI
reviewers:
- "qmk/collaborators"
schedule:
interval: "daily"
19 changes: 9 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
.DS_Store
._*

# Merge files
*.orig
*.rej

# Build artifacts
.clang_complete
.build/
Expand All @@ -28,16 +32,11 @@ quantum/version.h
*.vfw

# Old-style QMK Makefiles
/keyboards/*/Makefile
/keyboards/*/*/Makefile
/keyboards/*/*/*/Makefile
/keyboards/*/*/*/*/Makefile
/keyboards/*/*/*/*/*/Makefile
/keyboards/*/keymaps/Makefile
/keyboards/*/*/keymaps/Makefile
/keyboards/*/*/*/keymaps/Makefile
/keyboards/*/*/*/*/keymaps/Makefile
/keyboards/*/*/*/*/*/keymaps/Makefile
/keyboards/**/Makefile

# kbfirmware....
/keyboards/**/kb.h
/keyboards/**/kb.c

# Eclipse/PyCharm/Other IDE Settings
*.iml
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@
[submodule "lib/printf"]
path = lib/printf
url = https://github.com/qmk/printf
[submodule "lib/pico-sdk"]
path = lib/pico-sdk
url = https://github.com/qmk/pico-sdk.git
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"files.exclude": {
"**/.build": true,
"**/*.hex": true,
"**/*.bin": true
"**/*.bin": true,
"**/*.uf2": true
},
"files.associations": {
"*.h": "c",
Expand Down
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@ ifndef SKIP_GIT
if [ ! -e lib/lufa ]; then git submodule sync lib/lufa && git submodule update --depth 50 --init lib/lufa; fi
if [ ! -e lib/vusb ]; then git submodule sync lib/vusb && git submodule update --depth 50 --init lib/vusb; fi
if [ ! -e lib/printf ]; then git submodule sync lib/printf && git submodule update --depth 50 --init lib/printf; fi
if [ ! -e lib/pico-sdk ]; then git submodule sync lib/pico-sdk && git submodule update --depth 50 --init lib/pico-sdk; fi
git submodule status --recursive 2>/dev/null | \
while IFS= read -r x; do \
case "$$x" in \
Expand Down Expand Up @@ -428,9 +429,15 @@ lib/%:

.PHONY: git-submodule
git-submodule:
[ -e lib/ugfx ] && rm -rf lib/ugfx || true
[ -e lib/pico-sdk ] && rm -rf lib/pico-sdk || true
[ -e lib/chibios-contrib/ext/mcux-sdk ] && rm -rf lib/chibios-contrib/ext/mcux-sdk || true
git submodule sync --recursive
git submodule update --init --recursive --progress

.PHONY: git-submodules
git-submodules: git-submodule

.PHONY: list-keyboards
list-keyboards:
util/list_keyboards.sh | sort -u | tr '\n' ' '
Expand Down
9 changes: 7 additions & 2 deletions builddefs/bootloader.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -210,6 +210,11 @@ 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
Expand Down
39 changes: 38 additions & 1 deletion builddefs/build_keyboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -391,10 +399,18 @@ ifneq ("$(KEYMAP_H)","")
CONFIG_H += $(KEYMAP_H)
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 += <file>`
ifneq ($(strip $(INTROSPECTION_KEYMAP_C)),)
OPT_DEFS += -DINTROSPECTION_KEYMAP_C=\"$(strip $(INTROSPECTION_KEYMAP_C))\"
endif

# project specific files
SRC += \
$(KEYBOARD_SRC) \
$(KEYMAP_C) \
$(QUANTUM_DIR)/keymap_introspection.c \
$(QUANTUM_SRC) \
$(QUANTUM_DIR)/main.c \

Expand Down Expand Up @@ -437,6 +453,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)
Expand Down Expand Up @@ -470,6 +494,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

Expand Down
7 changes: 4 additions & 3 deletions builddefs/build_test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ CREATE_MAP := no
VPATH += \
$(LIB_PATH)/googletest \
$(LIB_PATH)/googlemock \
$(LIB_PATH)/printf
$(COMMON_VPATH) \
$(TEST_PATH)

all: elf

VPATH += $(COMMON_VPATH)
PLATFORM:=TEST
PLATFORM_KEY:=test
BOOTLOADER_TYPE:=none
Expand All @@ -63,14 +63,15 @@ 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 $(QUANTUM_PATH)/logging/print.mk
include $(PLATFORM_PATH)/test/rules.mk
ifneq ($(filter $(FULL_TESTS),$(TEST)),)
include $(BUILDDEFS_PATH)/build_full_test.mk
endif

$(TEST)_SRC += \
tests/test_common/main.c \
$(LIB_PATH)/printf/printf.c \
$(QUANTUM_PATH)/logging/print.c

$(TEST_OBJ)/$(TEST)_SRC := $($(TEST)_SRC)
Expand Down
Loading

0 comments on commit d4fa670

Please sign in to comment.