diff --git a/xiuosiot-frontend/public/ar100.md b/xiuosiot-frontend/public/ar100.md index af60346..442c64f 100644 --- a/xiuosiot-frontend/public/ar100.md +++ b/xiuosiot-frontend/public/ar100.md @@ -67,7 +67,7 @@ source envsetup.sh //输入74,代表选择 rockchip_rk3568_dlm3568 ./build.sh lunch //输入3,代表选择 BoardConfig-rk3568-dlm3568-ddr4-A1.mk配置文件 ``` -![envsetup ](/static/img/envsetup.jpg) +![envsetup ](/src//assets/envsetup.jpg) `注:提前将 XiHuiTong_Linux_Support_Collaborate_With_XiUOS\Source_Code\rk3568_linux/dl目录拷贝到$SDK_PATH/buildroot/ 下,这个目录里是大量的压缩包,在编译内核时减少大量下载时间` diff --git a/xiuosiot-frontend/public/cm100.md b/xiuosiot-frontend/public/cm100.md new file mode 100644 index 0000000..de9a663 --- /dev/null +++ b/xiuosiot-frontend/public/cm100.md @@ -0,0 +1,113 @@ +# XiDaTong_ARM_Reference_Resource + +## 1. 矽达通介绍 + +矽达通外观图: + +![](https://s2.loli.net/2022/03/17/56PYhSplI1Ud89a.png) + +拆开后盖: + +![](https://s2.loli.net/2022/03/17/5SkJish7VqRfwrX.png) + +矽达通天线种类: + +![](https://s2.loli.net/2022/04/25/ZxdYhKQkIsDPgnl.png) + +天线位置: + +![](https://s2.loli.net/2022/04/25/mlSRIKUAyfXndir.png) + +矽达通烧录这里介绍两种方式,分别是 NXP-MCUBootUtility 和 Keil MDK5 + +## 2. NXP-MCUBootUtility 方式烧录 + +**[NXP-MCUBootUtility](https://github.com/JayHeng/NXP-MCUBootUtility/tree/v3.4.0)** 是一款开源免费的专为 NXP MCU 安全启动而设计的 GUI 工具。目前主要支持 i.MXRT、LPC、Kinetis 系列 MCU 芯片 + +> ### 测试环境 + +- Windows + +- NXP-MCUBootUtility v3.4.0 + +> ### 烧录流程 + +将矽达通串口 1 通过 usb 转串口连接至电脑,并在电脑端查看到相应端口,如下图,com15 + +![](https://s2.loli.net/2022/03/17/b2alJPrmvcEXh5Z.png)![](https://s2.loli.net/2022/03/17/lu2jfeGnyzHKZpD.png) + +打开 NXP-MCUBootUtility.exe + +确保一下配置选项正确,COM Port 记得选择上述对应的串口 + +![](https://s2.loli.net/2022/03/16/3z2NLbqlS4f6VGY.png) + +将拨码开关拨到 1 on 2 on 3 off 4 off 进入 Serial Download Programming(SDP) 模式, 重新连接电源 + +先点击 Connect to ROM,若连接成功按钮会变蓝 + +![](https://s2.loli.net/2022/03/16/9pefoEvilVYSOrh.png) + +> #### 2.1、NON-XIP 二进制文件烧写: +> +> 在 Application Image File 一栏中选择要烧录的 elf 文件,文件格式选择 .out(elf) from GCC ARM,然后点击 All-In-One Action 烧录即可 + +![](https://s2.loli.net/2022/03/16/SrEywuekORU2sNz.png) + +> #### 2.2、XIP 二进制文件烧写: +> +> 选择编译生成的 elf 或 bin 文件路径,按照图示步骤,将文件烧写至 Flash 中(link.lds 中已构造 Flash Bootable image,如有修改 Flash 相关配置需求,可修改./Ubiquitous/$(kernel)/xidatong/xip 目录内相关文件,无需 NXPBootUtility 再次构造),若烧写无误,则下列绿色进度条会执行到底。如下图所示: + +![](https://s2.loli.net/2022/03/22/FxYp3MqKd6zjoyv.png) + +烧录完后后,将拨码开关拨回 1 off 2 off 3 off 4 off 进入 nor-flash 启动模式,重新上电,即可从 QSPI Flash 启动程序,此时可以从串口看到调试信息 + +`注:由于采用串口烧录,在连接和烧录的时候记得先关闭串口调试工具` + +## 2. Keil MDK 方式烧录 + +Keil MDK 是一系列基于 Arm Cortex-M 的微控制器设备的完整软件开发环境,可以自行去官网 **[购买下载](https://www.keil.com/download/product/)** ,需要注意的是请选择使用 Keil MDK5.24a 及以上版本 + +开发板连接 CMSIS-DAP 调试器,如下图所示,连接 DIO/CLK/GND 对应的三个引脚即可 + +![](https://s2.loli.net/2022/03/17/V6sQ8R5SXHMbZdU.png) + +> ### 芯片支持包导入 + +去 keil 官网 [http://www.keil.com/dd2/pack/#/eula-container](http://www.keil.com/dd2/pack/#/eula-container) 下载对应的板级安装包 + +![](https://s2.loli.net/2022/03/17/Fofnw1ajkuyOLmi.png) + +注意: 安装包可能随时间推移,版本有所改动,可选择最新版本下载。 + +下载完成,安装即可。 + +> ### 烧写固件安装 + +将开发板烧写固件复制到 Keil5 安装目录 Keil_v5\ARM\Flash\MIMXRT_QSPIFLASH.FLM,该固件可以兼容 32M 以下 nor Flash 烧写。 + +例如: c:\Keil_v5\ARM\Flash\MIMXRT_QSPIFLASH.FLM + +> ### Keil 环境配置 + +查看仿真器是否连接成功: + +![](https://s2.loli.net/2022/03/17/xmQqBslFL1j2SDN.png) + +![](https://s2.loli.net/2022/03/17/H5it68ZWzuRwA4J.png) + +> ### 添加烧写固件 + +选择 Flash Download,删除原来的烧写配置 + +![](https://s2.loli.net/2022/03/17/xOZCnXdaErIF5oS.png) + +添加该烧写固件,size 大小为 32MB + +![](https://s2.loli.net/2022/03/17/xfCIsgOF2N5t3pM.png) + +下载的一些设置记得勾上: + +![](https://s2.loli.net/2022/03/17/acizCh5tH7MJATO.png)![](https://s2.loli.net/2022/03/17/cUqhyRgoPFQHW6L.png) + +然后编译烧录即可,keil 下载不需要进入 SDP 模式,无需拨拨码开关。 diff --git a/xiuosiot-frontend/public/cr100.md b/xiuosiot-frontend/public/cr100.md new file mode 100644 index 0000000..65bd1f8 --- /dev/null +++ b/xiuosiot-frontend/public/cr100.md @@ -0,0 +1,53 @@ +# XiDaTong_RISCV_Reference_Resource + +## 1. 烧录 + +如下图,usb 转串口将矽达通(RISCV)与电脑连接起来 + +![](https://s2.loli.net/2022/03/17/iLCcPnXsvruoKa5.png) + +矽达通后盖如下图,烧录时需要将引脚短接并重新上电 + +![](https://s2.loli.net/2022/03/17/FxX5oaisAwPrSy6.png) + +> ### windows 端 + +用 [k-flash gui](https://github.com/kendryte/kendryte-flash-windows/releases) 工具烧录 + +波特率不能太高,调小一点,选择镜像文件,烧录即可 + +![](https://s2.loli.net/2022/03/17/Z18WYA4XKJ2GpHr.png) + +**`注:烧录时需要断开串口调试工具,后面同理`** + +> ### Ubuntu 端 + +依然用 kendryte 官方的 [k-flash](https://github.com/kendryte/kflash.py) 命令行工具 + +执行以下命令安装 K-Flash 工具 + +``` +sudo apt install python3 python3-pip +sudo pip3 install pyserial +sudo pip3 install pyelftools +sudo pip3 install kflash +``` + +如果最后一步安装 kflash 出现错误,可以尝试以下命令 + +``` +sudo python -m pip install kflash +sudo python3 -m pip install kflash +sudo pip install kflash +sudo pip2 install kflash +``` + +代码根目录下执行 K-Flash 工具烧录,-p 为 USB 端口号,视实际情况而定 + +``` +sudo kflash -t build/XiUOS_kd233.bin -p /dev/ttyUSB0 +``` + +如果编译 & 烧写无误,断开之前短接的引脚,将会在串口终端上看到信息打印输出 + +![](https://s2.loli.net/2022/03/30/Du2Bg5skHcYfFjN.png) diff --git a/xiuosiot-frontend/src/assets/images/K-Flash.jpg b/xiuosiot-frontend/src/assets/images/K-Flash.jpg deleted file mode 100644 index dd7cc8b..0000000 Binary files a/xiuosiot-frontend/src/assets/images/K-Flash.jpg and /dev/null differ diff --git a/xiuosiot-frontend/src/assets/images/Serial-port-module.jpg b/xiuosiot-frontend/src/assets/images/Serial-port-module.jpg deleted file mode 100644 index 6c788bd..0000000 Binary files a/xiuosiot-frontend/src/assets/images/Serial-port-module.jpg and /dev/null differ diff --git a/xiuosiot-frontend/src/assets/images/USB-TTL.jpg b/xiuosiot-frontend/src/assets/images/USB-TTL.jpg deleted file mode 100644 index 9bd5a9b..0000000 Binary files a/xiuosiot-frontend/src/assets/images/USB-TTL.jpg and /dev/null differ diff --git a/xiuosiot-frontend/src/assets/images/cm100_mainboard.png b/xiuosiot-frontend/src/assets/images/cm100_mainboard.png new file mode 100644 index 0000000..584e6e7 Binary files /dev/null and b/xiuosiot-frontend/src/assets/images/cm100_mainboard.png differ diff --git a/xiuosiot-frontend/src/assets/images/cr100_mainboard.png b/xiuosiot-frontend/src/assets/images/cr100_mainboard.png new file mode 100644 index 0000000..0594aa6 Binary files /dev/null and b/xiuosiot-frontend/src/assets/images/cr100_mainboard.png differ diff --git a/xiuosiot-frontend/src/assets/images/edu-arm_mainboard.png b/xiuosiot-frontend/src/assets/images/edu-arm_mainboard.png new file mode 100644 index 0000000..e0e292d Binary files /dev/null and b/xiuosiot-frontend/src/assets/images/edu-arm_mainboard.png differ diff --git a/xiuosiot-frontend/src/assets/images/edu-riscv64_mainboard.png b/xiuosiot-frontend/src/assets/images/edu-riscv64_mainboard.png new file mode 100644 index 0000000..d4f3dbd Binary files /dev/null and b/xiuosiot-frontend/src/assets/images/edu-riscv64_mainboard.png differ diff --git a/xiuosiot-frontend/src/assets/images/envsetup.jpg b/xiuosiot-frontend/src/assets/images/envsetup.jpg deleted file mode 100644 index 43f6d72..0000000 Binary files a/xiuosiot-frontend/src/assets/images/envsetup.jpg and /dev/null differ diff --git a/xiuosiot-frontend/src/assets/images/envsetup.sh .jpg b/xiuosiot-frontend/src/assets/images/envsetup.sh .jpg deleted file mode 100644 index 43f6d72..0000000 Binary files a/xiuosiot-frontend/src/assets/images/envsetup.sh .jpg and /dev/null differ diff --git a/xiuosiot-frontend/src/assets/images/k210-boot.jpg b/xiuosiot-frontend/src/assets/images/k210-boot.jpg deleted file mode 100644 index 64e17df..0000000 Binary files a/xiuosiot-frontend/src/assets/images/k210-boot.jpg and /dev/null differ diff --git a/xiuosiot-frontend/src/assets/images/k210-shell.jpg b/xiuosiot-frontend/src/assets/images/k210-shell.jpg deleted file mode 100644 index 0855184..0000000 Binary files a/xiuosiot-frontend/src/assets/images/k210-shell.jpg and /dev/null differ diff --git a/xiuosiot-frontend/src/assets/images/live-build-error1.jpg b/xiuosiot-frontend/src/assets/images/live-build-error1.jpg deleted file mode 100644 index ff575ab..0000000 Binary files a/xiuosiot-frontend/src/assets/images/live-build-error1.jpg and /dev/null differ diff --git a/xiuosiot-frontend/src/assets/images/live-build-error2.jpg b/xiuosiot-frontend/src/assets/images/live-build-error2.jpg deleted file mode 100644 index 42d795c..0000000 Binary files a/xiuosiot-frontend/src/assets/images/live-build-error2.jpg and /dev/null differ diff --git a/xiuosiot-frontend/src/permission.js b/xiuosiot-frontend/src/permission.js index d044dd1..b316725 100644 --- a/xiuosiot-frontend/src/permission.js +++ b/xiuosiot-frontend/src/permission.js @@ -2,7 +2,7 @@ * @Author: 龚祖望 573413756@qq.com * @Date: 2022-05-16 09:16:41 * @LastEditors: 龚祖望 573413756@qq.com - * @LastEditTime: 2023-03-08 15:57:02 + * @LastEditTime: 2023-03-09 16:53:42 * @FilePath: \dashengda\src\permission.js * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ @@ -17,7 +17,7 @@ import getPageTitle from '@/utils/get-page-title' NProgress.configure({ showSpinner: false }) // NProgress Configuration const whiteList = ['/login', '/home', '/product/M168', '/product/RV400', '/product/RV400-SR100', '/product/M168-SM100', - '/product/RV400-AR100', '/product/RV400-AR100/instruction', '/product/RV400-CR100', '/product/M528-CM100', '/product/edu-arm', '/product/edu-riscv64', '/product/M528', + '/product/RV400-AR100', '/product/instructionDetail', '/product/RV400-CR100', '/product/M528-CM100', '/product/edu-arm', '/product/edu-riscv64', '/product/M528', '/solution/shengda', '/solution/qianjiang', '/configuration/development', '/configuration/transferStation', '/configuration/AiCity', '/configuration/bridgeMachine'] // no redirect whitelist diff --git a/xiuosiot-frontend/src/router/index.js b/xiuosiot-frontend/src/router/index.js index 13e9e47..45493b6 100644 --- a/xiuosiot-frontend/src/router/index.js +++ b/xiuosiot-frontend/src/router/index.js @@ -66,8 +66,8 @@ export const constantRoutes = [ hidden: true }, { - path: '/product/RV400-AR100/instruction', - component: () => import('@/views/product/RV400-AR100/instruction.vue'), + path: '/product/instructionDetail', + component: () => import('@/views/product/instructionDetail'), hidden: true }, { diff --git a/xiuosiot-frontend/src/views/product/M528-CM100/index.vue b/xiuosiot-frontend/src/views/product/M528-CM100/index.vue index 99c6b4d..838a6b4 100644 --- a/xiuosiot-frontend/src/views/product/M528-CM100/index.vue +++ b/xiuosiot-frontend/src/views/product/M528-CM100/index.vue @@ -16,6 +16,41 @@

+

开发板详情介绍图

+ +

产品使用说明

+ + +
+
+ +

矽璓 智能终端

+

M528-LoRa-CM100

+ + +
+
+
+

1. 矽达通介绍

+

2. NXP-MCUBootUtility 方式烧录

+

+ 2.1、测试环境 + 2.2、烧录流程 + 2.3、NON-XIP 二进制文件烧写 + 2.4、XIP 二进制文件烧写 +

+

3. Keil MDK 方式烧录

+

+ 3.1、芯片支持包导入 + 3.2、烧写固件安装 + 3.3、Keil 环境配置 + 3.4、添加烧写固件 +

+
+
+
+
+

技术架构

@@ -137,71 +172,127 @@ export default { return {} }, mounted() {}, - methods: {} + methods: { + instructionDetail() { + this.$router.push({ + path: '/product/instructionDetail', + query: { type: 'cm100' } + }) + } + } } + } + .advantage { + .advantage_row { + height: 20vh; + &:first-of-type { + margin-top: 50px; + } + .img { + float: left; + margin-right: 20px; + } + .intro { + font-size: 14px; + line-height: 1.5; + overflow: hidden; + } + } + } + .scene { + padding-top: 70px; + padding-bottom: 120px; + background: url('~@/assets/images/scene_bg.png') no-repeat; + background-size: 100% 100%; + .content { + background-color: #fff; + span { + font-size: 20px; + } + } + } +} +.el-card { + margin: 20px; + height: 23vh; + min-height: 250px; +} + diff --git a/xiuosiot-frontend/src/views/product/RV400-AR100/index.vue b/xiuosiot-frontend/src/views/product/RV400-AR100/index.vue index 3621bc6..eca7d17 100644 --- a/xiuosiot-frontend/src/views/product/RV400-AR100/index.vue +++ b/xiuosiot-frontend/src/views/product/RV400-AR100/index.vue @@ -22,7 +22,7 @@

矽璓 智能终端

-

M168-NPU4T-4G-SM100

+

RV400-NPU16T-5G-AR100

@@ -213,7 +213,7 @@ export default { mounted() {}, methods: { instructionDetail() { - + this.$router.push({ path: '/product/instructionDetail', query: { type: 'ar100' }}) } } } @@ -247,7 +247,7 @@ export default { p{ font-family: Poppins; font-weight: bold; - font-size: 2.5vw; + font-size: 2.4vw; // line-height: 1.2; color: #fff; margin: 0.5em 0; diff --git a/xiuosiot-frontend/src/views/product/RV400-AR100/instruction.vue b/xiuosiot-frontend/src/views/product/RV400-AR100/instruction.vue deleted file mode 100644 index 7c8f8ed..0000000 --- a/xiuosiot-frontend/src/views/product/RV400-AR100/instruction.vue +++ /dev/null @@ -1,67 +0,0 @@ - - - - diff --git a/xiuosiot-frontend/src/views/product/RV400-CR100/index.vue b/xiuosiot-frontend/src/views/product/RV400-CR100/index.vue index 9370f7f..57d44f5 100644 --- a/xiuosiot-frontend/src/views/product/RV400-CR100/index.vue +++ b/xiuosiot-frontend/src/views/product/RV400-CR100/index.vue @@ -15,6 +15,31 @@

+

开发板详情介绍图

+ +

产品使用说明

+ + +
+
+ +

矽璓 智能终端

+

RV400-4G-CR100

+ + +
+
+
+

1. 烧录

+

+ 1.1、windows端 + 1.2、Ubuntu端 +

+
+
+
+
+

技术架构

@@ -135,71 +160,127 @@ export default { return {} }, mounted() {}, - methods: {} + methods: { + instructionDetail() { + this.$router.push({ + path: '/product/instructionDetail', + query: { type: 'cr100' } + }) + } + } } +} +.el-card { + margin: 20px; + height: 23vh; + min-height: 250px; +} + diff --git a/xiuosiot-frontend/src/views/product/edu-arm/index.vue b/xiuosiot-frontend/src/views/product/edu-arm/index.vue index d00c6d6..fc8e6a7 100644 --- a/xiuosiot-frontend/src/views/product/edu-arm/index.vue +++ b/xiuosiot-frontend/src/views/product/edu-arm/index.vue @@ -16,6 +16,8 @@

+

开发板详情介绍图

+

技术架构

diff --git a/xiuosiot-frontend/src/views/product/edu-riscv64/index.vue b/xiuosiot-frontend/src/views/product/edu-riscv64/index.vue index 356da7b..7361c86 100644 --- a/xiuosiot-frontend/src/views/product/edu-riscv64/index.vue +++ b/xiuosiot-frontend/src/views/product/edu-riscv64/index.vue @@ -15,6 +15,8 @@

+

开发板详情介绍图

+

技术架构

diff --git a/xiuosiot-frontend/src/views/product/instructionDetail/index.vue b/xiuosiot-frontend/src/views/product/instructionDetail/index.vue new file mode 100644 index 0000000..26e65b0 --- /dev/null +++ b/xiuosiot-frontend/src/views/product/instructionDetail/index.vue @@ -0,0 +1,87 @@ + + + + + diff --git a/xiuosiot-frontend/src/views/product/markdown/ar100.md b/xiuosiot-frontend/src/views/product/markdown/ar100.md deleted file mode 100644 index 3db26c5..0000000 --- a/xiuosiot-frontend/src/views/product/markdown/ar100.md +++ /dev/null @@ -1,769 +0,0 @@ -# XiHuiTong_Linux_Support_Collaborate_With_XiUOS - -## 1. 系统交叉编译 - -### 1.1、测试环境 - -- `Ubuntu 18.04` 及以上 - -- 16.04 在编译 debian 文件系统时会出错,暂时未解决,不建议使用 - -解压 sdk 基础包 - -在路径 XiHuiTong_Linux_Support_Collaborate_With_XiUOS/Source_Code/rk3568_linux/sdk/base/ 下,拷贝到 Ubuntu 环境下,执行如下命令 - -``` -tar -xzvf som3568_base_0520.tar.gz -cd rk356x_linux -``` - -### 1.2、交叉编译工具链 - -已内置于 sdk prebuilts 和 buildroot 目录下,不用重新安装 - -- aarch64-linux-gcc (gcc version 6.3.1 20170404) -- aarch64-buildroot-linux-gnu-gcc (gcc version 9.3.0) - -### 1.3、其他安装包 - -``` -sudo apt-get install repo git ssh make gcc libssl-dev liblz4-tool -sudo apt-get install expect g++ patchelf chrpath gawk texinfo chrpath diffstat binfmt-support -sudo apt-get install qemu-user-static live-build bison flex fakeroot cmake gcc-multilib g++-multilib -sudo apt-get install unzip zlib1g-dev -sudo apt-get install device-tree-compiler python-pip ncurses-dev - -pip install pyelftools -``` - -### 1.4、打 patch - -将 XiHuiTong_Linux_Support_Collaborate_With_XiUOS/Source_Code/rk3568_linux/patch 下三个 patch 文件取出 - -**下文 SDK_PATH 指代 rk356x_linux 目录** - -repo_20210520_DLM3568_device_95d7e1_435a6c_01.patch 放在 $SDK_PATH/device/rockchip 下 -repo_20210520_DLM3568_kernel_4f736f_a7164d_01.patch 放在 $SDK_PATH/kernel 下 -repo_20210520_DLM3568_buildroot_94742b_86ca23_01.patch 放在 $SDK_PATH/buildroot 下 - -在对应目录下运行 `patch -p1 < *.patch` 打包 - -```shell -cd device/rockchip -patch -p1 < *.patch - -cd ../../kernel -patch -p1 < *.patch - -cd ../buildroot -patch -p1 < *.patch -``` - -配置 deconfig 文件和设备树(在 SDK_PATH 目录下) - -```shell -cd ../ -source envsetup.sh //输入74,代表选择 rockchip_rk3568_dlm3568 -./build.sh lunch //输入3,代表选择 BoardConfig-rk3568-dlm3568-ddr4-A1.mk配置文件 -``` - -![envsetup ](../../../assets/images/envsetup.jpg) - -`注:提前将 XiHuiTong_Linux_Support_Collaborate_With_XiUOS\Source_Code\rk3568_linux/dl目录拷贝到$SDK_PATH/buildroot/ 下,这个目录里是大量的压缩包,在编译内核时减少大量下载时间` - -### 1.5、编译 Uboot - -``` -$ ./build.sh uboot -``` - -### 1.6、编译 Kernel - -编译 kernel 前把 5G 网卡驱动设置一下: - -打开 $SDK_PATH/kernel/drivers/usb/serial/option.c ,在 option_probe 函数中 `unsigned long device_flags = id->driver_info;` 一行后面加入如下代码: - -```cpp -if (serial->dev->descriptor.idVendor == cpu_to_le16(0x2CB7) && serial->dev->descriptor.idProduct == cpu_to_le16(0x0104) && serial->interface->cur_altsetting->desc.bInterfaceNumber >= 4) - { - printk(KERN_INFO "Discover the 4th interface for fibocom\n"); - return ENODEV; - } -if (serial->dev->descriptor.idVendor == cpu_to_le16(0x2CB7) && serial->dev->descriptor.idProduct == cpu_to_le16(0x010A) && serial->interface->cur_altsetting->desc.bInterfaceNumber >= 2) - { - printk(KERN_INFO "Discover the 4th interface for fibocom\n"); - return ENODEV; - } -``` - -打开 SDK_PATH/build.sh (**该文件时间软连接到了 rk356x_linux/device/rockchip/common/build.sh**),在该文件的 build_kernel 函数中增加一行(函数起始位置大概在 481 行) : - -```makefile -make ARCH=$RK_ARCH menuconfig -``` - -![](https://s2.loli.net/2022/06/01/Eh9lbKqGtRDHXSU.png) - -然后编译内核: - -``` -$ ./build.sh kernel -``` - -menuconfig 时勾选上如下选项:(Device Drivers 下可以检索如下配置项 USB_SUPPORT、USB_SERIAL、USB_SERIAL_OPTION,?+回车可以快速找到 ) - -![](https://s2.loli.net/2022/06/01/G69cVg7BSLICQlr.png) - -配置电源选项时,全部选择 3300000uV - -![](https://s2.loli.net/2022/06/01/LTSJxhryAPOqupf.png) - -如下表示配置成功: - -![](https://s2.loli.net/2022/06/01/BfjzHt3ZWKe8Rk9.png) - -最后显示 "Running build_kernel succeeded." 编译成功 - -### 1.7、编译 Recovery - -``` -$ sudo ./build.sh recovery -``` - -需要特别注意 recovery.img 是包含 kernel.img,所以每次 Kernel 更改后,Recovery 是需要重新打包生成。如下: - -``` -$ source envsetup.sh rockchip_芯片名称 -$ make recovery-rebuild -$ sudo ./build.sh recovery -``` - -这一步需要从网上下载资源,比较耗时。 - -编译成功会显示"Running build_recovery succeeded." - -### 1.8、编译 Debian - -进入目录 ${SDK_PATH} - -ubuntu16.04 及以后已不支持 `python-support`,需要手动安装: - -``` -wget http://launchpadlibrarian.net/109052632/python-support_1.0.15_all.deb -sudo dpkg -i python-support_1.0.15_all.deb -``` - -由于下载时可能因为被防火墙墙导致下载失败,在 ${SDK_PATH}/debian/ubuntu-build-service/buster-desktop-arm64/configure 文件中加入以下镜像网站配置 - -``` -echo "I: create configuration" -export LB_BOOTSTRAP_INCLUDE="apt-transport-https gnupg" -lb config \ -+ --mirror-bootstrap "http://mirrors.163.com/debian" \ -+ --mirror-chroot "http://mirrors.163.com/debian" \ -+ --mirror-chroot-security "http://mirrors.163.com/debian-security" \ -+ --mirror-binary "http://mirrors.163.com/debian" \ -+ --mirror-binary-security "http://mirrors.163.com/debian-security" \ ---apt-indices false \ ---apt-recommends false \ ---apt-secure false \ -``` - -编译文件系统: - -``` -$ ./build.sh debian -``` - -若出现如下问题: - -``` -noexec or nodev issue /usr/share/debootstrap/functions: line 1450: -..../rootfs/ubuntu-build-service/buster-desktop-arm64/chroot/test-dev-null: -Permission denied E: Cannot install into target '/rootfs/ubuntu-buildservice/buster-desktop-arm64/chroot' mounted with noexec or nodev -``` - -解决方法: - -``` -sudo mount -o remount,exec,dev /home -``` - -若出现 live-build 相关的报错,尝试执行如下命令解决 - -![live-build-error1](image/live-build-error1.jpg) - -考虑升级 live-build,参考 http://t.zoukankan.com/cute-p-15185054.html - -若又出现若现如下问题: - -![live-build-error2](image/live-build-error2.jpg) - -执行如下操作进行解决: - -```shell -sudo apt-get install -f -sudo apt-get install python-apt -sudo dpkg -i debian/ubuntu-build-service/packages/* -``` - -编译完成会显示: - -Running build_debian succeeded. -Running build_rootfs succeeded. - -编译完成会在 debian/ 目录下生成:linaro-buster-alip-xxxxx-1.tar.gz(xxxxx 表示生成时间戳)。 - -### 1.9、生成镜像 - -``` -$ sudo ./mkfirmware.sh -$ sudo ./build.sh updateimg -``` - -生成 img 在 $SDK_PATH/rockdev 中,`update.img` 为整机镜像。 - -![1](https://s2.loli.net/2022/02/17/mBZGDMxF1lprIqg.png) - -## 2. 烧录镜像及调试 - -Micro USB 连接上电脑 - -![2](https://s2.loli.net/2022/02/17/YLrMIJxVG39Nlba.png) - -### 2.1、安装驱动 DriverAssitant_v5.11.zip - -该文件在路径 XiHuiTong_Linux_Support_Collaborate_With_XiUOS/Source_Code/rk3568_linux/sdk/base 下的 som3568_base_0520.tar.gz 压缩包里,在 1.1 节解压后的目录里去取即可(在 rk356x_linux/tools/windows 目录下)。取出到自己的 windows 环境下解压压缩包,点击 DriverInstall.exe 进行安装。 - -![3](https://s2.loli.net/2022/02/18/OLQcrioKnH4hsZe.png) - -### 2.2、打开 RKDevTool.exe - -在 2.1 节相同的路径下取出 RKDevTool_Release_v2.84.zip 到自己的 windows 环境下,解压压缩包找到 RKDevTool.exe。 - -**`注:若一直提示找不到设备,按住 "Update" 按键并重新上电,会提示"发现一个 LOADER 设备",此时直接烧录即可 `(不需要执行图片中第 3 步的切换)** - -![4](https://s2.loli.net/2022/02/17/inrgvTpONhIuafW.png) - -1、连接设备 - -2、在打开工具的界面点击"升级固件"→“固件”,选择 1.9 节里编译生成的 update.img 文件,在 rk356x_linux\rockdev\ 路径下,选择固件后稍等片刻,等待固件版本、Loader 版本、芯片信息等加载出来 - -3、点击“切换”,等待切换完成 - -4、点击"升级",右侧会显示升级信息,等出现重启设备成功说明升级完成 - -**调试口在电源侧,从外向里分别为 `GND、TX、RX` 串口连接的波特率为 1500000** - -板子的引脚图和实物图如下所示: - -![xihuitong-pin](image/xihuitong-pin.bmp) - -![5](https://s2.loli.net/2022/02/17/Tti6sEbgM8de7O4.jpg) - -**注意这里使用的串口模块是这种黑色串口模块,实验室的另一种白色串口模块连接不上。** - -![Serial-port-module](image/Serial-port-module.jpg) - -然后可以使用系统了,同样为了防止被墙,先更换下 apt 源,接上网线后更新一下 apt 源 - -第一步:打开 sources.list 文件 - -``` -sudo vim /etc/apt/sources.list -``` - -第二步:将以下内容复制到 sources.list 文件(复制后在 vi 模式 ctrl+shift+v 进行复制) - -``` -deb http://mirrors.aliyun.com/debian/ buster main non-free contrib -deb http://mirrors.aliyun.com/debian-security buster/updates main -deb http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib -deb http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib - -deb-src http://mirrors.aliyun.com/debian-security buster/updates main -deb-src http://mirrors.aliyun.com/debian/ buster main non-free contrib -deb-src http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib -deb-src http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib -``` - -第三步:更新源和系统软件 - -```shell -sudo apt-get update -sudo apt-get upgrade -``` - -**git 仓上保存了一份包含了已经编译好且包含 emmc 扩容后的 update.img 文件,可以不用进行编译直接拿来烧录使用。可以免去编译这一过程,但依然建议初次使用该文档的开发人员,从头至尾编译一边以加深印象。** - -**update.img 保存路径:XiHuiTong_Linux_Support_Collaborate_With_XiUOS/Reference_Doc/ 可直接烧录文件** - -## 3. 5G 网卡调试 - -``` -sudo apt-get install microcom -sudo apt-get install udhcpc -``` - -**`注:先把 micro usb 烧录线拔下,否则 5G 卡无法识别!`** - -先执行 lsusb 确认系统识别到 5G 网卡: - -![](https://s2.loli.net/2022/02/18/5MNWk2jEgbzUQRG.png) - -如果没有 lsusb 命令先执行如下命令进行安装 - -```shell -sudo apt-get install usbutils -``` - -再执行 ls /dev/tty\* 查看 tty 设备: - -![](https://s2.loli.net/2022/02/18/D1H4AaQjIof7KLJ.png) - -先关闭以太网卡: - -``` -ifconfig eth0 down -``` - -进入串口工具: - -``` -microcom -s 115200 -p /dev/ttyUSB1 -``` - -切换到 ECM 拨号模式: - -``` -at+gtusbmode=18 -``` - -查询 sim 卡是否插入: - -``` -at+cpin? -``` - -查看 5G 网络注册状态: - -``` -at+cgreg? -``` - -拨号: - -``` -at+gtrndis=0,1 -at+gtrndis=1,1 -``` - -**在 AT 模式下退出该模式,ctrl+\然后输入 quit 即可退出。** - -拨号完成后退出串口工具,自动获取 ip: - -``` -udhcpc -i usb0 -ifconfig usb0 up -``` - -此时 ifconfig 应该能看到 usb0 网卡状态: - -![](https://s2.loli.net/2022/02/18/Jui9AwMVEkP5fbY.png) - -ping 测试成功 - -```shell -ping www.baidu.com -``` - -![](https://s2.loli.net/2022/02/18/lVPm62OKiXFoake.png) - -## 5. wifi 模块调试 - -WIFI 模块为 USB 接口,采用南方硅谷 ssv6x5x 芯片。 - -总体参考《南方硅谷 ssv6x5x 驱动移植用户指南\_20200818》 - -> ### 驱动编译 - -需要的驱动文件为 Source Code\Wifi\Wifi Related Tools\6155.6152 驱动.zip 这个压缩文件里,有个压缩文件 L.SMAC.19Q3.2042.02_FH.tar.gz,将该文件 copy 到 rk356x_linux/kernel/drivers/net/wireless/ 下,解压为 ssv6x5x 文件夹 - -```bash -cd rk356x_linux/kernel/drivers/net/wireless/ -tar -zxvf L.SMAC.19Q3.2042.02_FH.tar.gz -mv L.SMAC.19Q3.2042.02 ssv6x5x -``` - -如果是移植到 Linux 平台,可参考 platforms 下 t20 平台的相关配置文件。 - -将以上平台相关文件 copy 到 ssv6x5x 目录,进入 ssv6x5x 目录下: - -```bash -cd ssv6x5x -cp platforms/platform-config.mak . -cp platforms/t20.cfg ssv6x5x.cfg -cp platforms/t20-generic-wlan.c ssv6x5x-generic-wlan.c -cp platforms/t20-wifi.cfg image/ssv6x5x-wifi.cfg -cp platforms/t20-wifi.cfg ssv6x5x-wifi.cfg -``` - -根据平台类型 copy 出一份正确的 makefile, 因为 ssv6x5x/makefile 默认驱动目录带的是 ubuntu 环境的 makefile 文件,不能直接使用。 - -```bash -cp Makefile.cross_linux Makefile -``` - -将 ssv6x5x 驱动存放在内核目录 rk356x_linux/kernel/drivers/net/wireless/ 路径下。 - -修改 drivers/net/wireless 目录的 Makefile,新增 - -```sh -obj-$(CONFIG_SSV6X5X) += ssv6x5x/ -``` - -![](https://s2.loli.net/2022/03/11/9Aa8D7KzEGtBQbX.png) - -以及 Kconfig 文件,新增 - -```sh -source "drivers/net/wireless/ssv6x5x/Kconfig" -``` - -![](https://s2.loli.net/2022/03/11/iktgJKjdTOvVqMl.png) - -在 rk356x_linux/kernel 路径下重新配置内核 menuconfig: - -```bash -sudo make ARCH=arm64 CROSS_COMPILE=aarch64-himix100-linux- menuconfig -``` - -networking support -> RF switch subsystem support ->下面的都选上(在 Networking support 中快速检索,搜索 RFKILL) - -![](https://s2.loli.net/2022/03/11/QVUc9RZEbDdnpqf.png) - -networking support -> wireless ->cfg80211 - wireless configuration API - -networking support -> wireless ->Generic ...(mac80211) - -![](https://s2.loli.net/2022/03/11/VxGBI6cHlmbSWT2.png) - -然后就可以选上驱动: - -Device Drivers -> Network device support -> Wireless LAN -> SSV6X5X Wireless driver - -(可在 device drivers 中快速检索,依次搜索 NETDEVICES、WLAN、SSV6X5X) - -![](https://s2.loli.net/2022/06/16/p7guPtdqXoeOYJh.png) - -在在 rk356x_linux 根目录下编译驱动,并重新编译一遍内核和 recovery, 编译生成的 ssv6x5x.ko 在 kernel/drivers/net/wireless/ssv6x5x 下 - -```bash -sudo ./build.sh modules -sudo ./build.sh kernel (如果又进入menuconfig,那就检查一下上面几个项目是否全部勾选上了) -sudo ./build.sh recovery -``` - -同样,重新打包生成镜像文件: - -```bash -sudo ./mkfirmware.sh -sudo ./build.sh updateimg -``` - -按照烧录流程重新烧录 - -> ### 驱动运行 - -确认系统是否识别到 wifi,对于 usb wifi,执行 lsusb 可以看到如下则确认识别 (for 6155/6255 型号的芯片) - -``` -Bus 005 Device 003: ID 8065:6000 -``` - -接入以太网安装相关包: - -```bash -sudo apt-get update && sudo apt-get install vim usbutils net-tools microcom udhcpc wireless-tools -``` - -复制相关文件到板子的文件系统中 - -复制可以用 U 盘复制,拷贝到 U 盘后插入到矽灵通上,fdisk -l 查看找到 usb 设备,例如 /dev/sda1 - -执行挂载进行拷贝 - -```shell -mkdir -p /mnt/usb -mount /dev/sda1 /mnt/usb -``` - -复制 ssv6x5x/image/ssv6x5x-wifi.cfg 到板子文件系统下 /etc/firmware/ (若无 firmware 文件夹新建即可) - -复制 ssv6x5x.ko 到板子任意目录下 - -加载驱动 ssv6x5x.ko - -执行如下指令:(stacfgpath= 路径请根据实际路径填写) - -```bash -insmod ssv6x5x.ko stacfgpath=/etc/firmware/ssv6x5x-wifi.cfg -``` - -insmod 结束: - -![](https://s2.loli.net/2022/06/16/Kdx2VXQ5ujDOwFi.png) - -insmod 完成后 wifi 可能会重复扫描周围网络,暂时不用管,接着执行下面步骤可以解决: - -ifconfig -a 查看网卡名称,这边是 wlxa47d9fb5b922 (具体要看板子) - -![](https://s2.loli.net/2022/05/31/rhaCVkpzPKJQyfn.png) - -为了后续操作方便,可以对网卡重命名为 wlan0 (非必要): - -``` -ip link set wlxa47d9fb5b922 down -ip link set wlxa47d9fb5b922 name wlan0 -ip link set wlan0 up -``` - -执行: ifconfig eth0 down && ifconfig wlan0 up - -![](https://s2.loli.net/2022/05/31/m3czVTRvZPkQWu2.png) - -> ### WIFI 网络连接 - -扫描周围无线网络: - -```bash -iwlist wlan0 scan -``` - -![](https://s2.loli.net/2022/05/31/Fw2ND6pEYCQrZcB.png) - -连接网络: - -```bash -iwconfig wlan0 essid "AIIT-Guest" -``` - -![](https://s2.loli.net/2022/05/31/5z1HXichCDe4Ob2.png) - -dhcp 获取 ip - -```bash -udhcpc -i wlan0 -``` - -![](https://s2.loli.net/2022/05/31/TGe6lEIkD4F1C7J.png) - -ip 分配成功后,进行 ping 测试,需要 -I 指定网卡 - -```shell -ping 114.114.114.114 -I wlan0 -ping www.baidu.com -I wlan0 -``` - -![](https://s2.loli.net/2022/05/31/YVq9MC6fpPUjzNm.png) - -## 5. USB 调试 - -首先通过 fdisk -l 查看插入的 usb 设备,如下我这里插入的 u 盘是 /dev/sda2 - -```shell -Device Boot Start End Sectors Size Id Type -/dev/sda2 2 15149055 15149054 7.2G c W95 FAT32 (LBA) -``` - -进行挂载 - -```shell -mkdir /root/udisk -mount /dev/sda2 udisk -``` - -![](https://s2.loli.net/2022/02/22/IWhXL2bw3GNi8pd.png) - -## 6. SD 卡调试 - -首先通过 fdisk -l 查看插入的 SD 卡,如下我这里插入的 SD 卡是 /dev/mmcblk1p1 - -```shell -Device Boot Start End Sectors Size Id Type -/dev/mmcblk1p1 8192 62333951 62325760 29.7G c W95 FAT32 (LBA) -``` - -进行挂载 - -```shell -mkdir /root/sdcard -mount /dev/mmcblk1p1 sdcard/ -``` - -![](https://s2.loli.net/2022/02/24/81H9mMYicFCOash.png) - -## 7. 显示图片 - -烧入 Debian 镜像后,把要显示的图片通过 SD 卡或者 U 盘拷贝进板子,点击打开后全屏幕显示即可。 - -## 8. emmc 扩容 - -rk3568 配置的是 16GB 的 emmc,但初始只有 3.2GB: - -![](https://s2.loli.net/2022/04/22/HNKrfO43thWe78a.png) - -为了充分利用剩余空间,需要修改烧录文件 rk356x_linux/rockdev/parameter.txt,该文件实际上软连接到了(rk356x_linux/device/rockchip/rk356x/rk356x/parameter-buildroot-dlm3568.txt)。在生成 update.img 之前先修改 parameter 为以下内容,其中 rootfs 一项即对应文件系统所占大小,格式为 "size@LBA(rootfs)" - -``` -FIRMWARE_VER: 1.0 -MACHINE_MODEL: RK3568 -MACHINE_ID: 007 -MANUFACTURER: RK3568 -MAGIC: 0x5041524B -ATAG: 0x00200800 -MACHINE: 0xffffffff -CHECK_MASK: 0x80 -PWR_HLD: 0,0,A,0,1 -TYPE: GPT -CMDLINE: mtdparts=rk29xxnand:0x00002000@0x00004000(uboot),0x00002000@0x00006000(misc),0x00010000@0x00008000(boot),0x00010000@0x00018000(recovery),0x00010000@0x00028000(backup),0x017F6000@0x00038000(rootfs),0x00040000@0x0182E000(oem),0x0000A000@0x0186E000(userdata),-@0x01878000(data:grow) -uuid:rootfs=614e0000-0000-4b53-8000-1d28000054a9 -``` - -然后重新打包生成整机镜像: - -``` -$ sudo ./build.sh updateimg -``` - -**烧录完成后,此时配置可能并未刷新,需要更新下 blocks:** - -``` -resize2fs /dev/mmcblk0p6 -``` - -![](https://s2.loli.net/2022/04/22/qX5RuLnDNJ9vSZk.png) - -然后 df -h 可以看到文件系统大小已经扩容成为 12G: - -![](https://s2.loli.net/2022/04/22/l5Otv6FydQf7xJB.png) - -## 9. AIM16T 从模式烧录 - -由于出厂时 AIM16T 镜像烧录错误,EP 模式烧成了 RC 模式,所以现在重新烧录,后盖有遮挡,需要去掉螺丝打开后盖。 - -使用 USB 转 TTL 串口,接入 AIM16T 烧录口(烧录口如下图所示的 JP4) - -![USB-TTL](image/USB-TTL.jpg) - -拨码开关拨到 on(拨码开关的位置如下图所示),拨码开关拨到 on 后需要重新上电 - -![](https://s2.loli.net/2022/04/21/idgKvlcH1xqMTkw.png) - -解压 fwu_tool_mlu220.rar 文件,压缩包位于**XiHuiTong_Linux_Support_Collaborate_With_XiUOS/Reference_Doc/AIM16T_EP_Burn**下,解压后更改文件目录权限 - -如果没有 rar 相关的命令,需要先安装,如果有这一步忽略 - -```shell -sudo apt-get install rar -sudo apt-get install unrar -``` - -把 fwu_tool_mlu220.rar 复制到 linux 环境下,进行解压 - -``` -unrar x fwu_tool_mlu220.rar -chmod -R 777 fwu_tool_mlu220 -``` - -进入目录,执行 EP 模式镜像烧录 - -``` -cd fwu_tool_mlu220 -sudo ./start_burn.sh 3 -``` - -以下表示烧录完成 - -![](https://s2.loli.net/2022/04/21/qi4nmkzCxRHf6LO.png) - -将拨码开关拨回 12,重新上电,在 rk3568 命令行中输入 lspci 命令,若能找到以下设备则表示 EP 模式烧录成功 - -![](https://s2.loli.net/2022/04/21/2cITg5NqYptUjVA.png) - -接下来在 AIM16T 上运行 yolo_demo 来检验,这一步需要四个文件: - -(1)firmware_sys.img、cambricon-drv.ko、cnmon 这三个文件位于 XiHuiTong_Linux_Support_Collaborate_With_XiUOS/Source_Code/AIM16T 下的 rk3568_aim16t.tar 压缩包内,从压缩包内取出 - -(2)yolo_demo_rk3568.tar.gz 位于 XiHuiTong_Linux_Support_Collaborate_With_XiUOS/Source_Code 下 - -这四个文件用 nfs 或 U 盘拷贝进板子(U 盘的挂载方式见第 4 节 USB 调试,如下 udisk 为挂载后的路径),把 AIM16T 驱动放在对应路径: - -``` -mkdir -p /lib/firmware/cambricon/mlu220 -cp -a /root/udisk/firmware_sys.img /lib/firmware/cambricon/mlu220 -``` - -加载 AIM16T 模组: - -``` -cp /root/udisk/cambricon-drv.ko /root -cd /root -insmod cambricon-drv.ko -``` - -以下表示模组加载成功: - -![](https://s2.loli.net/2022/04/21/vn7FPZj3pqwMxYd.png) - -此时运行 cnmon 脚本可以查看到 mlu220 设备的一些信息: - -``` -cp /root/udisk/cnmon /root -chmod 777 cnmon -./cnmon -``` - -![](https://s2.loli.net/2022/04/22/shWmv5SrBcGnb4A.png) - -解压 yolo_demo 并运行推理测试: - -``` -mkdir -p /root/yolo -cp /root/udisk/yolo_demo_rk3568.tar.gz /root/yolo -cd /root/yolo -tar -zxf yolo_demo_rk3568.tar.gz -cd yolo_demo -source ./env.sh -./cambricon_demo -``` - -可以看到 demo 正常运行: - -![](https://s2.loli.net/2022/04/22/X9Tytfaswhq5orI.png) - -## 10.RISCV-K210 烧录、调试 - -烧录/调试:RISCV 调试引脚同烧录引脚,均为 CO_CPU_ISP_TX/CO_CPU_ISP_RX。除了这两根线外,还需要一根 GND。串口波特率均为 115200。 - -引脚图可以参考 2.2 节 - -![k210-boot](image/k210-boot.jpg) - -用 K-Flash.exe 工具进行 bin 包的烧录。K-Flash.exe 工具位于 XiHuiTong_Linux_Support_Collaborate_With_XiUOS/Reference_Doc 目录下: - -![K-Flash](image/K-Flash.jpg) - -在 ① 选择串口 com 号 - -在 ② 处选择波特率,选择 115200 - -在 ③ 处选择编译出的 nuttx.bin 文件 - -设备在上电时确保 Boot 和 GND 短接,这是升级模式。 - -点击 ④ 处 Flash 开始烧录,显示烧录完成即可,中间有报错的话,重新 Flash。 - -烧写完毕重新上电,进入 shell。 - -![k210-shell](image/k210-shell.jpg)