improve qmk documentation
This commit is contained in:
@@ -30,13 +30,13 @@ subdirs=
|
|||||||
ifneq (help,$(findstring help,$(MAKECMDGOALS)))
|
ifneq (help,$(findstring help,$(MAKECMDGOALS)))
|
||||||
|
|
||||||
ifeq (, $(strip ${BP}))
|
ifeq (, $(strip ${BP}))
|
||||||
$(error when compile arch/, must specify BP and BSP_LSRCS obviously , see `make help`)
|
$(error when compile BSP/, must specify BP obviously , see `make help`)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include ${QTOP}/qmk/board-pack/bp.${BP}
|
include ${QTOP}/qmk/board-pack/bp.${BP}
|
||||||
|
|
||||||
ifeq (,$(strip ${BSP_LSRCS}))
|
ifeq (,$(strip ${BSP_LSRCS}))
|
||||||
$(error when compile arch/, must specify BP and BSP_LSRCS obviously , see `make help`)
|
$(error when compile BSP/, must specify BSP_LSRCS on your bp.${BP}, see `make help`)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
### Qmk 是什么
|
### Qmk 是什么
|
||||||
|
|
||||||
qmk, 是TecentOS的一个Makefile编译框架。
|
[qmk](../../qmk), 是TecentOS的一个Makefile编译框架。
|
||||||
|
|
||||||
### Qmk 的特点
|
### Qmk 的特点
|
||||||
- 使用简单,任意目录均可make,支持帮助`make help`;
|
- 使用简单,任意目录均可make,支持帮助`make help`;
|
||||||
@@ -77,6 +77,16 @@ make help
|
|||||||
要求对所有board、所有gcc-toolchain、cpu、arch、bsp适用。
|
要求对所有board、所有gcc-toolchain、cpu、arch、bsp适用。
|
||||||
所以一般只包含通用的规则。
|
所以一般只包含通用的规则。
|
||||||
|
|
||||||
|
| 模板文件 |说明|
|
||||||
|
| :-------- |:------|
|
||||||
|
|[Make.tpl](../../qmk/generic/Make.tpl) | 一个目录或者多个目录编译成`.a`的通用模板 |
|
||||||
|
|[Make.exec](../../qmk/generic/Make.exec) | 多个`.a`链接成 `elf`,生成`.bin`的通用模板 |
|
||||||
|
|[Make.lib](../../qmk/generic/Make.lib) | 处理多个`.o`生成`.a`的通用模板|
|
||||||
|
|[Make.subdirs](../../qmk/generic/Make.subdirs) | 处理 make递归进入多个subdir make的通用模板|
|
||||||
|
|[Make.depend](../../qmk/generic/Make.depend) | 处理 一个`.o`依赖多个`.h`,的规则模板 |
|
||||||
|
|[Make.debug](../../qmk/generic/Make.debug) | 用于调试Makefile的模板|
|
||||||
|
|[Make.tools](../../qmk/generic/Make.debug) | 用于屏蔽在多种OS使用qmk,sed、等基础shell/cli命令路径不同 |
|
||||||
|
|
||||||
|
|
||||||
### boardpack-Makefile(mk/board-pack)
|
### boardpack-Makefile(mk/board-pack)
|
||||||
`board-pack/bp.TencentOS_tiny_EVB_MX_Plus` 属于这类。
|
`board-pack/bp.TencentOS_tiny_EVB_MX_Plus` 属于这类。
|
||||||
@@ -309,25 +319,26 @@ board-pack 是对 board 在编译时的一个抽象。
|
|||||||
|
|
||||||
|
|
||||||
## qmk的 make 命令行参数
|
## qmk的 make 命令行参数
|
||||||
```cookie
|
```shell
|
||||||
make help
|
make help
|
||||||
```
|
```
|
||||||
### make V=1 E=1
|
### make V=1 E=1
|
||||||
```cookie
|
```shell
|
||||||
# verbose打印编译时的命令
|
# verbose打印编译时的命令
|
||||||
make V=1
|
make V=1
|
||||||
# 调试头文件包含,宏扩展时很有用,会在生成`.o`文件的同时生成`.i`预处理文件
|
# 调试头文件包含,宏扩展时很有用,会在生成`.o`文件的同时生成`.i`预处理文件
|
||||||
make E=1
|
make E=1
|
||||||
```
|
```
|
||||||
```cookie
|
```shell
|
||||||
# verbose打印链接时的库搜索过程
|
# verbose打印链接时的库搜索过程
|
||||||
make V=2
|
make V=2
|
||||||
make V=3
|
make V=3
|
||||||
```
|
```
|
||||||
## 调试Makefile
|
## 调试Makefile
|
||||||
```cookie
|
```shell
|
||||||
#进入含Makefile的目录
|
#进入含Makefile的目录
|
||||||
make BP=TencentOS_tiny_EVB_MX_Plus dm
|
make BP=TencentOS_tiny_EVB_MX_Plus dm
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Qmk 后续
|
## Qmk 后续
|
||||||
|
@@ -30,13 +30,13 @@ subdirs=
|
|||||||
ifneq (help,$(findstring help,$(MAKECMDGOALS)))
|
ifneq (help,$(findstring help,$(MAKECMDGOALS)))
|
||||||
|
|
||||||
ifeq (, $(strip ${BP}))
|
ifeq (, $(strip ${BP}))
|
||||||
$(error when compile arch/, must specify BP obviously , see `make help`)
|
$(error when compile platform/, must specify BP obviously , see `make help`)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include ${QTOP}/qmk/board-pack/bp.${BP}
|
include ${QTOP}/qmk/board-pack/bp.${BP}
|
||||||
|
|
||||||
ifeq (,$(strip ${PLATFORM_HAL_LSRCS}))
|
ifeq (,$(strip ${PLATFORM_HAL_LSRCS}))
|
||||||
$(error when compile arch/, must specify PLATFORM_HAL_LSRCS on your bp.${BP} , see `make help`)
|
$(error when compile platform/, must specify PLATFORM_HAL_LSRCS on your bp.${BP} , see `make help`)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@@ -30,13 +30,13 @@ subdirs=
|
|||||||
ifneq (help,$(findstring help,$(MAKECMDGOALS)))
|
ifneq (help,$(findstring help,$(MAKECMDGOALS)))
|
||||||
|
|
||||||
ifeq (, $(strip ${BP}))
|
ifeq (, $(strip ${BP}))
|
||||||
$(error when compile arch/, must specify BP obviously, see `make help`)
|
$(error when compile platform/, must specify BP obviously, see `make help`)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include ${QTOP}/qmk/board-pack/bp.${BP}
|
include ${QTOP}/qmk/board-pack/bp.${BP}
|
||||||
|
|
||||||
ifeq (,$(strip ${PLATFORM_VENDOR_BSP_LSRCS}))
|
ifeq (,$(strip ${PLATFORM_VENDOR_BSP_LSRCS}))
|
||||||
$(error when compile arch/, must specify PLATFORM_VENDOR_BSP_LSRCS on your bp.${BP}, see `make help`)
|
$(error when compile platform/, must specify PLATFORM_VENDOR_BSP_LSRCS on your bp.${BP}, see `make help`)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
# QMK for TencentOS
|
# QMK for TencentOS
|
||||||
# @author Jimmin.huang jimmin@163.com
|
# @author Jimmin.huang jimminh@163.com
|
||||||
# Makefile template
|
# Makefile template
|
||||||
# aim for debug makefile
|
# aim for debug makefile
|
||||||
########################################################################
|
########################################################################
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
# QMK for TencentOS
|
# QMK for TencentOS
|
||||||
# @author Jimmin.huang jimmin@163.com
|
# @author Jimmin.huang jimminh@163.com
|
||||||
# Makefile template
|
# Makefile template
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
# QMK for TencentOS
|
# QMK for TencentOS
|
||||||
# @author Jimmin.huang jimmin@163.com
|
# @author Jimmin.huang jimminh@163.com
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
# Make rules/targets for handling user application
|
# Make rules/targets for handling user application
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
# QMK for TencentOS
|
# QMK for TencentOS
|
||||||
# @author Jimmin.huang jimmin@163.com
|
# @author Jimmin.huang jimminh@163.com
|
||||||
# Makefile template
|
# Makefile template
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
# QMK for TencentOS
|
# QMK for TencentOS
|
||||||
# @author Jimmin.huang jimmin@163.com
|
# @author Jimmin.huang jimminh@163.com
|
||||||
# Makefile template
|
# Makefile template
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
# QMK for TencentOS
|
# QMK for TencentOS
|
||||||
# @author Jimmin.huang jimmin@163.com
|
# @author Jimmin.huang jimminh@163.com
|
||||||
# Makefile template
|
# Makefile template
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
# QMK for TencentOS
|
# QMK for TencentOS
|
||||||
# @author Jimmin.huang jimmin@163.com
|
# @author Jimmin.huang jimminh@163.com
|
||||||
# Makefile template
|
# Makefile template
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
@@ -104,8 +104,6 @@ else
|
|||||||
BLDDIR = ${BLDROOT}
|
BLDDIR = ${BLDROOT}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LIBDIR = ${BLDROOT}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Reference in New Issue
Block a user