• Home
  • Annotate
  • current directory
Name Date Size #Lines LOC

..21-Aug-2025-

applications/21-Aug-2025-

driver/21-Aug-2025-

figures/21-Aug-2025-

.config A D21-Aug-202549.1 KiB1,5211,405

Kconfig A D21-Aug-2025458 2719

README.md A D21-Aug-20253.5 KiB9154

README_zh.md A D21-Aug-20253.7 KiB12076

SConscript A D21-Aug-2025311 1511

SConstruct A D21-Aug-2025785 3122

link.lds A D21-Aug-20253.6 KiB142123

qemu-64.bat A D21-Aug-2025167 65

qemu-64.sh A D21-Aug-2025190 44

rtconfig.h A D21-Aug-202510.9 KiB510157

rtconfig.py A D21-Aug-20251.4 KiB5440

README.md

1# Raspberry PI 3–64 BSP (Board Support Package) Execution Instruction
2
3[中文页](README_zh.md) |
4
5## Introduction
6
7This document records the execution instruction of the BSP (board support package) provided by the RT-Thread development team for the Raspberry PI 3–64 development board.
8
9## **Compilation Instruction**
10
11### Build Environment on Windows
12
13It's recommended to use the [env tool ](https://github.com/RT-Thread/rt-thread/blob/master/documentation/env/env.md)to compile the Raspberry PI 3–64 BSP on Windows. Firstly, download the compiler GCC on Windows, from the official ARM website. You can refer to [Here](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads).
14
15Here we choose the version "[gcc-arm-8.3–2019.03-i686-mingw32-aarch64-elf].
16
17Unzip the compressed package to the local directory, like "E:/env/tools/gnu_gcc/arm_gcc".
18
19Then edit the file "<rt-thread_directory>/bsp/raspberry-pi/raspi3–64/rtconfig. py", modify the variable "EXEC_PATH" to the compiler path:
20
21```
22EXEC_PATH = r'E:/env/tools/gnu_gcc/arm_gcc/gcc-arm-8.3–2019.03-i686-mingw32-aarch64-elf/bin'
23```
24
25Finally, enter the BSP directory "<rt-thread_directory>/bsp/raspberry-pi/raspi3–64/" and execute the "scons" command.
26
27### Build Environment on Linux
28
29The steps to build Raspberry PI 3–64 BSP on Linux is pretty similar to that on Windows, the only difference is that we need to download the GCC on Linux instead, such as the version "gcc-arm-8.3–2019.03-x86_64-aarch64-elf".
30
31Then we unpack the compiler package, modify the file "rtconfig.h" and run "scons".
32
33## Execution
34
35### Prepare the raspbian SD card
36
37- Download the raspbian image, for example, "2018–06–27-raspbian-stretch-lite.zip". Unpack it.
38
39- Burn the SD card on Windows
40
41On Windows, download the burning tool "[etcher.io](http://etcher.io/)", run it and choose the unpacked image "2018–06–27-raspbian-stretch-lite.img".
42
43When the burning process is completed, put "kernel8.img" into the boot partition to replace the file wit the same name.
44
45- Burn the SD card on Linux
46
47Prepare an empty SD card, plug it in the computer and then execute the command below: "sudo dd if=2018–06–27-raspbian-stretch-lite.img of=/dev/xxx bs=32M conv=fsync"
48
49Note that the device file "/dev/xxx" should be replaced with the real SD card.
50
51### Prepare the serial port wire
52
53The BSP uses GPIO 14 & GPIO 15 of raspi 3 as the communication ports, as shown in the following image (The board is raspberry-pi2, which uses the same pins as raspi-3):
54
55
56
57[![raspi2](https://github.com/RT-Thread/rt-thread/raw/master/bsp/raspberry-pi/raspi3-64/figures/raspi_uart.png)](https://github.com/RT-Thread/rt-thread/blob/master/bsp/raspberry-pi/raspi3-64/figures/raspi_uart.png)
58
59The serial port parameters: 115200 8N1, hardware and software flow control is off.
60
61## Running Result
62
63Insert the burned SD card into Raspberry Pi, power up, the output information on serial port should be like this:
64
65```
66 heap: 0x00020b20 - 0x00400000
67
68 \ | /
69- RT -     Thread Operating System
70 / | \     3.1.0 build Aug 23 2019
71 2006 - 2019 Copyright by rt-thread team
72Hello RT-Thread!
73msh >
74```
75
76## Peripheral Condition
77
78| Drive | Support | Remark |
79| ----- | ------- | ------ |
80| UART  | Support | UART0  |
81| GPIO | Support | - |
82| I2C | Support | - |
83| RTC | Support | - |
84| SDIO | Support | SDCARD |
85| SPI | Support | - |
86| TIMER | Support | - |
87| WDT | Support | - |
88| MBOX | Support | - |
89| FRAMEBUFFER | Support | HDMI |
90
91

README_zh.md

1# Raspberry PI 3-64板级支持包说明
2
3## 1. 简介
4
5树莓派由注册于英国的慈善组织“Raspberry Pi 基金会”开发,莓派3有三个发行版本:
6
7* B : 4核 Broadcom BCM2837 (ARMv8-A) 1.2GHz,双核VideoCore IV GPU,1GB内存,100 Base-T Ethernet
8* B+: 4核 Broadcom BCM2837B0 Cortex-A53 (ARMv8) 1.4GHz, 1GB LPDDR2 SDRAM, GigaE over USB 2.0
9* A+: 4核 Broadcom BCM2837B0 Cortex-A53 (ARMv8) 1.4GHz, 512MB LPDDR2 SDRAM
10
11这份RT-Thread BSP是针对 Raspberry Pi 3 64位模式的一份移植,树莓派价格便宜, 使用者甚众,是研究和运行RT-Thread的可选平台之一。
12
13
14## 2. 编译说明
15
16### 2.1 Window上的环境搭建
17
18Windows环境下推荐使用[env工具][1]进行编译。
19
20首先下载windows上的aarch64的gcc交叉编译工具,版本为gcc-arm-8.3选择aarch64-elf就可以。
21
22将推荐将gcc解压到`\env\tools\gnu_gcc\arm_gcc`目录下。
23
24接着修改`bsp\raspberry-pi\raspi3-64\rtconfig.py`
25
26修改路径:
27
28```
29EXEC_PATH = r'E:/env_released_1.1.2/env/tools/gnu_gcc/arm_gcc/gcc-arm-8.3-2019.03-i686-mingw32-aarch64-elf/bin'
30```
31
32然后在`bsp\raspberry-pi\raspi3-64\`下输入scons编译即可。
33
34**window环境搭建注意**
35
36下载完成`gcc-arm-8.3-2019.03-i686-mingw32-aarch64-elf.tar.xz`交叉编译工具链后,最好采用7-zip解压工具进行两次解压。
37确保解压目录下的`/bin/aarch64-elf-ld.exe`文件的size不为0。
38否则编译会出现如下错误:
39
40```
41collect2.exe:fatal error:CreateProcess:No such file or directory
42```
43
44### 2.2 Linux上的环境搭建
45
46Linux下推荐使用[gcc工具][2]。Linux版本下gcc版本可采用`gcc-arm-8.3-2019.03-x86_64-aarch64-elf`。
47
48直接进入`bsp\raspberry-pi\raspi3-64`,输入scons编译即可。
49
50
51## 3. 执行
52
53### 3.1 下载[raspbian镜像][3],生成可以运行的raspbian SD卡
54
55Windows下,去[etcher.io][4]下载etcher,这是个可以烧写img的工具
56
57解开下载的镜像文件, linux下使用如下的命令
58
59```
60unzip 2018-06-27-raspbian-stretch-lite.zip
61```
62
63准备一张空SD卡,linux环境下,插入电脑并执行
64
65```
66sudo dd if=2018-06-27-raspbian-stretch-lite.img of=/dev/xxx bs=32M conv=fsync
67```
68
69**注意: /dev/xxx 要换成真实环境中的SD卡所在设置,千万不要弄错。**
70
71Windows环境下,执行etcher选择解压后的2018-06-27-raspbian-stretch-lite.img文件和SD卡就可以开始烧写了。
72
73最后把kernel8.img放入SD boot分区,删除其它 kernel*.img。
74
75### 3.2 准备好串口线
76
77目前版本是使用raspi3的 GPIO 14, GPIO 15来作路口输出,连线情况如下图所示(图片中的板子是pi2,GPIO引脚是一样的):
78
79![raspi2](figures/raspi_uart.png)
80
81串口参数: 115200 8N1 ,硬件和软件流控为关。
82
83按上面的方法做好SD卡后,插入树莓派,通电可以在串口上看到如下所示的输出信息:
84
85```text
86 heap: 0x00020b20 - 0x00400000
87
88 \ | /
89- RT -     Thread Operating System
90 / | \     3.1.0 build Aug 23 2019
91 2006 - 2019 Copyright by rt-thread team
92Hello RT-Thread!
93msh >
94```
95
96## 4. 支持情况
97
98| 驱动 | 支持情况  |  备注  |
99| ------ | ----  | :------:  |
100| UART | 支持 | UART0|
101| GPIO | 支持 | - |
102| I2C | 支持 | - |
103| RTC | 支持 | - |
104| SDIO | 支持 | SDCARD |
105| SPI | 支持 | - |
106| TIMER | 支持 | - |
107| WDT | 支持 | - |
108| MBOX | 支持 | - |
109| FRAMEBUFFER | 支持 | HDMI |
110
111## 5. 联系人信息
112
113维护人:[bigmagic123][5]
114
115[1]: https://www.rt-thread.org/download.html#download-rt-thread-env-tool
116[2]: https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads
117[3]: https://downloads.raspberrypi.org/raspbian_lite_latest
118[4]: https://etcher.io
119[5]: https://github.com/bigmagic123
120