Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
tzarc committed Aug 28, 2022
2 parents fc0bf67 + 9b5b072 commit 0a3f7e4
Show file tree
Hide file tree
Showing 4,323 changed files with 42,719 additions and 19,819 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/workflows/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
paths:
- 'keyboards/**'
- 'layouts/community/**'
- 'lib/python/**'
- 'data/**'
- '.github/workflows/api.yml'
workflow_dispatch:

jobs:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/develop_api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
paths:
- 'keyboards/**'
- 'layouts/community/**'
- 'lib/python/**'
- 'data/**'
- '.github/workflows/develop_api.yml'
workflow_dispatch:

jobs:
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
1 change: 1 addition & 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
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 @@ -199,6 +199,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 @@ -390,10 +398,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 @@ -436,6 +452,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 @@ -469,6 +493,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 0a3f7e4

Please sign in to comment.