Merge pull request 'Modify the documentation of jlink-kd233 and stm32f407-discovery' (#32) from TangYiwen123/xuos-web:develop into master

This commit is contained in:
leebaok
2021-05-06 17:28:08 +08:00
8 changed files with 47 additions and 21 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

View File

@@ -64,7 +64,7 @@ git clone https://git.trustie.net/xuos/xiuos.git
| resources | 驱动文件 |
| tool | 系统工具 |
使用VScode打开代码具体操作步骤为在源码文件夹下打开系统终端输入`code .`即可打开VScode开发环境如下图所示
<div align= "center"><img src = https://img-blog.csdnimg.cn/20210429154839715.jpg width =1000></div>
![img](https://img-blog.csdnimg.cn/20210429154839715.jpg)
### 裁减配置工具的下载
@@ -118,8 +118,10 @@ XiUOS板级驱动当前支持使用GPIO、I2C、LCD、USB、RTC、SPI、Timer、
修改`applications`文件夹下`main.c`
在输出函数中写入 `Hello, world!!! \n Running on stm32f407-st-discovery`完成代码编辑。
<div align=center>![在这里插入图片描述](https://img-blog.csdnimg.cn/20210428145204668.png)</div>
![img](./img/code.png)
编译步骤:
1.在代码根目录下执行以下命令,生成配置文件
@@ -130,9 +132,34 @@ XiUOS板级驱动当前支持使用GPIO、I2C、LCD、USB、RTC、SPI、Timer、
2.在menuconfig界面配置需要关闭和开启的功能按回车键进入下级菜单按Y键选中需要开启的功能按N键选中需要关闭的功能配置结束后保存并退出
<div align=center>![在这里插入图片描述](https://img-blog.csdnimg.cn/20210426212955727.png?x-oss-process=none,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L1ViaXF1aXRvdXNUZWFt,size_16,color_FFFFFF,t_70)</div>
![img](./img/menuconfig.png)
3.继续执行以下命令,进行编译
退出时选择`yes`保存上面所配置的内容,如下图所示:
![img](./img/save_menu.jpg)
若执行 `make BOARD=hifive1-emulator menuconfig`后出现以下界面:
![img](./img/menu_error.png)
解决的方法是将终端向上拉伸超过当前界面的三分之二以上,效果如下:
![img](./img/solution.png)
3.继续在VScode中执行以下命令进行编译
```bash
make BOARD=stm32f407-st-discovery
@@ -143,12 +170,12 @@ make BOARD=stm32f407-st-discovery
## 3. 烧写及执行
将 BOARD=stm32f407-st-discovery开发板SWD经 st-link 转接到USB接口然后使用st-flash工具进行烧写bin文件。
<div align=center>![在这里插入图片描述](https://img-blog.csdnimg.cn/2021042716353240.png?x-oss-process=none,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0FJSVRfVWJpcXVpdG91cw==,size_16,color_FFFFFF,t_70)</div>
![在这里插入图片描述](https://img-blog.csdnimg.cn/2021042716353240.png)
### 烧写工具
ARMST-LINKST-LINK V2实物如图可在购物网站搜索关键字购买
<div align=center>![在这里插入图片描述](https://img-blog.csdnimg.cn/20210427144736126.png)</div>
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210427144736126.png)
下载并以下执行命令以下命令安装st-link工具(本文使用v1.5.1版本),下载地址为:[http://101.36.126.201:8011/stlink.zip](http://101.36.126.201:8011/stlink.zip)
@@ -182,7 +209,7 @@ sudo puty
```
选择ttyUSB0这个端口号根据具体情况而定配置波特率为115200。
<div align=center>![在这里插入图片描述](https://img-blog.csdnimg.cn/2021042815015872.png?x-oss-process=none,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0FJSVRfVWJpcXVpdG91cw==,size_16,color_FFFFFF,t_70)</div>
![在这里插入图片描述](https://img-blog.csdnimg.cn/2021042815015872.png)
注意:选择正确的终端端口号,最后可以执行以下命令,清除配置文件和编译生成的文件
@@ -193,4 +220,4 @@ make BOARD=stm32f407-st-discovery distclean
### 3.1 运行结果
如果编译 & 烧写无误,将会在串口终端上看到信息打印输出,(终端串口引脚为PB6、PB7)。
<div align=center>![在这里插入图片描述](https://img-blog.csdnimg.cn/20210426213212239.PNG?x-oss-process=none,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L1ViaXF1aXRvdXNUZWFt,size_16,color_FFFFFF,t_70)</div>
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210426213212239.PNG)