fe3c4d456e | ||
---|---|---|
.. | ||
applications | ||
board | ||
.config | ||
Kconfig | ||
README.md | ||
README_en.md | ||
SConscript | ||
SConstruct | ||
rtconfig.h | ||
rtconfig.py |
README_en.md
c906_little bsp
This BSP is a coprocessor in the cv18xx series processor, using RISCV C906 @ 700Mhz. Features:
- No MMU
- Integrated Floating-point Unit (FPU)
Toolchain Download
Download the toolchain for riscv64-unknown-elf-gcc
: https://occ-oss-prod.oss-cn-hangzhou.aliyuncs.com/resource//1705395512373/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.1-20240115.tar.gz
Note: Current BSP only supports Linux compilation.
After correct decompression, add the local path of the riscv64-unknown-elf-gcc
toolchain to EXEC_PATH
in rtconfig.py
, or specify the path through the RTT_EXEC_PATH
environment variable.
$ export RTT_EXEC_PATH=/opt/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.1/bin
Compilation
- Dependency Installation
$ sudo apt install -y scons libncurses5-dev wget flex bison
- On Linux platform, execute:
$ scons --menuconfig
Choose the target development board type that needs to be compiled:
Board Type (milkv-duo) --->
( ) milkv-duo
( ) milkv-duo-spinor
(X) milkv-duo256m
( ) milkv-duo256m-spinor
It will automatically download env related scripts to the ~/.env directory, then execute
$ source ~/.env/env.sh
$ pkgs --update
After updating the software packages, execute scons -j10
or scons -j10 --verbose
to compile this BSP. Or use the scons --exec-path="GCC toolchain path"
command to compile directly while specifying the toolchain location. If the compilation is correct, the rtthread.elf file will be generated.
After the compilation is completed, the script automatically calls the combine-fip.sh
script for packaging, and generates fip.sd
, which is the c906_little file for SD card startup.
The first time the combine-fip.sh
script is called, it will automatically download the required opsbsbi
, fsbl
, uboot
, and other related files to the bsp/cvitek/cvitek_bootloader
directory, please be patient.
After downloading, it will automatically decompress and compile. Subsequently, when compiling the same type of development board again, only the relevant files will be called to package and synthesize fip.bin
. If you need to manually compile the related cvitek_bootloader
files, you can execute bash build.sh lunch
in the bsp/cvitek/cvitek_bootloader
directory to choose the corresponding development board for compilation.
Running
- Divide the SD card into 2 partitions, the 1st partition is used to store bin files, and the 2nd partition is used as a data storage partition, with the partition format being
FAT32
. - Copy the
fip.bin
andboot.sd
from the root directory into the 1st partition of the SD card. Subsequent firmware updates only require copying thefip.sd
file. Where:
- fip.bin: fsbl, opensbi, uboot, c906_little packaged bin file
- boot.sd: bin file packaged by the main kernel
After updating fip.sd
, restarting will show the output information on the serial port:
HW_HEAP_BEGIN:83f74dc0 RT_HW_HEAP_END:84000000 size: 569920
\ | /
- RT - Thread Operating System
/ | \ 5.1.0 build Jan 27 2024 22:45:49
2006 - 2022 Copyright by RT-Thread team
Hello, RISC-V!
msh />
Note: The default log serial port for the c906 little core is uart1