Skip to content

Commit 0bdf9bd

Browse files
rcitachRbb666
authored andcommitted
add rk3500 doc
1 parent aee8920 commit 0bdf9bd

File tree

5 files changed

+355
-39
lines changed

5 files changed

+355
-39
lines changed

bsp/rockchip/rk3500/README.md

Lines changed: 161 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,197 @@
1-
2-
3-
4-
51
# RK3568 BSP Introduction
62

7-
[中文页]() | English
3+
[中文页](./README_ZH.md) | English
84

95
## 1. Introduction
106

11-
RK3568 is a general-purpose SOC, quad-core 64-bit Cortex-A55 processor, with 22nm lithography process, has frequency up to 2.0GHz and Mali G52 GPU, support 4K decoding and 1080P encoding. Support mangy interfaces such as SATA/PCIE/USB3.0, an 0.8T NPU for lightweight AI applications. Support dual Gigabit Ethernet ports, LPDDR4 memory, etc.
12-
13-
This project ported RT-Thread on RK3568, you can use the RADXA ROCK 3A version of the RK3568 in low-priced, which can even replace the Raspberry Pi 4B.
7+
### Core Architecture
8+
9+
- **CPU**: Quad-core 64-bit ARM Cortex-A55
10+
- **Process Node**: 22nm FinFET
11+
- **Clock Speed**: Up to 1.8GHz (boost)
12+
13+
### Graphics Subsystem
14+
15+
- **GPU**: ARM Mali-G52 MP2
16+
- Graphics APIs:
17+
- OpenGL ES 3.2/2.0/1.1
18+
- Vulkan 1.1
19+
- Display Outputs:
20+
- HDMI 2.0b
21+
- eDP 1.3
22+
- MIPI-DSI (4 lanes)
23+
- **Video Processing**:
24+
- Decoding: 4K@60fps (H.265/H.264/VP9)
25+
- Encoding: 1080P@60fps (H.264/H.265)
26+
27+
### Memory & Storage
28+
29+
- **RAM Support**:
30+
- Dual-channel LPDDR4/LPDDR4X
31+
- Max Capacity: 8GB
32+
- **Storage Options**:
33+
- eMMC 5.1 HS400
34+
- SD 3.0 UHS-I
35+
- Optional SATA III (6Gbps)
36+
- **High-Speed Interfaces**:
37+
- USB 3.0 Type-A/C
38+
- PCIe 2.1 (x1 lane)
39+
40+
### AI Acceleration
41+
42+
- **NPU**: 0.8 TOPS INT8
43+
- Framework Support:
44+
- TensorFlow Lite
45+
- MXNet
46+
- PyTorch Mobile
47+
48+
### Connectivity
49+
50+
- **Wired**:
51+
- Dual Gigabit Ethernet (RGMII)
52+
- **Wireless**:
53+
- Expansion via:
54+
- PCIe-based WiFi6
55+
- USB Bluetooth 5.0
56+
57+
### Multimedia I/O
58+
59+
- **Camera Input**:
60+
- Dual 4-lane MIPI-CSI
61+
- Supports up to 13MP sensors
1462

1563
## 2. Compiling
1664

17-
Usage ARM Developer GNU ToolChain, it support Linux and Windows:
65+
Use the RT-Thread Smart dedicated toolchain to compile:
1866

1967
```plaintext
20-
https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads/
21-
```
22-
23-
68+
wget https://github.com/RT-Thread/rt-thread/releases/download/v5.2.0/aarch64-linux-musleabi_for_x86_64-pc-linux-gnu_242520-979be38cba.tar.bz2
2469
25-
Download the `xxx-aarch64-none-elf` of x86_64 hosted platform, set the `RTT_EXEC_PATH` is system environment after decompress the binary.
70+
sudo tar -xf aarch64-linux-musleabi_for_x86_64-pc-linux-gnu_242520-979be38cba.tar.bz2 -C /opt
71+
```
2672

27-
Enter directory `rt-thread/bsp/qemu-virt64-aarch64` and input:
73+
After downloading, extract the toolchain to the /opt directory.Then configure your environment variables:
2874

2975
```plaintext
30-
scons
76+
export RTT_CC="gcc"
77+
export RTT_EXEC_PATH="/opt/aarch64-linux-musleabi_for_x86_64-pc-linux-gnu/bin/"
78+
export RTT_CC_PREFIX="aarch64-linux-musleabi-"
79+
export PATH="$RTT_EXEC_PATH:$PATH"
3180
```
3281

82+
Navigate to the rt-thread/bsp/rockchip/rk3500 directory and enter:
3383

84+
```shell
85+
scons --menuconfig
86+
```
3487

35-
## 3. Execution
36-
37-
RK3568 has different Kernel install methods according to different boardsit, recommend to install into the SD card: ([Official](https://wiki.t-firefly.com/en/ROC-RK3568-PC/hardware_doc.html)|[RADXA ROCK 3A](https://wiki.radxa.com/Rock3/install/microSD)).
88+
Select and pull the zlib package in the menu:
89+
![zlib_pack](./figures/zlib_pack.png)
3890

39-
After install Kernel, storage the `rtthread.bin` to EFI partition (the second partition), and add this line in the front of `boot.cmd` in this partition:
91+
Then run the following commands to fetch packages and build the project:
4092

4193
```shell
42-
fatload mmc 1:1 0x208000 /rtthread.bin;dcache flush;go 0x208000
94+
source ~/.env/tools/scripts/pkgs --update
95+
96+
scons
4397
```
4498

99+
## 3. Execution
45100

101+
The RK3566 SoC uses different methods to install the kernel depending on the board.It is recommended to install and boot from an SD card.The following steps take the Orange Pi Compute Module 4 as an example:
46102

47-
After modifying the script, build a binary script `boot.scr ` in this partition:
103+
Connect the serial port of the development board:
104+
![uart](./figures/uart.png)
48105

49-
```shell
50-
# Install the uboot-mkimage package on Linux, or use MSYS2 to install the u-boot-tools package on Windows
51-
mkimage -C none -A arm -T script -d boot.cmd boot.scr
52-
```
106+
1. Open a serial terminal, select the correct serial port, and set the baud rate to 1500000.
53107

108+
2. Copy the generated rtthread.bin file to the SD card.
54109

110+
3. Power up the development board and press Ctrl + C on the keyboard to enter U-Boot command line mode.
111+
![uboot_cmd](./figures/uboot_cmd.png)
55112

56-
According to different boards, the serial port can support up to UART0~9, this project uses UART2 ([Official](https://wiki.t-firefly.com/en/ROC-RK3568-PC/debug.html)|[RADXA ROCK 3A](https://wiki.radxa.com/Rock3/dev/serial-console)) by default, the baud rate is 1500000, please make sure that the serial port used supports this baud rate.
113+
4. Enter the following command to load and boot the Smart system:
114+
115+
```shell
116+
fatload mmc 1:1 0x480000 rtthread.bin;booti 0x480000 - 0x8300000
117+
```
57118

58119
```plaintext
59-
heap: [0x002663f0 - 0x042663f0]
120+
reading rtthread.bin
121+
1188080 bytes read in 102 ms (11.1 MiB/s)
122+
Fdt Ramdisk skip relocation
123+
## Flattened Device Tree blob at 0x08300000
124+
Booting using the fdt blob at 0x08300000
125+
'reserved-memory' linux,cma: addr=10000000 size=800000
126+
'reserved-memory' ramoops@110000: addr=110000 size=f0000
127+
Using Device Tree in place at 0000000008300000, end 000000000832048e
128+
Adding bank: 0x00200000 - 0x08400000 (size: 0x08200000)
129+
Adding bank: 0x09400000 - 0xf0000000 (size: 0xe6c00000)
130+
Adding bank: 0x1f0000000 - 0x200000000 (size: 0x10000000)
131+
== DO RELOCATE == Kernel from 0x00280000 to 0x00480000
132+
Total: 107148.892 ms
133+
134+
Starting kernel ...
135+
136+
[I/rtdm.ofw] Booting RT-Thread on physical CPU 0x0
137+
[I/rtdm.ofw] Machine model: Rockchip RK3566 Orange Pi CM4 Board
138+
[I/rtdm.ofw] Earlycon: uart8250 at MMIO/PIO 0x00000000fe660000 (options '')
139+
[I/rtdm.ofw] Memory node(1) ranges: 0x0000000000200000 - 0x0000000008400000
140+
[I/rtdm.ofw] Memory node(1) ranges: 0x0000000009400000 - 0x00000000f0000000
141+
[I/rtdm.ofw] Memory node(1) ranges: 0x00000001f0000000 - 0x0000000200000000
142+
[I/mm.memblock] System memory:
143+
[I/mm.memblock] [0x0000000000200000, 0x0000000008400000]
144+
[I/mm.memblock] [0x0000000009400000, 0x00000000f0000000]
145+
[I/mm.memblock] [0x00000001f0000000, 0x0000000200000000]
146+
[I/mm.memblock] Reserved memory:
147+
[I/mm.memblock] [0x0000000000110000, 0x0000000000200000]
148+
[I/mm.memblock] [0x0000000000480000, 0x00000000006c7000]
149+
[I/mm.memblock] [0x00000000006c7000, 0x00000000046c7000]
150+
[I/mm.memblock] [0x00000000046c7000, 0x00000000048c7000]
151+
[I/mm.memblock] [0x00000000048c7000, 0x00000000048e5000]
152+
[I/mm.memblock] [0x0000000008300000, 0x000000000831e000]
153+
[I/mm.memblock] [0x0000000010000000, 0x0000000010800000]
154+
[I/mm.memblock] [0x00000000edf00000, 0x00000000ee367400]
155+
[I/mm.memblock] [0x00000000eff00000, 0x00000000eff08000]
156+
[I/mm.memblock] physical memory region [0x0000000000200000-0x0000000000480000] installed to system page
157+
[I/mm.memblock] physical memory region [0x00000000048e5000-0x0000000008300000] installed to system page
158+
[I/mm.memblock] physical memory region [0x000000000831e000-0x0000000008400000] installed to system page
159+
[I/mm.memblock] physical memory region [0x0000000009400000-0x0000000010000000] installed to system page
160+
[I/mm.memblock] physical memory region [0x0000000010800000-0x00000000edf00000] installed to system page
161+
[I/mm.memblock] physical memory region [0x00000000ee368000-0x00000000eff00000] installed to system page
162+
[I/mm.memblock] physical memory region [0x00000000eff08000-0x00000000f0000000] installed to system page
163+
[I/mm.memblock] physical memory region [0x00000001f0000000-0x0000000200000000] installed to system page
164+
[I/mm.memblock] 4191 MB memory installed to system page
165+
[I/osi.psci] Using PSCI v1.1 Function IDs
166+
[I/clk.rk3568] set cpu_freq to 1800000000
167+
[I/rtdm.ofw] Console: uart0 (fiq-debugger)
60168
61169
\ | /
62-
- RT - Thread Operating System
63-
/ | \ 4.1.0 build Mar 19 2022 17:17:29
64-
2006 - 2022 Copyright by RT-Thread team
170+
- RT - Thread Smart Operating System
171+
/ | \ 5.2.1 build Apr 28 2025 09:19:08
172+
2006 - 2024 Copyright by RT-Thread team
173+
lwIP-2.1.2 initialized!
174+
[I/sal.skt] Socket Abstraction Layer initialize success.
175+
[I/utest] utest is initialize success.
176+
[I/utest] total utest testcase num: (5)
177+
[I/drivers.serial] Using /dev/ttyS0 as default console
178+
Press any key to stop init process startup ... 3
179+
Press any key to stop init process startup ... 2
180+
Press any key to stop init process startup ... 1
181+
Starting init ...
182+
[I/rtdm.mnt] File system initialization done
65183
Hi, this is RT-Thread!!
66-
msh />
67-
```
68-
69-
184+
msh />I/TC: Secondary CPU 1 initializing
185+
I/TC: Secondary CPU 1 switching to normal world boot
186+
[I/cpu.aa64] Call cpu 1 on success
187+
I/TC: Secondary CPU 3 initializing
188+
I/TC: Secondary CPU 3 switching to normal world boot
189+
I/TC: Secondary CPU 2 initializing
190+
I/TC: Secondary CPU 2 switching to normal world boot
191+
[I/cpu.aa64] Call cpu 3 on success
192+
[I/cpu.aa64] Call cpu 2 on success
70193
71-
## 4. Condition
194+
msh />
195+
msh />
72196
73-
| Driver | Condition | Remark |
74-
| ------ | --------- | ------- |
75-
| UART | Support | UART0~9 |
197+
```

0 commit comments

Comments
 (0)