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
commit 09ffe3b086
8 changed files with 47 additions and 21 deletions

View File

@ -5,21 +5,21 @@
**操作系统:** ubuntu18.04 [ https://ubuntu.com/download/desktop](https://ubuntu.com/download/desktop)
调试工具JLink实物如图
</br>
<div align=center><img src="https://img-blog.csdnimg.cn/20210427215116310.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0FJSVRfVWJpcXVpdG91cw==,size_16,color_FFFFFF,t_70" /></div>
</br>
![img](https://img-blog.csdnimg.cn/20210427215116310.png)
调试开发板KD233实物如图
</br>
<div align=center><img src="https://img-blog.csdnimg.cn/20210427215138289.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0FJSVRfVWJpcXVpdG91cw==,size_16,color_FFFFFF,t_70" /></div>
![img](https://img-blog.csdnimg.cn/20210430203005560.png)
# 调试步骤
## 步骤一
1.下载JLink驱动Ubuntu下载DEB包
下载地址:[SEGGER - The Embedded Experts - Downloads - J-Link / J-Trace](https://www.segger.com/downloads/jlink),[推荐下载地址 http://101.36.126.201:8011/JLink_Linux_V720_x86_64.deb](http://101.36.126.201:8011/JLink_Linux_V720_x86_64.deb)
</br>
<div align=center><img src="https://img-blog.csdnimg.cn/20210427214025688.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0FJSVRfVWJpcXVpdG91cw==,size_16,color_FFFFFF,t_70#pic_center" /></div>
</br>
![img](https://img-blog.csdnimg.cn/20210427214025688.png)
2.安装JLink驱动
```bash
@ -46,9 +46,9 @@ J-Link>
1.安装openocd下载Ubuntu版本64位
下载地址:[Releases · kendryte/openocd-kendryte (github.com)](https://github.com/kendryte/openocd-kendryte/releases),推荐下载地址为:[http://101.36.126.201:8011/kendryte-openocd-0.2.3-ubuntu64.tar.gz](http://101.36.126.201:8011/kendryte-openocd-0.2.3-ubuntu64.tar.gz)
</br>
<div align=center><img src="https://img-blog.csdnimg.cn/20210427214045491.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0FJSVRfVWJpcXVpdG91cw==,size_16,color_FFFFFF,t_70#pic_center" /></div>
</br>
![img](https://img-blog.csdnimg.cn/20210427214045491.png)
2.安装openocd
```bash
@ -63,7 +63,7 @@ $ sudo tar -zxvf kendryte-openocd-0.2.3-ubuntu64.tar.gz
$ sudo vim /opt/kendryte-openocd/tcl/openocd.cfg
```
<div align=center><img src="https://img-blog.csdnimg.cn/20210427214102777.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0FJSVRfVWJpcXVpdG91cw==,size_16,color_FFFFFF,t_70#pic_center" /></div>
![img](https://img-blog.csdnimg.cn/20210501164846463.png)
</br>
序列号从JLink的背面标签可以查看也可以在JLink连接计算机后敲击JLinkExe命令看到。

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)

View File

@ -17,7 +17,6 @@ AIIT ARM-board是基于STM32F407ZGT6设计的一款低功耗智能物联网终
AIIT ARM-board拥有的资源包括
* 集成在芯片内部的 FPU 和 DSP 指令集
* 存储大小: 192KB + 1 MB SRAM、 512K +2MB FLASH
* 摄像头接口: 1个
* 定时器12 个 16 位定时器、 2 个 32 位高级定时器
* IIC硬件控制器 3 个
* DMA 控制器: 2 个 (共 16 个通道每个DMA8个通道