qmk build system

This commit is contained in:
huangjimin
2020-07-15 16:51:41 +08:00
parent 25f293d49a
commit d895c15e4f
27 changed files with 3320 additions and 136 deletions

View File

@@ -43,7 +43,7 @@
extern QSPI_HandleTypeDef hqspi;
/* This function is called by inner-HAL lib */
static void HAL_QSPI_MspInit(QSPI_HandleTypeDef* qspiHandle)
void HAL_QSPI_MspInit(QSPI_HandleTypeDef* qspiHandle)
{
GPIO_InitTypeDef GPIO_InitStruct;
@@ -75,7 +75,7 @@ static void HAL_QSPI_MspInit(QSPI_HandleTypeDef* qspiHandle)
}
/* This function is called by inner-HAL lib */
static void HAL_QSPI_MspDeInit(QSPI_HandleTypeDef* qspiHandle)
void HAL_QSPI_MspDeInit(QSPI_HandleTypeDef* qspiHandle)
{
if(qspiHandle->Instance==QUADSPI)

View File

@@ -0,0 +1,47 @@
###################################################################
#automatic detection QTOP and LOCALDIR
CUR_DIR := $(patsubst %/,%,$(dir $(realpath $(firstword $(MAKEFILE_LIST)))))
TRYQTOP := $(shell if [ -n "$$QTOP" ] ; then\
echo $$QTOP;\
else\
cd $(CUR_DIR); while /usr/bin/test ! -d qmk ; do \
dir=`cd ../;pwd`; \
if [ "$$dir" = "/" ] ; then \
echo Cannot find QTOP in $(firstword $(MAKEFILE_LIST)) 1>&2; \
exit 1; \
fi ; \
cd $$dir; \
done ; \
pwd; \
fi)
QTOP ?= $(realpath ${TRYQTOP})
ifeq ($(QTOP),)
$(error Please run this in a tree)
endif
LOCALDIR = $(patsubst %/,%,$(subst $(realpath $(QTOP))/,,$(CUR_DIR)))
####################################################################
TREE_LIB_ENABLE=0
lib=
subdirs=
ifneq (help,$(findstring help,$(MAKECMDGOALS)))
ifeq (, $(strip ${BP}))
$(error when compile arch/, must specify BP and BSP_LSRCS obviously , see `make help`)
endif
include ${QTOP}/qmk/board-pack/bp.${BP}
ifeq (,$(strip ${BSP_LSRCS}))
$(error when compile arch/, must specify BP and BSP_LSRCS obviously , see `make help`)
endif
endif
# arch src should be specify by bp
LSRCS := $(sort $(subst $(QTOP)/$(LOCALDIR)/,, ${BSP_LSRCS}))
include ${QTOP}/qmk/generic/Make.tpl

View File

@@ -16,6 +16,7 @@
*
******************************************************************************
*/
#if TOS_CFG_EVENT_DRIVEN_EN > 0u
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
@@ -301,3 +302,5 @@ void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
}
/* USER CODE END 1 */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
#endif