From: Shihpin Tseng <deftsp@gmail.com>
Date: Fri, 8 Feb 2019 16:12:43 +0000 (+0800)
Subject: Enable custom chibios sub-platform
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=68fad7b777e629b9837b1f60080a21386002c444;p=qmk_firmware.git

Enable custom chibios sub-platform
---

diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk
index 0f665450a..01edebfd7 100644
--- a/tmk_core/chibios.mk
+++ b/tmk_core/chibios.mk
@@ -39,9 +39,13 @@ include $(STARTUP_MK)
 # HAL-OSAL files (optional).
 include $(CHIBIOS)/os/hal/hal.mk
 
-PLATFORM_MK = $(CHIBIOS)/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)/platform.mk
+ifeq ("$(PLATFORM_NAME)","")
+	PLATFORM_NAME = platform
+endif
+
+PLATFORM_MK = $(CHIBIOS)/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)/$(PLATFORM_NAME).mk
 ifeq ("$(wildcard $(PLATFORM_MK))","")
-PLATFORM_MK = $(CHIBIOS_CONTRIB)/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)/platform.mk
+PLATFORM_MK = $(CHIBIOS_CONTRIB)/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)/$(PLATFORM_NAME).mk
 endif
 include $(PLATFORM_MK)