README.md
1UR-DP1000 Evb Board Support Package 使用说明
2
3# 1. 概述
4
5UR-DP1000是超睿科技研发的高性能多核RISC-V Soc,拥有8个高性能自研RISC-V处理器核UR-CP100,同时集成了24路PCIe 4.0、双路DDR 4以及一系列丰富的低速接口。
6
7本 BSP 支持 UR-DP1000 EVB开发板。采用本BSP编译生成的RT-Thread标准版本以及Smart版本可以运行在 UR-DP1000 EVB开发板上。板卡集成16GB DDR4内存。
8
9# 2. 芯片规格说明
10
11| 硬件 | 描述 |
12| -- | -- |
13|芯片型号| UR-DP1000 |
14|CPU| 8核UR-CP100,64位乱序发射超标量微架构,支持rv64imafdchx指令集,支持虚拟化扩展 |
15|主频| 2.0-2.3GHz |
16|cache| 核内集成64KB L1I和64KB L1D Cache以及512KB L2 Cache |
17| 外设 | 支持两路DDR4,支持ECC,最大支持内存容量128GB |
18| | 支持24路PCIe 4.0接口 |
19| | SPI、UART、QSPI、UART、GMAC、I2C、PWM、GPIO等 |
20
21# 3. BSP外设支持
22
23| 设备名称 | 支持情况 | 说明 |
24| -------- | -------- | ---------------------------------------------------------- |
25| PLIC | 支持 | 中断控制器 |
26| CLINT | 支持 | RISC-V core local 中断控制器,系统时钟及核间中断依赖该设备 |
27| MMU | 支持 | 支持SV39,支持ASID |
28| UART | 支持 | 调试串口 |
29| SPI | 支持 | Designware apb ssi ,支持TF卡驱动 |
30
31# 4. 编译
32
33RT-Thread编译只支持Linux,推荐Ubuntu 22.04。
34
35## 4.1. toolchain下载
36
37toolchain下载地址:<https://download.rt-thread.org/rt-smart/riscv64/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu_251248.tar.bz2>
38
39将下载的toolchain解压到指定路径中,例如:/opt/riscv64gc-linux-musleabi_for_x86_64-pc-linux-gnu
40
41## 4.2. BSP编译
42
43### 4.2.1. 设置编译环境变量
44
45```shell
46export RTT_EXEC_PATH=/opt/riscv64gc-linux-musleabi_for_x86_64-pc-linux-gnu/bin
47export RTT_CC_PREFIX=riscv64-unknown-linux-musl-
48```
49
50### 4.2.2. 安装编译依赖
51
52```shell
53sudo apt install scons python3-pip
54pip install kconfiglib
55```
56### 4.2.3. 编译
57
58```shell
59git clone https://github.com/RT-Thread/rt-thread.git
60cd bsp/ultrarisc/ur_dp1000_evb
61#默认为RT-Thread标准版
62scons
63```
64
65编译完成后,可以在bsp目录下生成rt-thread.elf及rtthread.bin文件。
66
67如果要编译RT-Thread Smart版本,需要通过scons --menuconfig使能:RT-Thread Kernel->Enable RT-Thread Smart (microkernel on kernel/userland);
68
69同时使能SPI MMC驱动:Ultrarisc DP1000 Soc Drivers Configuration->Using MMC。
70
71# 5. 运行
72
73编译完成后,在UR-DP1000 EVB板卡上可以通过jtag加载镜像运行:
74
75在RT-Thread调试阶段,为了能够快速的下载RT-Thread镜像,方便功能调试,可以通过jtag下载及调试:
76
77- 板卡上电后,首先运行固化在flash里的固件,opensbi启动;
78
79- 将jtag调试器与板卡jtag口连接,同时启动openocd;
80
81- 如果是标准版本,可以直接通过gdb加载rt-thread.elf,然后continue运行;如果是RT-Thread Smart版本,需要通过gdb加载rtthread.bin,然后修改pc值为0x80200000,continue运行。
82
83 ```shell
84 #gdb
85 restore rtthread.bin binary 0x80200000
86 set $pc=0x80200000
87 continue
88 ```
89
90 成功运行时,串口端的输出如下:
91 ```shell
92 OpenSBI v1.6-66-gbeb27559acd
93 ____ _____ ____ _____
94 / __ \ / ____| _ \_ _|
95 | | | |_ __ ___ _ __ | (___ | |_) || |
96 | | | | '_ \ / _ \ '_ \ \___ \| _ < | |
97 | |__| | |_) | __/ | | |____) | |_) || |_
98 \____/| .__/ \___|_| |_|_____/|____/_____|
99 | |
100 |_|
101
102 Platform Name : ultrarisc,dp1000
103 Platform Features : medeleg
104 Platform HART Count : 8
105 Platform IPI Device : aclint-mswi
106 Platform Timer Device : aclint-mtimer @ 10000000Hz
107 Platform Console Device : uart8250
108 Platform HSM Device : ---
109 Platform PMU Device : ---
110 Platform Reboot Device : ---
111 Platform Shutdown Device : ---
112 Platform Suspend Device : ---
113 Platform CPPC Device : ---
114 Firmware Base : 0x80000000
115 Firmware Size : 403 KB
116 Firmware RW Offset : 0x40000
117 Firmware RW Size : 147 KB
118 Firmware Heap Offset : 0x54000
119 Firmware Heap Size : 67 KB (total), 4 KB (reserved), 11 KB (used), 51 KB (free)
120 Firmware Scratch Size : 4096 B (total), 400 B (used), 3696 B (free)
121 Runtime SBI Version : 2.0
122 Standard SBI Extensions : time,rfnc,ipi,base,hsm,pmu,dbcn,legacy
123 Experimental SBI Extensions : fwft,sse
124
125 Domain0 Name : root
126 Domain0 Boot HART : 0
127 Domain0 HARTs : 0*,1*,2*,3*,16*,17*,18*,19*
128 Domain0 Region00 : 0x0000000020310000-0x0000000020310fff M: (I,R,W) S/U: (R,W)
129 Domain0 Region01 : 0x0000000080000000-0x000000008003ffff M: (R,X) S/U: ()
130 Domain0 Region02 : 0x0000000080040000-0x000000008007ffff M: (R,W) S/U: ()
131 Domain0 Region03 : 0x0000000008000000-0x00000000080fffff M: (I,R,W) S/U: ()
132 Domain0 Region04 : 0x0000000000000000-0xffffffffffffffff M: () S/U: (R,W,X)
133 Domain0 Next Address : 0x0000000080200000
134 Domain0 Next Arg1 : 0x0000000082200000
135 Domain0 Next Mode : S-mode
136 Domain0 SysReset : yes
137 Domain0 SysSuspend : yes
138
139 Boot HART ID : 0
140 Boot HART Domain : root
141 Boot HART Priv Version : v1.12
142 Boot HART Base ISA : rv64imafdchx
143 Boot HART ISA Extensions : zicntr,zihpm
144 Boot HART PMP Count : 4
145 Boot HART PMP Granularity : 2 bits
146 Boot HART PMP Address Bits : 42
147 Boot HART MHPM Info : 6 (0x000001f8)
148 Boot HART Debug Triggers : 0 triggers
149 Boot HART MIDELEG : 0x0000000000000666
150 Boot HART MEDELEG : 0x0000000000f0b509
151
152 Test payload running
153 ssi_version_id=4.03*
154 fifo length is 64
155 heap: [0x002acb28 - 0x042acb28]
156
157 \ | /
158 - RT - Thread Smart Operating System
159 / | \ 5.2.1 build May 28 2025 08:24:41
160 2006 - 2024 Copyright by RT-Thread team
161 [I/drivers.serial] Using /dev/ttyS0 as default console
162 Mount "/dev/sd0p1" on "/"
163 Hello RT-Thread
164 msh />
165 / #
166 ```
167 # 6. 联系人信息
168 zhangjing@ultrarisc.com