format file && update README.md

This commit is contained in:
flyingcys 2023-01-08 15:26:31 +08:00 committed by Man, Jianting (Meco)
parent 9339e495f0
commit 1480f7296c
7 changed files with 45 additions and 29 deletions

View File

@ -40,15 +40,34 @@ IR remote、 Display 和 GPIO。
## 2. 编译说明 ## 2. 编译说明
BL808是多核异构架构每个核需要单独编译并烧录到对应的位置。 BL808是多核异构架构分为m0和d0每个核需要单独编译,并烧录到对应的位置。
Windows下推荐使用[env工具][1]然后在console下进入bsp/bl808目录中选择需要编译的核心m0或d0运行 ### 2.1. 交叉编译期路径设置
下载risc-v的工具链[下载地址1](https://occ.t-head.cn/community/download?id=4073475960903634944)或[下载地址2](https://dl.sipeed.com/shareURL/others/toolchain)
Windows下请使用使用[env工具][1],使用命令 `tar -xvf Xuantie-900-gcc-elf-newlib-mingw-V2.6.1-20220906.tar.gz` 解压交叉编译器使用Windows下解压工具直接解压可能出现Windows下编译错误。
`rtconfig.py`中将risc-v工具链的本地路径加入 `EXEC_PATH` 或通过 `RTT_EXEC_PATH` 环境变量指定路径
Windows
```
set RTT_EXEC_PATH=C:\Users\xxxx\Downloads\Xuantie-900-gcc-elf-newlib-x86_64-V2.6.1\bin
```
Linux:
```
export RTT_EXEC_PATH=/opt/Xuantie-900-gcc-elf-newlib-x86_64-V2.6.1/bin
```
### 2.2. 编译
Windows下推荐使用[env工具][1]在console下进入bsp/bl808目录中选择需要编译的核心m0或d0运行
cd bsp/bl808/m0 cd bsp/bl808/m0
menuconfig menuconfig
pkgs --update pkgs --update
如果在Linux平台下可以先执行 如果在Linux平台下可以先执行
scons --menuconfig scons --menuconfig
@ -58,19 +77,8 @@ Windows下推荐使用[env工具][1]然后在console下进入bsp/bl808目录
cd bsp/bl808/m0 cd bsp/bl808/m0
pkgs --update pkgs --update
下载risc-v的工具链[下载地址](https://occ.t-head.cn/community/download?id=4073475960903634944)或[下载地址](https://dl.sipeed.com/shareURL/others/toolchain)
更新完软件包后,在`rtconfig.py`中将risc-v工具链的本地路径加入文档。 更新完软件包后,执行 `scons -j10``scons -j10 --verbose` 来编译这个板级支持包。或者通过 `scons --exec-path="GCC工具链路径"` 命令,在指定工具链位置的同时直接编译。
然后执行scons编译
```
set RTT_EXEC_PATH=C:\Users\xxxx\Downloads\Xuantie-900-gcc-elf-newlib-x86_64-V2.6.1/bin
scons
```
来编译这个板级支持包。
或者通过 `scons --exec-path="GCC工具链路径"` 命令,在指定工具链位置的同时直接编译。
如果编译正确无误会产生rtthread.elf、rtthread_m0.bin文件。其中rtthread_m0.bin需要烧写到设备中进行运行。 如果编译正确无误会产生rtthread.elf、rtthread_m0.bin文件。其中rtthread_m0.bin需要烧写到设备中进行运行。

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2006-2021, RT-Thread Development Team * Copyright (c) 2006-2023, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2006-2021, RT-Thread Development Team * Copyright (c) 2006-2023, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2006-2021, RT-Thread Development Team * Copyright (c) 2006-2023, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2006-2022, RT-Thread Development Team * Copyright (c) 2006-2023, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2006-2022, RT-Thread Development Team * Copyright (c) 2006-2023, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -0,0 +1,8 @@
# files format check exclude path, please follow the instructions below to modify;
# If you need to exclude an entire folder, add the folder path in dir_path;
# If you need to exclude a file, add the path to the file in file_path.
dir_path:
- platform
- stage
- utils