summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build_keyboard.mk7
-rw-r--r--build_test.mk6
-rw-r--r--common_features.mk4
-rw-r--r--docs/feature_layers.md2
-rw-r--r--docs/fr-fr/faq_keymap.md2
-rw-r--r--docs/internals_gpio_control.md2
-rw-r--r--docs/ja/faq_keymap.md2
-rw-r--r--docs/ja/feature_layers.md2
-rw-r--r--docs/ja/pr_checklist.md2
-rw-r--r--docs/pr_checklist.md2
-rw-r--r--docs/zh-cn/faq_keymap.md2
-rw-r--r--keyboards/ai03/orbit/split_util.c2
-rw-r--r--keyboards/cannonkeys/satisfaction75/satisfaction75.c2
-rw-r--r--keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c2
-rw-r--r--keyboards/mxss/mxss.c2
-rw-r--r--keyboards/mxss/mxss_frontled.c2
-rw-r--r--keyboards/wilba_tech/wt_main.c2
-rw-r--r--keyboards/wilba_tech/wt_mono_backlight.c2
-rw-r--r--keyboards/wilba_tech/wt_rgb_backlight.c2
-rw-r--r--paths.mk3
-rw-r--r--platforms/arm_atsam/_timer.h (renamed from tmk_core/common/arm_atsam/_timer.h)0
-rw-r--r--platforms/arm_atsam/_wait.h (renamed from tmk_core/common/arm_atsam/_wait.h)0
-rw-r--r--platforms/arm_atsam/atomic_util.h (renamed from tmk_core/common/arm_atsam/atomic_util.h)0
-rw-r--r--platforms/arm_atsam/bootloader.c (renamed from tmk_core/common/arm_atsam/bootloader.c)0
-rw-r--r--platforms/arm_atsam/eeprom.c (renamed from tmk_core/common/arm_atsam/eeprom.c)0
-rw-r--r--platforms/arm_atsam/gpio.h (renamed from tmk_core/common/arm_atsam/gpio.h)0
-rw-r--r--platforms/arm_atsam/pin_defs.h (renamed from tmk_core/common/arm_atsam/pin_defs.h)0
-rw-r--r--platforms/arm_atsam/platform.c (renamed from tmk_core/common/arm_atsam/platform.c)0
-rw-r--r--platforms/arm_atsam/platform.mk (renamed from tmk_core/arm_atsam.mk)0
-rw-r--r--platforms/arm_atsam/platform_deps.h (renamed from tmk_core/common/arm_atsam/platform_deps.h)0
-rw-r--r--platforms/arm_atsam/suspend.c (renamed from tmk_core/common/arm_atsam/suspend.c)0
-rw-r--r--platforms/arm_atsam/timer.c (renamed from tmk_core/common/arm_atsam/timer.c)0
-rw-r--r--platforms/atomic_util.h (renamed from tmk_core/common/atomic_util.h)0
-rw-r--r--platforms/avr/_print.h (renamed from tmk_core/common/avr/_print.h)0
-rw-r--r--platforms/avr/_timer.h (renamed from tmk_core/common/avr/_timer.h)0
-rw-r--r--platforms/avr/_wait.h (renamed from tmk_core/common/avr/_wait.h)0
-rw-r--r--platforms/avr/atomic_util.h (renamed from tmk_core/common/avr/atomic_util.h)0
-rw-r--r--platforms/avr/bootloader.c (renamed from tmk_core/common/avr/bootloader.c)0
-rw-r--r--platforms/avr/bootloader_size.c (renamed from tmk_core/common/avr/bootloader_size.c)0
-rw-r--r--platforms/avr/gpio.h (renamed from tmk_core/common/avr/gpio.h)0
-rw-r--r--platforms/avr/pin_defs.h (renamed from tmk_core/common/avr/pin_defs.h)0
-rw-r--r--platforms/avr/platform.c (renamed from tmk_core/common/avr/platform.c)0
-rw-r--r--platforms/avr/platform.mk (renamed from tmk_core/avr.mk)2
-rw-r--r--platforms/avr/platform_deps.h (renamed from tmk_core/common/avr/platform_deps.h)0
-rw-r--r--platforms/avr/printf.c (renamed from tmk_core/common/avr/printf.c)0
-rw-r--r--platforms/avr/printf.mk (renamed from tmk_core/common/avr/printf.mk)0
-rw-r--r--platforms/avr/sleep_led.c (renamed from tmk_core/common/avr/sleep_led.c)0
-rw-r--r--platforms/avr/suspend.c (renamed from tmk_core/common/avr/suspend.c)0
-rw-r--r--platforms/avr/timer.c (renamed from tmk_core/common/avr/timer.c)0
-rw-r--r--platforms/avr/timer_avr.h (renamed from tmk_core/common/avr/timer_avr.h)0
-rw-r--r--platforms/avr/xprintf.S (renamed from tmk_core/common/avr/xprintf.S)0
-rw-r--r--platforms/avr/xprintf.h (renamed from tmk_core/common/avr/xprintf.h)0
-rw-r--r--platforms/bootloader.h (renamed from tmk_core/common/bootloader.h)0
-rw-r--r--platforms/chibios/_timer.h (renamed from tmk_core/common/chibios/_timer.h)0
-rw-r--r--platforms/chibios/_wait.c (renamed from tmk_core/common/chibios/_wait.c)0
-rw-r--r--platforms/chibios/_wait.h (renamed from tmk_core/common/chibios/_wait.h)0
-rw-r--r--platforms/chibios/atomic_util.h (renamed from tmk_core/common/chibios/atomic_util.h)0
-rw-r--r--platforms/chibios/bootloader.c (renamed from tmk_core/common/chibios/bootloader.c)0
-rw-r--r--platforms/chibios/chibios_config.h (renamed from tmk_core/common/chibios/chibios_config.h)0
-rw-r--r--platforms/chibios/eeprom_stm32.c (renamed from tmk_core/common/chibios/eeprom_stm32.c)0
-rw-r--r--platforms/chibios/eeprom_stm32.h (renamed from tmk_core/common/chibios/eeprom_stm32.h)0
-rw-r--r--platforms/chibios/eeprom_stm32_defs.h (renamed from tmk_core/common/chibios/eeprom_stm32_defs.h)0
-rw-r--r--platforms/chibios/eeprom_teensy.c (renamed from tmk_core/common/chibios/eeprom_teensy.c)0
-rw-r--r--platforms/chibios/flash_stm32.c (renamed from tmk_core/common/chibios/flash_stm32.c)0
-rw-r--r--platforms/chibios/flash_stm32.h (renamed from tmk_core/common/chibios/flash_stm32.h)0
-rw-r--r--platforms/chibios/gd32v_compatibility.h (renamed from tmk_core/common/chibios/gd32v_compatibility.h)0
-rw-r--r--platforms/chibios/gpio.h (renamed from tmk_core/common/chibios/gpio.h)0
-rw-r--r--platforms/chibios/pin_defs.h (renamed from tmk_core/common/chibios/pin_defs.h)0
-rw-r--r--platforms/chibios/platform.c (renamed from tmk_core/common/chibios/platform.c)0
-rw-r--r--platforms/chibios/platform.mk (renamed from tmk_core/chibios.mk)0
-rw-r--r--platforms/chibios/platform_deps.h (renamed from tmk_core/common/chibios/platform_deps.h)0
-rw-r--r--platforms/chibios/sleep_led.c (renamed from tmk_core/common/chibios/sleep_led.c)0
-rw-r--r--platforms/chibios/suspend.c (renamed from tmk_core/common/chibios/suspend.c)0
-rw-r--r--platforms/chibios/syscall-fallbacks.c (renamed from tmk_core/common/chibios/syscall-fallbacks.c)0
-rw-r--r--platforms/chibios/timer.c (renamed from tmk_core/common/chibios/timer.c)0
-rw-r--r--platforms/chibios/wait.c (renamed from tmk_core/common/chibios/wait.c)0
-rw-r--r--platforms/common.mk12
-rw-r--r--platforms/eeprom.h (renamed from tmk_core/common/eeprom.h)0
-rw-r--r--platforms/gpio.h (renamed from tmk_core/common/gpio.h)0
-rw-r--r--platforms/pin_defs.h (renamed from tmk_core/common/pin_defs.h)0
-rw-r--r--platforms/progmem.h (renamed from tmk_core/common/progmem.h)0
-rw-r--r--platforms/sleep_led.h (renamed from tmk_core/common/sleep_led.h)0
-rw-r--r--platforms/suspend.h (renamed from tmk_core/common/suspend.h)0
-rw-r--r--platforms/test/_wait.h (renamed from tmk_core/common/test/_wait.h)0
-rw-r--r--platforms/test/bootloader.c (renamed from tmk_core/common/test/bootloader.c)0
-rw-r--r--platforms/test/eeprom.c (renamed from tmk_core/common/test/eeprom.c)0
-rw-r--r--platforms/test/eeprom_stm32_tests.cpp (renamed from tmk_core/common/test/eeprom_stm32_tests.cpp)0
-rw-r--r--platforms/test/flash_stm32_mock.c (renamed from tmk_core/common/test/flash_stm32_mock.c)0
-rw-r--r--platforms/test/hal.h (renamed from tmk_core/common/test/hal.h)0
-rw-r--r--platforms/test/platform.c (renamed from tmk_core/common/test/platform.c)0
-rw-r--r--platforms/test/platform.h (renamed from tmk_core/common/test/platform.h)0
-rw-r--r--platforms/test/platform.mk (renamed from tmk_core/native.mk)0
-rw-r--r--platforms/test/platform_deps.h (renamed from tmk_core/common/test/platform_deps.h)0
-rw-r--r--platforms/test/rules.mk (renamed from tmk_core/common/test/rules.mk)8
-rw-r--r--platforms/test/suspend.c (renamed from tmk_core/common/test/suspend.c)0
-rw-r--r--platforms/test/testlist.mk (renamed from tmk_core/common/test/testlist.mk)0
-rw-r--r--platforms/test/timer.c (renamed from tmk_core/common/test/timer.c)0
-rw-r--r--platforms/timer.h (renamed from tmk_core/common/timer.h)0
-rw-r--r--platforms/wait.h (renamed from tmk_core/common/wait.h)0
-rw-r--r--quantum/debounce/tests/rules.mk2
-rw-r--r--quantum/dynamic_keymap.c2
-rw-r--r--quantum/sequencer/tests/rules.mk2
-rw-r--r--quantum/via.c2
-rw-r--r--testlist.mk6
-rw-r--r--tmk_core/common.mk16
-rw-r--r--tmk_core/protocol.mk2
-rw-r--r--tmk_core/rules.mk2
107 files changed, 54 insertions, 54 deletions
diff --git a/build_keyboard.mk b/build_keyboard.mk
index 36c628c7ce..c12aa0fce0 100644
--- a/build_keyboard.mk
+++ b/build_keyboard.mk
@@ -388,7 +388,7 @@ VPATH += $(COMMON_VPATH)
include common_features.mk
include $(BUILDDEFS_PATH)/generic_features.mk
include $(TMK_PATH)/protocol.mk
-include $(TMK_PATH)/common.mk
+include $(PLATFORM_PATH)/common.mk
include $(BUILDDEFS_PATH)/bootloader.mk
SRC += $(patsubst %.c,%.clib,$(LIB_SRC))
@@ -404,13 +404,14 @@ ifneq ($(REQUIRE_PLATFORM_KEY),)
endif
endif
-include $(TMK_PATH)/$(PLATFORM_KEY).mk
+include $(PLATFORM_PATH)/$(PLATFORM_KEY)/platform.mk
+-include $(PLATFORM_PATH)/$(PLATFORM_KEY)/flash.mk
+
ifneq ($(strip $(PROTOCOL)),)
include $(TMK_PATH)/protocol/$(strip $(shell echo $(PROTOCOL) | tr '[:upper:]' '[:lower:]')).mk
else
include $(TMK_PATH)/protocol/$(PLATFORM_KEY).mk
endif
--include $(TOP_DIR)/platforms/$(PLATFORM_KEY)/flash.mk
# TODO: remove this bodge?
PROJECT_DEFS := $(OPT_DEFS)
diff --git a/build_test.mk b/build_test.mk
index 6e4494d77f..3553125a04 100644
--- a/build_test.mk
+++ b/build_test.mk
@@ -54,11 +54,11 @@ endif
include common_features.mk
include $(BUILDDEFS_PATH)/generic_features.mk
-include $(TMK_PATH)/common.mk
+include $(PLATFORM_PATH)/common.mk
include $(TMK_PATH)/protocol.mk
include $(QUANTUM_PATH)/debounce/tests/rules.mk
include $(QUANTUM_PATH)/sequencer/tests/rules.mk
-include $(TMK_PATH)/common/test/rules.mk
+include $(PLATFORM_PATH)/test/rules.mk
ifneq ($(filter $(FULL_TESTS),$(TEST)),)
include build_full_test.mk
endif
@@ -73,7 +73,7 @@ $(TEST_OBJ)/$(TEST)_INC := $($(TEST)_INC) $(VPATH) $(GTEST_INC)
$(TEST_OBJ)/$(TEST)_DEFS := $($(TEST)_DEFS)
$(TEST_OBJ)/$(TEST)_CONFIG := $($(TEST)_CONFIG)
-include $(TMK_PATH)/native.mk
+include $(PLATFORM_PATH)/$(PLATFORM_KEY)/platform.mk
include $(TMK_PATH)/rules.mk
diff --git a/common_features.mk b/common_features.mk
index 896fbb0129..8c593024f0 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -33,8 +33,10 @@ QUANTUM_SRC += \
VPATH += $(QUANTUM_DIR)/logging
# Fall back to lib/printf if there is no platform provided print
-ifeq ("$(wildcard $(TMK_PATH)/common/$(PLATFORM_KEY)/printf.mk)","")
+ifeq ("$(wildcard $(PLATFORM_PATH)/$(PLATFORM_KEY)/printf.mk)","")
include $(QUANTUM_PATH)/logging/print.mk
+else
+ include $(PLATFORM_PATH)/$(PLATFORM_KEY)/printf.mk
endif
ifeq ($(strip $(DEBUG_MATRIX_SCAN_RATE_ENABLE)), yes)
diff --git a/docs/feature_layers.md b/docs/feature_layers.md
index 78d950dc49..e30c540a79 100644
--- a/docs/feature_layers.md
+++ b/docs/feature_layers.md
@@ -45,7 +45,7 @@ Once you have a good feel for how layers work and what you can do, you can get m
Layers stack on top of each other in numerical order. When determining what a keypress does, QMK scans the layers from the top down, stopping when it reaches the first active layer that is not set to `KC_TRNS`. As a result if you activate a layer that is numerically lower than your current layer, and your current layer (or another layer that is active and higher than your target layer) has something other than `KC_TRNS`, that is the key that will be sent, not the key on the layer you just activated. This is the cause of most people's "why doesn't my layer get switched" problem.
-Sometimes, you might want to switch between layers in a macro or as part of a tap dance routine. `layer_on` activates a layer, and `layer_off` deactivates it. More layer-related functions can be found in [action_layer.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action_layer.h).
+Sometimes, you might want to switch between layers in a macro or as part of a tap dance routine. `layer_on` activates a layer, and `layer_off` deactivates it. More layer-related functions can be found in [action_layer.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/action_layer.h).
## Functions :id=functions
diff --git a/docs/fr-fr/faq_keymap.md b/docs/fr-fr/faq_keymap.md
index 374a005227..cc0700ab8e 100644
--- a/docs/fr-fr/faq_keymap.md
+++ b/docs/fr-fr/faq_keymap.md
@@ -6,7 +6,7 @@ Cette page couvre les questions souvent posées à propos des keymaps. Si vous n
Regardez [Keycodes](keycodes.md) pour une liste des keycodes disponibles. Certains keycodes spécifiques ont des documentations plus complètes de disponible.
-Les keycodes sont définies dans [common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/keycode.h).
+Les keycodes sont définies dans [common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/keycode.h).
## Quels sont les keycodes par défaut ?
diff --git a/docs/internals_gpio_control.md b/docs/internals_gpio_control.md
index 21a3bd661e..ccd3f8c74d 100644
--- a/docs/internals_gpio_control.md
+++ b/docs/internals_gpio_control.md
@@ -4,7 +4,7 @@ QMK has a GPIO control abstraction layer which is microcontroller agnostic. This
## Functions :id=functions
-The following functions provide basic control of GPIOs and are found in `tmk_core/common/<platform>/gpio.h`.
+The following functions provide basic control of GPIOs and are found in `platforms/<platform>/gpio.h`.
|Function |Description | Old AVR Examples | Old ChibiOS/ARM Examples |
|------------------------|--------------------------------------------------|-------------------------------------------------|-------------------------------------------------|
diff --git a/docs/ja/faq_keymap.md b/docs/ja/faq_keymap.md
index fb44e316b7..59c7d206a1 100644
--- a/docs/ja/faq_keymap.md
+++ b/docs/ja/faq_keymap.md
@@ -10,7 +10,7 @@
## どのキーコードを使えますか?
あなたが利用可能なキーコードのインデックスについては、[キーコード](ja/keycodes.md)を見てください。より広範なドキュメントがある場合は、そこからリンクしてあります。
-キーコードは実際には [common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/keycode.h) で定義されています。
+キーコードは実際には [common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/keycode.h) で定義されています。
## デフォルトのキーコードとは何か?
diff --git a/docs/ja/feature_layers.md b/docs/ja/feature_layers.md
index 011f0e0ef1..ca3e055835 100644
--- a/docs/ja/feature_layers.md
+++ b/docs/ja/feature_layers.md
@@ -50,7 +50,7 @@ QMK を使い始めたばかりの場合は、全てを単純にしたいでし
レイヤーは番号順に上に積み重なっています。キーの押下の動作を決定する時に、QMK は上から順にレイヤーを走査し、`KC_TRNS` に設定されていない最初のアクティブなレイヤーに到達すると停止します。結果として、現在のレイヤーよりも数値的に低いレイヤーをアクティブにし、現在のレイヤー(あるいはアクティブでターゲットレイヤーよりも高い別のレイヤー)に `KC_TRNS` 以外のものがある場合、それが送信されるキーであり、アクティブ化したばかりのレイヤー上のキーではありません。これが、ほとんどの人の "なぜレイヤーが切り替わらないのか" 問題の原因です。
-場合によっては、マクロ内あるいはタップダンスルーチンの一部としてレイヤーを切り替えほうが良いかもしれません。`layer_on` はレイヤーをアクティブにし、`layer_off` はそれを非アクティブにします。もっと多くのレイヤーに関する関数は、[action_layer.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action_layer.h) で見つけることができます。
+場合によっては、マクロ内あるいはタップダンスルーチンの一部としてレイヤーを切り替えほうが良いかもしれません。`layer_on` はレイヤーをアクティブにし、`layer_off` はそれを非アクティブにします。もっと多くのレイヤーに関する関数は、[action_layer.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/action_layer.h) で見つけることができます。
## 関数 :id=functions
diff --git a/docs/ja/pr_checklist.md b/docs/ja/pr_checklist.md
index 18dbeccebb..caab2b4d50 100644
--- a/docs/ja/pr_checklist.md
+++ b/docs/ja/pr_checklist.md
@@ -27,7 +27,7 @@
- 「旧式の」 GPIO/I2C/SPI 関数を使用しない - 正当な理由がない限り、QMK の抽象化を使用しなければなりません (怠惰は正当な理由にはなりません)
- タイミングの抽象化にも従う必要があります:
- `_delay_ms()` のかわりに `wait_ms()` を。(`#include <util/delay.h>` も消します)
- - `timer_read()` と `timer_read32()` など。 -- タイミング API は [timer.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/timer.h) を参照してください
+ - `timer_read()` と `timer_read32()` など。 -- タイミング API は [timer.h](https://github.com/qmk/qmk_firmware/blob/master/platforms/timer.h) を参照してください
- 新しい抽象化が有用だと思う場合は、次のことをお勧めします:
- 機能が完成するまで自分のキーボードでプロトタイプを作成する
- Discord の QMK コラボレータと話し合う
diff --git a/docs/pr_checklist.md b/docs/pr_checklist.md
index 94c62c6535..2a2b0f1e76 100644
--- a/docs/pr_checklist.md
+++ b/docs/pr_checklist.md
@@ -24,7 +24,7 @@ If there are any inconsistencies with these recommendations, you're best off [cr
- no "old-school" or other low-level GPIO/I2C/SPI functions may be used -- must use QMK abstractions unless justifiable (and laziness is not valid justification)
- timing abstractions should be followed too:
- `wait_ms()` instead of `_delay_ms()` (remove `#include <util/delay.h>` too)
- - `timer_read()` and `timer_read32()` etc. -- see [timer.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/timer.h) for the timing APIs
+ - `timer_read()` and `timer_read32()` etc. -- see [timer.h](https://github.com/qmk/qmk_firmware/blob/master/platforms/timer.h) for the timing APIs
- if you think a new abstraction is useful, you're encouraged to:
- prototype it in your own keyboard until it's feature-complete
- discuss it with QMK Collaborators on Discord
diff --git a/docs/zh-cn/faq_keymap.md b/docs/zh-cn/faq_keymap.md
index fdfa25ad9e..ff38f38894 100644
--- a/docs/zh-cn/faq_keymap.md
+++ b/docs/zh-cn/faq_keymap.md
@@ -5,7 +5,7 @@
## 我能用什么键码?
看[键码](keycodes.md)你可以找到你能用的键码索引。可以的话这些链接可以连接到更广泛的文档。
-键码实际上定义在[common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/keycode.h).
+键码实际上定义在[common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/keycode.h).
## 默认的键码什么样?
diff --git a/keyboards/ai03/orbit/split_util.c b/keyboards/ai03/orbit/split_util.c
index a83ff5bc67..2352e5a111 100644
--- a/keyboards/ai03/orbit/split_util.c
+++ b/keyboards/ai03/orbit/split_util.c
@@ -8,7 +8,7 @@
#include "quantum.h"
#ifdef EE_HANDS
-# include "tmk_core/common/eeprom.h"
+# include "eeprom.h"
# include "eeconfig.h"
#endif
diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction75.c b/keyboards/cannonkeys/satisfaction75/satisfaction75.c
index 8b5016437c..bd7eaf1885 100644
--- a/keyboards/cannonkeys/satisfaction75/satisfaction75.c
+++ b/keyboards/cannonkeys/satisfaction75/satisfaction75.c
@@ -9,7 +9,7 @@
#include "raw_hid.h"
#include "dynamic_keymap.h"
-#include "tmk_core/common/eeprom.h"
+#include "eeprom.h"
#include "version.h" // for QMK_BUILDDATE used in EEPROM magic
/* Artificial delay added to get media keys to work in the encoder*/
diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c b/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c
index cefdbc5f9c..0d2fdc359c 100644
--- a/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c
+++ b/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c
@@ -1,5 +1,5 @@
#include "satisfaction75.h"
-#include "tmk_core/common/eeprom.h"
+#include "eeprom.h"
void pre_encoder_mode_change(){
if(encoder_mode == ENC_MODE_CLOCK_SET){
diff --git a/keyboards/mxss/mxss.c b/keyboards/mxss/mxss.c
index f591d39e67..21beee232c 100644
--- a/keyboards/mxss/mxss.c
+++ b/keyboards/mxss/mxss.c
@@ -17,7 +17,7 @@
*/
#include QMK_KEYBOARD_H
-#include "tmk_core/common/eeprom.h"
+#include "eeprom.h"
#include "action_layer.h"
#include "rgblight.h"
#include "via.h"
diff --git a/keyboards/mxss/mxss_frontled.c b/keyboards/mxss/mxss_frontled.c
index 3c4309f070..f5e4613dfb 100644
--- a/keyboards/mxss/mxss_frontled.c
+++ b/keyboards/mxss/mxss_frontled.c
@@ -17,7 +17,7 @@
*/
#include "mxss_frontled.h"
-#include "tmk_core/common/eeprom.h"
+#include "eeprom.h"
#include "rgblight.h"
#include "via.h"
#include "version.h" // for QMK_BUILDDATE used in EEPROM magic
diff --git a/keyboards/wilba_tech/wt_main.c b/keyboards/wilba_tech/wt_main.c
index d5e136e06b..a8ad795446 100644
--- a/keyboards/wilba_tech/wt_main.c
+++ b/keyboards/wilba_tech/wt_main.c
@@ -27,7 +27,7 @@
#include "via.h"
#ifndef VIA_ENABLE
-#include "tmk_core/common/eeprom.h"
+#include "eeprom.h"
#include "version.h" // for QMK_BUILDDATE used in EEPROM magic
#endif
diff --git a/keyboards/wilba_tech/wt_mono_backlight.c b/keyboards/wilba_tech/wt_mono_backlight.c
index 77cee34ca6..5e2fde810c 100644
--- a/keyboards/wilba_tech/wt_mono_backlight.c
+++ b/keyboards/wilba_tech/wt_mono_backlight.c
@@ -24,7 +24,7 @@
#include "progmem.h"
#include "quantum/color.h"
-#include "tmk_core/common/eeprom.h"
+#include "eeprom.h"
#include "via.h" // uses EEPROM address, lighting value IDs
#define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR (VIA_EEPROM_CUSTOM_CONFIG_ADDR)
diff --git a/keyboards/wilba_tech/wt_rgb_backlight.c b/keyboards/wilba_tech/wt_rgb_backlight.c
index 82b1fb2fb3..63763c6c90 100644
--- a/keyboards/wilba_tech/wt_rgb_backlight.c
+++ b/keyboards/wilba_tech/wt_rgb_backlight.c
@@ -68,7 +68,7 @@ LED_TYPE g_ws2812_leds[WS2812_LED_TOTAL];
#include "progmem.h"
#include "quantum/color.h"
-#include "tmk_core/common/eeprom.h"
+#include "eeprom.h"
#include "via.h" // uses EEPROM address, lighting value IDs
#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR (VIA_EEPROM_CUSTOM_CONFIG_ADDR)
diff --git a/paths.mk b/paths.mk
index 7be1b2ce04..5a39d00ecd 100644
--- a/paths.mk
+++ b/paths.mk
@@ -13,6 +13,9 @@ DRIVER_PATH = $(DRIVER_DIR)
PLATFORM_DIR = platforms
PLATFORM_PATH = $(PLATFORM_DIR)
+PROTOCOL_DIR = protocol
+PROTOCOL_PATH = $(TMK_DIR)/$(PROTOCOL_DIR)
+
BUILDDEFS_DIR = builddefs
BUILDDEFS_PATH = $(BUILDDEFS_DIR)
diff --git a/tmk_core/common/arm_atsam/_timer.h b/platforms/arm_atsam/_timer.h
index 77402b612a..77402b612a 100644
--- a/tmk_core/common/arm_atsam/_timer.h
+++ b/platforms/arm_atsam/_timer.h
diff --git a/tmk_core/common/arm_atsam/_wait.h b/platforms/arm_atsam/_wait.h
index 41b686b56c..41b686b56c 100644
--- a/tmk_core/common/arm_atsam/_wait.h
+++ b/platforms/arm_atsam/_wait.h
diff --git a/tmk_core/common/arm_atsam/atomic_util.h b/platforms/arm_atsam/atomic_util.h
index 848542d23a..848542d23a 100644
--- a/tmk_core/common/arm_atsam/atomic_util.h
+++ b/platforms/arm_atsam/atomic_util.h
diff --git a/tmk_core/common/arm_atsam/bootloader.c b/platforms/arm_atsam/bootloader.c
index 9015b00aab..9015b00aab 100644
--- a/tmk_core/common/arm_atsam/bootloader.c
+++ b/platforms/arm_atsam/bootloader.c
diff --git a/tmk_core/common/arm_atsam/eeprom.c b/platforms/arm_atsam/eeprom.c
index ff1a692623..ff1a692623 100644
--- a/tmk_core/common/arm_atsam/eeprom.c
+++ b/platforms/arm_atsam/eeprom.c
diff --git a/tmk_core/common/arm_atsam/gpio.h b/platforms/arm_atsam/gpio.h
index 915ed0ef4f..915ed0ef4f 100644
--- a/tmk_core/common/arm_atsam/gpio.h
+++ b/platforms/arm_atsam/gpio.h
diff --git a/tmk_core/common/arm_atsam/pin_defs.h b/platforms/arm_atsam/pin_defs.h
index 5b50b23910..5b50b23910 100644
--- a/tmk_core/common/arm_atsam/pin_defs.h
+++ b/platforms/arm_atsam/pin_defs.h
diff --git a/tmk_core/common/arm_atsam/platform.c b/platforms/arm_atsam/platform.c
index 3e35b4fe4c..3e35b4fe4c 100644
--- a/tmk_core/common/arm_atsam/platform.c
+++ b/platforms/arm_atsam/platform.c
diff --git a/tmk_core/arm_atsam.mk b/platforms/arm_atsam/platform.mk
index b49bf764d7..b49bf764d7 100644
--- a/tmk_core/arm_atsam.mk
+++ b/platforms/arm_atsam/platform.mk
diff --git a/tmk_core/common/arm_atsam/platform_deps.h b/platforms/arm_atsam/platform_deps.h
index f296d1d535..f296d1d535 100644
--- a/tmk_core/common/arm_atsam/platform_deps.h
+++ b/platforms/arm_atsam/platform_deps.h
diff --git a/tmk_core/common/arm_atsam/suspend.c b/platforms/arm_atsam/suspend.c
index e51426128d..e51426128d 100644
--- a/tmk_core/common/arm_atsam/suspend.c
+++ b/platforms/arm_atsam/suspend.c
diff --git a/tmk_core/common/arm_atsam/timer.c b/platforms/arm_atsam/timer.c
index b835dd5e75..b835dd5e75 100644
--- a/tmk_core/common/arm_atsam/timer.c
+++ b/platforms/arm_atsam/timer.c
diff --git a/tmk_core/common/atomic_util.h b/platforms/atomic_util.h
index 2c95302a13..2c95302a13 100644
--- a/tmk_core/common/atomic_util.h
+++ b/platforms/atomic_util.h
diff --git a/tmk_core/common/avr/_print.h b/platforms/avr/_print.h
index 5c1fdd26d8..5c1fdd26d8 100644
--- a/tmk_core/common/avr/_print.h
+++ b/platforms/avr/_print.h
diff --git a/tmk_core/common/avr/_timer.h b/platforms/avr/_timer.h
index b81e0f68b7..b81e0f68b7 100644
--- a/tmk_core/common/avr/_timer.h
+++ b/platforms/avr/_timer.h
diff --git a/tmk_core/common/avr/_wait.h b/platforms/avr/_wait.h
index 683db6ae57..683db6ae57 100644
--- a/tmk_core/common/avr/_wait.h
+++ b/platforms/avr/_wait.h
diff --git a/tmk_core/common/avr/atomic_util.h b/platforms/avr/atomic_util.h
index 7c5d2e7dcc..7c5d2e7dcc 100644
--- a/tmk_core/common/avr/atomic_util.h
+++ b/platforms/avr/atomic_util.h
diff --git a/tmk_core/common/avr/bootloader.c b/platforms/avr/bootloader.c
index c0272903b8..c0272903b8 100644
--- a/tmk_core/common/avr/bootloader.c
+++ b/platforms/avr/bootloader.c
diff --git a/tmk_core/common/avr/bootloader_size.c b/platforms/avr/bootloader_size.c
index a029f9321f..a029f9321f 100644
--- a/tmk_core/common/avr/bootloader_size.c
+++ b/platforms/avr/bootloader_size.c
diff --git a/tmk_core/common/avr/gpio.h b/platforms/avr/gpio.h
index e9be68491d..e9be68491d 100644
--- a/tmk_core/common/avr/gpio.h
+++ b/platforms/avr/gpio.h
diff --git a/tmk_core/common/avr/pin_defs.h b/platforms/avr/pin_defs.h
index 23d948041d..23d948041d 100644
--- a/tmk_core/common/avr/pin_defs.h
+++ b/platforms/avr/pin_defs.h
diff --git a/tmk_core/common/avr/platform.c b/platforms/avr/platform.c
index 3e35b4fe4c..3e35b4fe4c 100644
--- a/tmk_core/common/avr/platform.c
+++ b/platforms/avr/platform.c
diff --git a/tmk_core/avr.mk b/platforms/avr/platform.mk
index c52262273e..b45108736f 100644
--- a/tmk_core/avr.mk
+++ b/platforms/avr/platform.mk
@@ -163,7 +163,7 @@ ifeq ($(strip $(QMK_BOOTLOADER_TYPE)),)
else
make -C lib/lufa/Bootloaders/$(QMK_BOOTLOADER_TYPE)/ clean
$(QMK_BIN) generate-dfu-header --quiet --keyboard $(KEYBOARD) --output lib/lufa/Bootloaders/$(QMK_BOOTLOADER_TYPE)/Keyboard.h
- $(eval MAX_SIZE=$(shell n=`$(CC) -E -mmcu=$(MCU) -D__ASSEMBLER__ $(CFLAGS) $(OPT_DEFS) tmk_core/common/avr/bootloader_size.c 2> /dev/null | sed -ne 's/\r//;/^#/n;/^AVR_SIZE:/,$${s/^AVR_SIZE: //;p;}'` && echo $$(($$n)) || echo 0))
+ $(eval MAX_SIZE=$(shell n=`$(CC) -E -mmcu=$(MCU) -D__ASSEMBLER__ $(CFLAGS) $(OPT_DEFS) platforms/avr/bootloader_size.c 2> /dev/null | sed -ne 's/\r//;/^#/n;/^AVR_SIZE:/,$${s/^AVR_SIZE: //;p;}'` && echo $$(($$n)) || echo 0))
$(eval PROGRAM_SIZE_KB=$(shell n=`expr $(MAX_SIZE) / 1024` && echo $$(($$n)) || echo 0))
$(eval BOOT_SECTION_SIZE_KB=$(shell n=`expr $(BOOTLOADER_SIZE) / 1024` && echo $$(($$n)) || echo 0))
$(eval FLASH_SIZE_KB=$(shell n=`expr $(PROGRAM_SIZE_KB) + $(BOOT_SECTION_SIZE_KB)` && echo $$(($$n)) || echo 0))
diff --git a/tmk_core/common/avr/platform_deps.h b/platforms/avr/platform_deps.h
index 45d9dcebfa..45d9dcebfa 100644
--- a/tmk_core/common/avr/platform_deps.h
+++ b/platforms/avr/platform_deps.h
diff --git a/tmk_core/common/avr/printf.c b/platforms/avr/printf.c
index 9ad7a38693..9ad7a38693 100644
--- a/tmk_core/common/avr/printf.c
+++ b/platforms/avr/printf.c
diff --git a/tmk_core/common/avr/printf.mk b/platforms/avr/printf.mk
index 060ad88c57..060ad88c57 100644
--- a/tmk_core/common/avr/printf.mk
+++ b/platforms/avr/printf.mk
diff --git a/tmk_core/common/avr/sleep_led.c b/platforms/avr/sleep_led.c
index 9a3b52abe5..9a3b52abe5 100644
--- a/tmk_core/common/avr/sleep_led.c
+++ b/platforms/avr/sleep_led.c
diff --git a/tmk_core/common/avr/suspend.c b/platforms/avr/suspend.c
index b614746e6c..b614746e6c 100644
--- a/tmk_core/common/avr/suspend.c
+++ b/platforms/avr/suspend.c
diff --git a/tmk_core/common/avr/timer.c b/platforms/avr/timer.c
index c2e6c6e081..c2e6c6e081 100644
--- a/tmk_core/common/avr/timer.c
+++ b/platforms/avr/timer.c
diff --git a/tmk_core/common/avr/timer_avr.h b/platforms/avr/timer_avr.h
index c1b726bd01..c1b726bd01 100644
--- a/tmk_core/common/avr/timer_avr.h
+++ b/platforms/avr/timer_avr.h
diff --git a/tmk_core/common/avr/xprintf.S b/platforms/avr/xprintf.S
index c5a414c35c..c5a414c35c 100644
--- a/tmk_core/common/avr/xprintf.S
+++ b/platforms/avr/xprintf.S
diff --git a/tmk_core/common/avr/xprintf.h b/platforms/avr/xprintf.h
index 80834f1714..80834f1714 100644
--- a/tmk_core/common/avr/xprintf.h
+++ b/platforms/avr/xprintf.h
diff --git a/tmk_core/common/bootloader.h b/platforms/bootloader.h
index 25ebd95288..25ebd95288 100644
--- a/tmk_core/common/bootloader.h
+++ b/platforms/bootloader.h
diff --git a/tmk_core/common/chibios/_timer.h b/platforms/chibios/_timer.h
index 77402b612a..77402b612a 100644
--- a/tmk_core/common/chibios/_timer.h
+++ b/platforms/chibios/_timer.h
diff --git a/tmk_core/common/chibios/_wait.c b/platforms/chibios/_wait.c
index 1fbea2dd5e..1fbea2dd5e 100644
--- a/tmk_core/common/chibios/_wait.c
+++ b/platforms/chibios/_wait.c
diff --git a/tmk_core/common/chibios/_wait.h b/platforms/chibios/_wait.h
index 2f36c64a2e..2f36c64a2e 100644
--- a/tmk_core/common/chibios/_wait.h
+++ b/platforms/chibios/_wait.h
diff --git a/tmk_core/common/chibios/atomic_util.h b/platforms/chibios/atomic_util.h
index 8975045153..8975045153 100644
--- a/tmk_core/common/chibios/atomic_util.h
+++ b/platforms/chibios/atomic_util.h
diff --git a/tmk_core/common/chibios/bootloader.c b/platforms/chibios/bootloader.c
index 5cadadeeeb..5cadadeeeb 100644
--- a/tmk_core/common/chibios/bootloader.c
+++ b/platforms/chibios/bootloader.c
diff --git a/tmk_core/common/chibios/chibios_config.h b/platforms/chibios/chibios_config.h
index ad2f808a95..ad2f808a95 100644
--- a/tmk_core/common/chibios/chibios_config.h
+++ b/platforms/chibios/chibios_config.h
diff --git a/tmk_core/common/chibios/eeprom_stm32.c b/platforms/chibios/eeprom_stm32.c
index acc6a48516..acc6a48516 100644
--- a/tmk_core/common/chibios/eeprom_stm32.c
+++ b/platforms/chibios/eeprom_stm32.c
diff --git a/tmk_core/common/chibios/eeprom_stm32.h b/platforms/chibios/eeprom_stm32.h
index 8fcfb556b8..8fcfb556b8 100644
--- a/tmk_core/common/chibios/eeprom_stm32.h
+++ b/platforms/chibios/eeprom_stm32.h
diff --git a/tmk_core/common/chibios/eeprom_stm32_defs.h b/platforms/chibios/eeprom_stm32_defs.h
index 66904f247f..66904f247f 100644
--- a/tmk_core/common/chibios/eeprom_stm32_defs.h
+++ b/platforms/chibios/eeprom_stm32_defs.h
diff --git a/tmk_core/common/chibios/eeprom_teensy.c b/platforms/chibios/eeprom_teensy.c
index 97da6f9e14..97da6f9e14 100644
--- a/tmk_core/common/chibios/eeprom_teensy.c
+++ b/platforms/chibios/eeprom_teensy.c
diff --git a/tmk_core/common/chibios/flash_stm32.c b/platforms/chibios/flash_stm32.c
index 72c41b8b78..72c41b8b78 100644
--- a/tmk_core/common/chibios/flash_stm32.c
+++ b/platforms/chibios/flash_stm32.c
diff --git a/tmk_core/common/chibios/flash_stm32.h b/platforms/chibios/flash_stm32.h
index 6c66642ec5..6c66642ec5 100644
--- a/tmk_core/common/chibios/flash_stm32.h
+++ b/platforms/chibios/flash_stm32.h
diff --git a/tmk_core/common/chibios/gd32v_compatibility.h b/platforms/chibios/gd32v_compatibility.h
index f4dcfd8c55..f4dcfd8c55 100644
--- a/tmk_core/common/chibios/gd32v_compatibility.h
+++ b/platforms/chibios/gd32v_compatibility.h
diff --git a/tmk_core/common/chibios/gpio.h b/platforms/chibios/gpio.h
index 4d057f1cab..4d057f1cab 100644
--- a/tmk_core/common/chibios/gpio.h
+++ b/platforms/chibios/gpio.h
diff --git a/tmk_core/common/chibios/pin_defs.h b/platforms/chibios/pin_defs.h
index c03f8de0c2..c03f8de0c2 100644
--- a/tmk_core/common/chibios/pin_defs.h
+++ b/platforms/chibios/pin_defs.h
diff --git a/tmk_core/common/chibios/platform.c b/platforms/chibios/platform.c
index d4a229f278..d4a229f278 100644
--- a/tmk_core/common/chibios/platform.c
+++ b/platforms/chibios/platform.c
diff --git a/tmk_core/chibios.mk b/platforms/chibios/platform.mk
index 6b298732c2..6b298732c2 100644
--- a/tmk_core/chibios.mk
+++ b/platforms/chibios/platform.mk
diff --git a/tmk_core/common/chibios/platform_deps.h b/platforms/chibios/platform_deps.h
index 8243dcec53..8243dcec53 100644
--- a/tmk_core/common/chibios/platform_deps.h
+++ b/platforms/chibios/platform_deps.h
diff --git a/tmk_core/common/chibios/sleep_led.c b/platforms/chibios/sleep_led.c
index 477056a454..477056a454 100644
--- a/tmk_core/common/chibios/sleep_led.c
+++ b/platforms/chibios/sleep_led.c
diff --git a/tmk_core/common/chibios/suspend.c b/platforms/chibios/suspend.c
index 9310a99920..9310a99920 100644
--- a/tmk_core/common/chibios/suspend.c
+++ b/platforms/chibios/suspend.c
diff --git a/tmk_core/common/chibios/syscall-fallbacks.c b/platforms/chibios/syscall-fallbacks.c
index 4569879c7c..4569879c7c 100644
--- a/tmk_core/common/chibios/syscall-fallbacks.c
+++ b/platforms/chibios/syscall-fallbacks.c
diff --git a/tmk_core/common/chibios/timer.c b/platforms/chibios/timer.c
index 9f664e1f79..9f664e1f79 100644
--- a/tmk_core/common/chibios/timer.c
+++ b/platforms/chibios/timer.c
diff --git a/tmk_core/common/chibios/wait.c b/platforms/chibios/wait.c
index 56fd6ffcec..56fd6ffcec 100644
--- a/tmk_core/common/chibios/wait.c
+++ b/platforms/chibios/wait.c
diff --git a/platforms/common.mk b/platforms/common.mk
new file mode 100644
index 0000000000..f7a0fc7028
--- /dev/null
+++ b/platforms/common.mk
@@ -0,0 +1,12 @@
+PLATFORM_COMMON_DIR = $(PLATFORM_PATH)/$(PLATFORM_KEY)
+
+TMK_COMMON_SRC += \
+ $(PLATFORM_COMMON_DIR)/platform.c \
+ $(PLATFORM_COMMON_DIR)/suspend.c \
+ $(PLATFORM_COMMON_DIR)/timer.c \
+ $(PLATFORM_COMMON_DIR)/bootloader.c \
+
+# Search Path
+VPATH += $(PLATFORM_PATH)
+VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)
+VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)
diff --git a/tmk_core/common/eeprom.h b/platforms/eeprom.h
index f5b3f0ad53..f5b3f0ad53 100644
--- a/tmk_core/common/eeprom.h
+++ b/platforms/eeprom.h
diff --git a/tmk_core/common/gpio.h b/platforms/gpio.h
index b47f6f8e43..b47f6f8e43 100644
--- a/tmk_core/common/gpio.h
+++ b/platforms/gpio.h
diff --git a/tmk_core/common/pin_defs.h b/platforms/pin_defs.h
index ea730138f2..ea730138f2 100644
--- a/tmk_core/common/pin_defs.h
+++ b/platforms/pin_defs.h
diff --git a/tmk_core/common/progmem.h b/platforms/progmem.h
index a70d8e299f..a70d8e299f 100644
--- a/tmk_core/common/progmem.h
+++ b/platforms/progmem.h
diff --git a/tmk_core/common/sleep_led.h b/platforms/sleep_led.h
index 38f80a660d..38f80a660d 100644
--- a/tmk_core/common/sleep_led.h
+++ b/platforms/sleep_led.h
diff --git a/tmk_core/common/suspend.h b/platforms/suspend.h
index 081735f90e..081735f90e 100644
--- a/tmk_core/common/suspend.h
+++ b/platforms/suspend.h
diff --git a/tmk_core/common/test/_wait.h b/platforms/test/_wait.h
index 4e22f593b7..4e22f593b7 100644
--- a/tmk_core/common/test/_wait.h
+++ b/platforms/test/_wait.h
diff --git a/tmk_core/common/test/bootloader.c b/platforms/test/bootloader.c
index 5155d9ff04..5155d9ff04 100644
--- a/tmk_core/common/test/bootloader.c
+++ b/platforms/test/bootloader.c
diff --git a/tmk_core/common/test/eeprom.c b/platforms/test/eeprom.c
index 5c8e69dae3..5c8e69dae3 100644
--- a/tmk_core/common/test/eeprom.c
+++ b/platforms/test/eeprom.c
diff --git a/tmk_core/common/test/eeprom_stm32_tests.cpp b/platforms/test/eeprom_stm32_tests.cpp
index 5bc8d87900..5bc8d87900 100644
--- a/tmk_core/common/test/eeprom_stm32_tests.cpp
+++ b/platforms/test/eeprom_stm32_tests.cpp
diff --git a/tmk_core/common/test/flash_stm32_mock.c b/platforms/test/flash_stm32_mock.c
index 222a004bc7..222a004bc7 100644
--- a/tmk_core/common/test/flash_stm32_mock.c
+++ b/platforms/test/flash_stm32_mock.c
diff --git a/tmk_core/common/test/hal.h b/platforms/test/hal.h
index 2d268ad54c..2d268ad54c 100644
--- a/tmk_core/common/test/hal.h
+++ b/platforms/test/hal.h
diff --git a/tmk_core/common/test/platform.c b/platforms/test/platform.c
index 8ddceeda8f..8ddceeda8f 100644
--- a/tmk_core/common/test/platform.c
+++ b/platforms/test/platform.c
diff --git a/tmk_core/common/test/platform.h b/platforms/test/platform.h
index f296d1d535..f296d1d535 100644
--- a/tmk_core/common/test/platform.h
+++ b/platforms/test/platform.h
diff --git a/tmk_core/native.mk b/platforms/test/platform.mk
index eb2424ec5c..eb2424ec5c 100644
--- a/tmk_core/native.mk
+++ b/platforms/test/platform.mk
diff --git a/tmk_core/common/test/platform_deps.h b/platforms/test/platform_deps.h
index f296d1d535..f296d1d535 100644
--- a/tmk_core/common/test/platform_deps.h
+++ b/platforms/test/platform_deps.h
diff --git a/tmk_core/common/test/rules.mk b/platforms/test/rules.mk
index 73d2302da7..66b853d8ee 100644
--- a/tmk_core/common/test/rules.mk
+++ b/platforms/test/rules.mk
@@ -11,14 +11,14 @@ eeprom_stm32_large_DEFS := $(eeprom_stm32_DEFS) \
-DFEE_PAGE_COUNT=16
eeprom_stm32_INC := \
- $(TMK_PATH)/common/chibios/
+ $(PLATFORM_PATH)/chibios/
eeprom_stm32_tiny_INC := $(eeprom_stm32_INC)
eeprom_stm32_large_INC := $(eeprom_stm32_INC)
eeprom_stm32_SRC := \
$(TOP_DIR)/drivers/eeprom/eeprom_driver.c \
- $(TMK_PATH)/common/test/eeprom_stm32_tests.cpp \
- $(TMK_PATH)/common/test/flash_stm32_mock.c \
- $(TMK_PATH)/common/chibios/eeprom_stm32.c
+ $(PLATFORM_PATH)/$(PLATFORM_KEY)/eeprom_stm32_tests.cpp \
+ $(PLATFORM_PATH)/$(PLATFORM_KEY)/flash_stm32_mock.c \
+ $(PLATFORM_PATH)/chibios/eeprom_stm32.c
eeprom_stm32_tiny_SRC := $(eeprom_stm32_SRC)
eeprom_stm32_large_SRC := $(eeprom_stm32_SRC)
diff --git a/tmk_core/common/test/suspend.c b/platforms/test/suspend.c
index 76b705967b..76b705967b 100644
--- a/tmk_core/common/test/suspend.c
+++ b/platforms/test/suspend.c
diff --git a/tmk_core/common/test/testlist.mk b/platforms/test/testlist.mk
index 51a9638bb9..51a9638bb9 100644
--- a/tmk_core/common/test/testlist.mk
+++ b/platforms/test/testlist.mk
diff --git a/tmk_core/common/test/timer.c b/platforms/test/timer.c
index 61c3a00201..61c3a00201 100644
--- a/tmk_core/common/test/timer.c
+++ b/platforms/test/timer.c
diff --git a/tmk_core/common/timer.h b/platforms/timer.h
index 02e39e79e7..02e39e79e7 100644
--- a/tmk_core/common/timer.h
+++ b/platforms/timer.h
diff --git a/tmk_core/common/wait.h b/platforms/wait.h
index cf7180fb07..cf7180fb07 100644
--- a/tmk_core/common/wait.h
+++ b/platforms/wait.h
diff --git a/quantum/debounce/tests/rules.mk b/quantum/debounce/tests/rules.mk
index 66928d7eb6..e908dd6f67 100644
--- a/quantum/debounce/tests/rules.mk
+++ b/quantum/debounce/tests/rules.mk
@@ -16,7 +16,7 @@
DEBOUNCE_COMMON_DEFS := -DMATRIX_ROWS=4 -DMATRIX_COLS=10 -DDEBOUNCE=5
DEBOUNCE_COMMON_SRC := $(QUANTUM_PATH)/debounce/tests/debounce_test_common.cpp \
- $(TMK_PATH)/common/test/timer.c
+ $(PLATFORM_PATH)/$(PLATFORM_KEY)/timer.c
debounce_sym_defer_g_DEFS := $(DEBOUNCE_COMMON_DEFS)
debounce_sym_defer_g_SRC := $(DEBOUNCE_COMMON_SRC) \
diff --git a/quantum/dynamic_keymap.c b/quantum/dynamic_keymap.c
index b7a9f2662c..f5525576d8 100644
--- a/quantum/dynamic_keymap.c
+++ b/quantum/dynamic_keymap.c
@@ -16,7 +16,7 @@
#include "config.h"
#include "keymap.h" // to get keymaps[][][]
-#include "tmk_core/common/eeprom.h"
+#include "eeprom.h"
#include "progmem.h" // to read default from flash
#include "quantum.h" // for send_string()
#include "dynamic_keymap.h"
diff --git a/quantum/sequencer/tests/rules.mk b/quantum/sequencer/tests/rules.mk
index 87a204669c..a3bbd80513 100644
--- a/quantum/sequencer/tests/rules.mk
+++ b/quantum/sequencer/tests/rules.mk
@@ -8,4 +8,4 @@ sequencer_SRC := \
$(QUANTUM_PATH)/sequencer/tests/midi_mock.c \
$(QUANTUM_PATH)/sequencer/tests/sequencer_tests.cpp \
$(QUANTUM_PATH)/sequencer/sequencer.c \
- $(TMK_PATH)/common/test/timer.c
+ $(PLATFORM_PATH)/$(PLATFORM_KEY)/timer.c
diff --git a/quantum/via.c b/quantum/via.c
index 1b2dbcf08d..7c8aa753e7 100644
--- a/quantum/via.c
+++ b/quantum/via.c
@@ -44,7 +44,7 @@
#include "raw_hid.h"
#include "dynamic_keymap.h"
-#include "tmk_core/common/eeprom.h"
+#include "eeprom.h"
#include "version.h" // for QMK_BUILDDATE used in EEPROM magic
#include "via_ensure_keycode.h"
diff --git a/testlist.mk b/testlist.mk
index 364fb339c6..faff4d201c 100644
--- a/testlist.mk
+++ b/testlist.mk
@@ -1,9 +1,9 @@
TEST_LIST = $(notdir $(patsubst %/rules.mk,%,$(wildcard $(ROOT_DIR)/tests/*/rules.mk)))
FULL_TESTS := $(TEST_LIST)
-include $(ROOT_DIR)/quantum/debounce/tests/testlist.mk
-include $(ROOT_DIR)/quantum/sequencer/tests/testlist.mk
-include $(ROOT_DIR)/tmk_core/common/test/testlist.mk
+include $(QUANTUM_PATH)/debounce/tests/testlist.mk
+include $(QUANTUM_PATH)/sequencer/tests/testlist.mk
+include $(PLATFORM_PATH)/test/testlist.mk
define VALIDATE_TEST_LIST
ifneq ($1,)
diff --git a/tmk_core/common.mk b/tmk_core/common.mk
deleted file mode 100644
index 555b942c9d..0000000000
--- a/tmk_core/common.mk
+++ /dev/null
@@ -1,16 +0,0 @@
-COMMON_DIR = common
-PLATFORM_COMMON_DIR = $(COMMON_DIR)/$(PLATFORM_KEY)
-
-TMK_COMMON_SRC += \
- $(PLATFORM_COMMON_DIR)/platform.c \
- $(PLATFORM_COMMON_DIR)/suspend.c \
- $(PLATFORM_COMMON_DIR)/timer.c \
- $(PLATFORM_COMMON_DIR)/bootloader.c \
-
-# Use platform provided print if it exists
--include $(TMK_PATH)/$(PLATFORM_COMMON_DIR)/printf.mk
-
-# Search Path
-VPATH += $(TMK_PATH)/$(COMMON_DIR)
-VPATH += $(TMK_PATH)/$(PLATFORM_COMMON_DIR)
-VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)
diff --git a/tmk_core/protocol.mk b/tmk_core/protocol.mk
index a8723e6b2e..31a6de76f1 100644
--- a/tmk_core/protocol.mk
+++ b/tmk_core/protocol.mk
@@ -1,5 +1,3 @@
-PROTOCOL_DIR = protocol
-
TMK_COMMON_SRC += \
$(PROTOCOL_DIR)/host.c \
$(PROTOCOL_DIR)/report.c \
diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk
index e657af3f43..6767a8e4af 100644
--- a/tmk_core/rules.mk
+++ b/tmk_core/rules.mk
@@ -479,7 +479,7 @@ ifeq ($(findstring avr-gcc,$(CC)),avr-gcc)
SIZE_MARGIN = 1024
check-size:
- $(eval MAX_SIZE=$(shell n=`$(CC) -E -mmcu=$(MCU) -D__ASSEMBLER__ $(CFLAGS) $(OPT_DEFS) tmk_core/common/avr/bootloader_size.c 2> /dev/null | sed -ne 's/\r//;/^#/n;/^AVR_SIZE:/,$${s/^AVR_SIZE: //;p;}'` && echo $$(($$n)) || echo 0))
+ $(eval MAX_SIZE=$(shell n=`$(CC) -E -mmcu=$(MCU) -D__ASSEMBLER__ $(CFLAGS) $(OPT_DEFS) platforms/avr/bootloader_size.c 2> /dev/null | sed -ne 's/\r//;/^#/n;/^AVR_SIZE:/,$${s/^AVR_SIZE: //;p;}'` && echo $$(($$n)) || echo 0))
$(eval CURRENT_SIZE=$(shell if [ -f $(BUILD_DIR)/$(TARGET).hex ]; then $(SIZE) --target=$(FORMAT) $(BUILD_DIR)/$(TARGET).hex | $(AWK) 'NR==2 {print $$4}'; else printf 0; fi))
$(eval FREE_SIZE=$(shell expr $(MAX_SIZE) - $(CURRENT_SIZE)))
$(eval OVER_SIZE=$(shell expr $(CURRENT_SIZE) - $(MAX_SIZE)))