fix Ubiquitous/XiZi/board/ README.md description
This commit is contained in:
@@ -18,24 +18,27 @@ $ sudo apt install build-essential pkg-config
|
||||
$ sudo apt install gcc make libncurses5-dev openssl libssl-dev bison flex libelf-dev autoconf libtool gperf libc6-dev git
|
||||
```
|
||||
|
||||
**源码下载:** XiUOS [https://forgeplus.trustie.net/projects/xuos/xiuos](https://forgeplus.trustie.net/projects/xuos/xiuos)
|
||||
**源码下载:** XiUOS [https://www.gitlink.org.cn/xuos/xiuos](https://www.gitlink.org.cn/xuos/xiuos)
|
||||
新建一个空文件夹并进入文件夹中,并下载源码,具体命令如下:
|
||||
|
||||
```c
|
||||
mkdir test && cd test
|
||||
git clone https://git.trustie.net/xuos/xiuos.git
|
||||
git clone https://gitlink.org.cn/xuos/xiuos.git
|
||||
```
|
||||
|
||||
打开源码文件包可以看到以下目录:
|
||||
| 名称 | 说明 |
|
||||
| -- | -- |
|
||||
| application | 应用代码 |
|
||||
| board | 板级支持包 |
|
||||
| framework | 应用框架 |
|
||||
| fs | 文件系统 |
|
||||
| kernel | 内核源码 |
|
||||
| resources | 驱动文件 |
|
||||
| tool | 系统工具 |
|
||||
1、打开XiUOS源码文件包可以看到以下目录:
|
||||
| ------------- | ------- |
|
||||
| APP_Framework | 应用代码 |
|
||||
| Ubiquitous | 板级支持包,支持NuttX、RT-Thread和XiZi内核 |
|
||||
2、打开XiZi内核源码文件包可以看到以下目录:
|
||||
| ------------- | --------|
|
||||
| arch | 架构代码 |
|
||||
| board | 板级支持包 |
|
||||
| fs | 文件系统 |
|
||||
| kernel | 内核源码 |
|
||||
| lib | 第三方库源码 |
|
||||
| resources | 驱动文件 |
|
||||
| tool | 系统工具 |
|
||||
|
||||
使用VScode打开代码,具体操作步骤为:在源码文件夹下打开系统终端,输入`code .`即可打开VScode开发环境,如下图所示:
|
||||
|
||||
@@ -44,19 +47,19 @@ git clone https://git.trustie.net/xuos/xiuos.git
|
||||
</div>
|
||||
|
||||
### 裁减配置工具的下载
|
||||
**裁减配置工具:** kconfig-frontends [https://forgeplus.trustie.net/projects/xuos/kconfig-frontends](https://forgeplus.trustie.net/projects/xuos/kconfig-frontends)
|
||||
**裁减配置工具:** kconfig-frontends [https://www.gitlink.org.cn/xuos/kconfig-frontends](https://www.gitlink.org.cn/xuos/kconfig-frontends)
|
||||
执行以下命令下载配置工具:
|
||||
|
||||
```c
|
||||
mkdir kfrontends && cd kfrontends
|
||||
git clone https://git.trustie.net/xuos/kconfig-frontends.git
|
||||
git clone https://gitlink.org.cn/xuos/kconfig-frontends.git
|
||||
```
|
||||
|
||||
下载源码后按以下步骤执行软件安装:
|
||||
|
||||
```c
|
||||
cd kconfig-frontends
|
||||
./xs_build.sh
|
||||
./xs_build.sh
|
||||
```
|
||||
|
||||
### 编译工具链:
|
||||
@@ -98,7 +101,7 @@ XiUOS板级当前支持使用GPIO、I2C、LCD、RTC、SPI、Timer、UART、watch
|
||||
编译工具链:`riscv-none-embed-gcc`
|
||||
使用`VScode`打开工程的方法有多种,本文介绍一种快捷键,在项目目录下将`code .`输入终端即可打开目标项目
|
||||
|
||||
修改`applications`文件夹下`main.c`
|
||||
修改`APP_Framework/Applications`文件夹下`main.c`
|
||||
在输出函数中写入 Hello, world!!! \n Running on KD233完成代码编辑。
|
||||
|
||||

|
||||
@@ -108,7 +111,9 @@ XiUOS板级当前支持使用GPIO、I2C、LCD、RTC、SPI、Timer、UART、watch
|
||||
1.在`VScode`的“命令终端”下执行以下命令,生成配置文件
|
||||
|
||||
```c
|
||||
make BOARD=kd233 menuconfig
|
||||
cd ./Ubiquitous/XiZi
|
||||
make BOARD=kd233 distclean
|
||||
make BOARD=kd233 menuconfig
|
||||
```
|
||||
|
||||
2.在`menuconfig`界面配置需要关闭和开启的功能,按回车键进入下级菜单,按Y键选中需要开启的功能,按N键选中需要关闭的功能,配置结束后选择Exit保存并退出(本实验无需选择任何选项,所以双击ESC结束选择,继续操作即可)。
|
||||
@@ -132,15 +137,15 @@ XiUOS板级当前支持使用GPIO、I2C、LCD、RTC、SPI、Timer、UART、watch
|
||||
3.继续在`VScode`的“命令终端”中执行以下命令,进行编译
|
||||
|
||||
```c
|
||||
make BOARD=kd233
|
||||
make BOARD=kd233
|
||||
```
|
||||
|
||||
4.如果编译正确无误,会在build文件夹下生成XiUOS_kd233.elf、XiUOS_kd233.bin文件。其中XiUOS_kd233.bin需要烧写到设备中进行运行。
|
||||
4.如果编译正确无误,会在build文件夹下生成XiZi_kd233.elf、XiZi_kd233.bin文件。其中XiZi_kd233.bin需要烧写到设备中进行运行。
|
||||
|
||||
>注:最后可以执行以下命令,清除配置文件和编译生成的文件
|
||||
|
||||
```c
|
||||
make BOARD=kd233 distclean
|
||||
make BOARD=kd233 distclean
|
||||
```
|
||||
|
||||
## 3. 烧写及执行
|
||||
@@ -170,7 +175,7 @@ sudo pip2 install kflash
|
||||
代码根目录下执行K-Flash工具烧录,-p为USB端口号,视实际情况而定
|
||||
|
||||
```
|
||||
sudo kflash -t build/XiUOS_kd233.bin -p /dev/ttyUSB0
|
||||
sudo kflash -t build/XiZi_kd233.bin -p /dev/ttyUSB0
|
||||
```
|
||||
|
||||
### 3.1 运行结果
|
||||
|
||||
Reference in New Issue
Block a user