1.补充README。
This commit is contained in:
24
README.md
24
README.md
@@ -1,5 +1,7 @@
|
||||
# MR 框架
|
||||
|
||||
[English](README_EN.md)
|
||||
|
||||
----------
|
||||
|
||||
<!-- TOC -->
|
||||
@@ -34,7 +36,7 @@
|
||||
|
||||
----------
|
||||
|
||||

|
||||

|
||||
|
||||
----------
|
||||
|
||||
@@ -78,9 +80,9 @@
|
||||
|
||||
`Kconfig` 会根据配置文件自动生成配置选项界面。开发者可以通过简单的操作来选择需要启用的功能组件和设置相关参数。
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
通过修改参数,快速裁剪所需功能。配置完成后通过 `Python` 脚本自动生成配置文件。
|
||||
|
||||
@@ -126,16 +128,16 @@
|
||||
1. 从 `Gitee` 或 `Github` 仓库下载最新版本源码到本地。
|
||||
2. 将源码导入到您工程所在的目录。以STM32工程为例:
|
||||
|
||||

|
||||

|
||||
|
||||
3. 如使用的芯片已经做了 `BSP` 适配请参考芯片对应 `BSP` 中的配置教程,完成 `BSP` 配置。
|
||||
4. 移除不需要的文件 `bsp`、`document`、`module` 目录(如不需要`GIT`也可以移除`.git`文件删除)。完成后,目录结构如下所示:
|
||||
|
||||

|
||||

|
||||
|
||||
5. 将文件加入到IDE中(大部分IDE都能自动识别工程路径下的文件,无需进行此步骤)。以 `keil` 为例:
|
||||
|
||||

|
||||

|
||||
|
||||
添加 `source`、`device`、`driver` 目录下的所有文件。
|
||||
|
||||
@@ -143,13 +145,13 @@
|
||||
|
||||
1. 在 `mr-library` 目录下打开命令行工具,运行 `menuconfig` 进行菜单配置。
|
||||
|
||||

|
||||

|
||||
|
||||
注:当添加对应芯片驱动的后,将显示 `Device configure` 和 `Driver configure`。对应 `Driver configure` 请参考 `BSP` 下教程。
|
||||
|
||||
2. 选中 `Device configure` 回车进入菜单,按照需要配置功能。
|
||||
|
||||

|
||||

|
||||
|
||||
3. 配置完成后,按 `Q` 退出菜单配置界面,按`Y` 保存配置。
|
||||
|
||||
@@ -161,7 +163,7 @@
|
||||
|
||||
1. 在编译器中添加 `mr-library` 的包含路径,以 `keil` 为例:
|
||||
|
||||

|
||||

|
||||
|
||||
2. 配置自动初始化(GCC环境),查找您工程下以 `.ld` 为后缀的连接脚本文件(通常为 `link.ld`),在脚本文件中添加代码:
|
||||
注:如果您的是在 `keil` 等,能够自动生成链接脚本的环境下,请跳过此步骤。
|
||||
@@ -176,11 +178,11 @@
|
||||
|
||||
示例:
|
||||
|
||||

|
||||

|
||||
|
||||
3. 配置GNU语法。如果您使用的是非 `GCC` 编译器,请使能GNU语法。以 `keil` 为例:
|
||||
|
||||

|
||||

|
||||
|
||||
4. 在您的工程中引入 `#include "include/mr_lib.h"`。
|
||||
5. 在 `main` 函数中添加 `mr_auto_init();` 自动初始化函数。
|
||||
|
||||
35
README_EN.md
35
README_EN.md
@@ -1,5 +1,7 @@
|
||||
# MR frame
|
||||
|
||||
[中文](README.md)
|
||||
|
||||
----------
|
||||
|
||||
<!-- TOC -->
|
||||
@@ -40,7 +42,7 @@ drivers. This greatly improves the reusability of software and its extensibility
|
||||
|
||||
----------
|
||||
|
||||

|
||||

|
||||
|
||||
----------
|
||||
|
||||
@@ -87,9 +89,9 @@ code.
|
||||
`Kconfig` will automatically generate the configuration options interface based on the configuration file. Developers
|
||||
can select the functional components that need to be enabled and set relevant parameters through simple operations.
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
By modifying parameters, you can quickly tailor the required functions. After the configuration is complete,
|
||||
the `Python` script automatically generates the configuration file.
|
||||
@@ -137,20 +139,27 @@ tutorials are based on applying Kconfig).
|
||||
1. Download the latest version source code from the Gitee or Github repository to the local.
|
||||
2. Import the source code into the directory where your project is located. Taking an STM32 project as an example:
|
||||
|
||||

|
||||

|
||||
|
||||
3. If the used chip has BSP adaptation, please refer to the chip's corresponding BSP configuration tutorial to complete
|
||||
the BSP configuration.
|
||||
4. Remove unnecessary files such as `bsp`、`document`、`module` directories (you can also remove the `.git` file to delete
|
||||
GIT if not needed). The directory structure is shown below after completion:
|
||||
|
||||

|
||||

|
||||
|
||||
5. Add the files to the IDE (most ides automatically recognize the files in the project path, eliminating the need for
|
||||
this step). Take `keil` for example:
|
||||
|
||||

|
||||
|
||||
Add all files in the `source`, `device`, `driver` directories.
|
||||
|
||||
## Configure Menu Options
|
||||
|
||||
1. Open the command line tool in the `mr-library` directory and run `menuconfig` to configure the menu.
|
||||
|
||||

|
||||

|
||||
|
||||
Note: When the corresponding chip driver is added, `Device configure` and `Driver configure` will be displayed.
|
||||
Please refer to the tutorial under `BSP` for `Driver configure`.
|
||||
@@ -158,7 +167,7 @@ tutorials are based on applying Kconfig).
|
||||
2. Enter the menu by pressing the Enter key on `Device configure`, and configure the desired functions according to
|
||||
needs.
|
||||
|
||||

|
||||

|
||||
|
||||
3. After configuration is complete, press `Q` to exit the menu configuration interface, press `Y` to save the
|
||||
configuration.
|
||||
@@ -172,7 +181,7 @@ tutorials are based on applying Kconfig).
|
||||
|
||||
1. Add the include paths of `mr-library` in the compiler, taking `keil` as an example:
|
||||
|
||||

|
||||

|
||||
|
||||
2. Configure automatic initialization (GCC environment), find the link script file with suffix `.ld` in your project
|
||||
directory (usually `link.ld`), and add the following code to the script file:
|
||||
@@ -187,10 +196,14 @@ tutorials are based on applying Kconfig).
|
||||
|
||||
Example:
|
||||
|
||||

|
||||

|
||||
|
||||
3. Include `#include "include/mr_lib.h"` in your project.
|
||||
4. Add the automatic initialization function `mr_auto_init();` in the main function.
|
||||
3. Configure the GNU syntax. If you are using a non-gcc compiler, enable GNU syntax. Take `keil` for example:
|
||||
|
||||

|
||||
|
||||
4. Include `#include "include/mr_lib.h"` in your project.
|
||||
5. Add the automatic initialization function `mr_auto_init();` in the main function.
|
||||
|
||||
----------
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 111 KiB After Width: | Height: | Size: 111 KiB |
Reference in New Issue
Block a user