mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-20 22:37:14 +00:00
Update BSP README with EN Version.
This commit is contained in:
@@ -1,107 +1,96 @@
|
||||
# Raspberry PI 3B(32位)板级支持包说明
|
||||
# Raspberry PI 3B 32 BSP (Board Support Package) Execution Instruction
|
||||
|
||||
## 1. 简介
|
||||
[中文页](README_zh.md) |
|
||||
|
||||
树莓派由注册于英国的慈善组织“Raspberry Pi 基金会”开发,莓派3采用4核Broadcom BCM2837 (ARMv8)芯片、双核VideoCore IV GPU和1GB内存。
|
||||
## Introduction
|
||||
|
||||
这份RT-Thread BSP是针对 Raspberry Pi 3B (32位)的一份移植,树莓派价格便宜, 使用者甚众,是研究和运行RT-Thread的可选平台之一。
|
||||
This document records the execution instruction of the BSP (board support package) provided by the RT-Thread development team for the Raspberry PI 3B 32 development board.
|
||||
|
||||
随着RT-Thread的发展,它越来越多的向一些Cortex-A等AP类处理器提供支持,例如全志的ARM9、Cortex-A处理器,Xilinx的Zynq处理器等。
|
||||
[](https://github.com/RT-Thread/rt-thread/blob/master/bsp/raspberry-pi/raspi3-32/figures/raspi3_f.jpg)
|
||||
|
||||
而RT-Thread也是一套高度社区化发展的操作系统,所以在一些方向推进上希望以社区化方式,大家一起来推动的方式向前发展,在这个过程中RT-Thread得到了不同开发者、不同领域的应用,一步步把RT-Thread推向成熟。而在Cortex-A平台上,目前最流行的硬件平台是树莓派,分树莓派[2B](https://www.raspberrypi.org/products/raspberry-pi-2-model-b/)、[3B](https://www.raspberrypi.org/products/raspberry-pi-3-model-b/)以及最新的[4B](https://www.raspberrypi.org/products/raspberry-pi-4-model-b/)等。
|
||||
[](https://github.com/RT-Thread/rt-thread/blob/master/bsp/raspberry-pi/raspi3-32/figures/raspi3_b.jpg)
|
||||
|
||||
RT-Thread对树莓派的支持主要从树莓派2B开始,它是一个四核Cortex-A7的平台,以32位单核的模式运行。后续将推动着RT-Thread向树莓派3,四核Cortex-A53 64位模式发展(中间当然也可能出现四核Cortex-A7模式执行的过渡性版本)。
|
||||
## Hardware Features
|
||||
|
||||

|
||||
| Hardware | Description |
|
||||
| -------------- | ----------------------------------------- |
|
||||
| CPU | quad-core ARM Cortex A53(ARMv8) |
|
||||
| Main Frequency | 1.2 GHz |
|
||||
| GPU | VideoCore IV |
|
||||
| GPU Frequency | 400MHz |
|
||||
| Memory | 1GB (0x0000000 - 0x40000000) |
|
||||
| | 0x3f000000 - 0x40000000 is for peripheral |
|
||||
|
||||

|
||||
**The description of functional pins is as shown as follow:**
|
||||
|
||||
当前Raspberry Pi 3B对应的硬件特性:
|
||||
[](https://github.com/RT-Thread/rt-thread/blob/master/bsp/raspberry-pi/raspi3-32/figures/GPIO-Pinout-Diagram-2.png)
|
||||
|
||||
| 硬件 | 描述 |
|
||||
|------- | ------------------------------- |
|
||||
| CPU | quad-core ARM Cortex A53(ARMv8) |
|
||||
| 主频 | 1.2 GHz |
|
||||
| GPU | VideoCore IV |
|
||||
| GPU频率 | 400MHz |
|
||||
| Memory | 1GB (0x0000000 - 0x40000000) |
|
||||
| | 其中0x3f000000 - 0x40000000为peripheral |
|
||||
## **Compilation Instruction**
|
||||
|
||||
硬件引脚分布情况
|
||||
The [env](https://www.rt-thread.io/download.html?download=Env) tool is recommended for compiling in Windows environments.
|
||||
|
||||

|
||||
|
||||
## 2. 编译说明
|
||||
|
||||
Windows环境下推荐使用[env工具][1]进行编译。
|
||||
|
||||
Linux下推荐使用gcc工具 gcc-arm-none-eabi-5_4-2016q3,如果还没有编译工具,下载后,解开文件。
|
||||
The cross-compiler gcc-arm-none-eabi-4_8-2014q1_linux is recommended in Linux environment. If you don’t have compiling tool, please uncompress the downloaded package like this:
|
||||
|
||||
```
|
||||
tar vxf gcc-arm-none-eabi-5_4-2016q3-20160926-linux.tar.bz2
|
||||
tar vxf gcc-arm-none-eabi-4_8-2014q1_linux.tar.bz2
|
||||
```
|
||||
|
||||
Linux环境下需要修改编译器目录设置,修改`bsp/raspi3-32/rtconfig.py`中的
|
||||
In Linux environment, you need to modify the settings of the compiler directory, and modify the actual directory of the compiling tool in bsp/raspi3-32/rtconfig. py, remember to add the suffix /bin here.
|
||||
|
||||
```
|
||||
EXEC_PATH = r'/opt/gcc-arm-none-eabi-5_4-2016q3/bin'
|
||||
EXEC_PATH = r'/opt/gcc-arm-none-eabi-4_8-2014q1_gri/bin'
|
||||
```
|
||||
|
||||
为编译工具的实际所在目录,这里注意要加上后缀 `/bin`
|
||||
|
||||
进入到`rt-thread/bsp/raspi3-32`目录中,运行以下命令:
|
||||
Enter the rt-thread/bsp/raspi3-32 directory and run the following command to compile this BSP:
|
||||
|
||||
```
|
||||
scons
|
||||
```
|
||||
|
||||
来编译这个板级支持包。如果编译正确无误,会产生rtthread.elf、kernel7.img文件。
|
||||
kernel7.img即是要cp到raspberry SD卡中根目录的文件
|
||||
If everything goes well, a new 'rtthread.elf' and 'kernel7.img' file will be generated. ‘kernel7.img' is what we need to put into the root directory of the Raspberry PI 3B SD card.
|
||||
|
||||
### 2.1 eclipse 编码环境 ###
|
||||
第一步: 安装 eclipse cdt
|
||||
第二步: 打开 eclipse cdt 设置workspace ,推荐设置于xxx\xxx\rt-thread\bsp
|
||||
第三步: Import 工程 General-> Existing Peojects into Workspace 然后 Browse.. 你的raspi3目录,点击Finish
|
||||
### **Eclipse compiling environment**
|
||||
|
||||
btw:编译依旧使用scons,目前不支持qemu debug,后期如果有大佬实现ARM JTAG调试
|
||||
- Step 1: Install the eclipse plugin 'cdt'.
|
||||
- Step 2: Open eclipse cdt and set workspace, and set the workspace to 'rt-thread/bsp/raspberry-pi/raspi3-32'.
|
||||
- Step 3: Import the project by selecting 'General->Existing Projects into Workspace' and then 'Browse ...'. Noted that the compiling only supports scons now.
|
||||
|
||||
|
||||
## 3. 执行
|
||||
## **Running**
|
||||
|
||||
### 3.1 下载[raspbian镜像][3],生成可以运行的raspbian SD卡
|
||||
### **Prepare the [Raspbian](https://downloads.raspberrypi.org/raspbian_lite_latest) SD card**
|
||||
|
||||
Windows下,去[etcher.io][4]下载etcher,这是个可以烧写img的工具
|
||||
Download the raspbian image, for example, "2018-06-27-raspbian-stretch-lite.zip". Unpack it.
|
||||
|
||||
解开下载的镜像文件, linux下使用如下的命令
|
||||
**Burn the SD card on Windows**
|
||||
|
||||
On Windows, download the burning tool " [etcher.io](https://www.balena.io/etcher/) ", run it and choose the unpacked image "2018-06-27-raspbian-stretch-lite.img".
|
||||
|
||||
When the burning process is completed, put "kernel8.img" into the boot partition to replace the file wit the same name.
|
||||
|
||||
**Burn the SD card on Linux**
|
||||
|
||||
Prepare 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"
|
||||
|
||||
Note that the device file "/dev/xxx" should be replaced with the real SD card.
|
||||
|
||||
### **Prepare the serial port wire**
|
||||
|
||||
The BSP uses GPIO 14 & GPIO 15 of raspi 3 as the communication ports, as shown in the following image:
|
||||
|
||||
|
||||
|
||||
[](https://github.com/RT-Thread/rt-thread/blob/master/bsp/raspberry-pi/raspi3-32/figures/raspberrypi-console.png)
|
||||
|
||||
The serial port parameters: 115200 8N1, hardware and software flow control is off.
|
||||
|
||||
## **Running Result**
|
||||
|
||||
Insert the burned SD card into Raspberry Pi, power up, the output information on the serial port should be like this:
|
||||
|
||||
```
|
||||
unzip 2018-06-27-raspbian-stretch-lite.zip
|
||||
```
|
||||
|
||||
准备一张空SD卡,linux环境下,插入电脑并执行
|
||||
|
||||
```
|
||||
sudo dd if=2018-06-27-raspbian-stretch-lite.img of=/dev/xxx bs=32M conv=fsync
|
||||
```
|
||||
|
||||
**注意: /dev/xxx 要换成真实环境中的SD卡所在设置,千万不要弄错。**
|
||||
|
||||
Windows环境下,执行etcher选择解压后的2018-06-27-raspbian-stretch-lite.img文件和SD卡就可以开始烧写了。
|
||||
|
||||
最后把kernel7.img放入SD boot分区,覆盖原来的文件。
|
||||
|
||||
### 3.2 准备好串口线
|
||||
|
||||
目前版本是使用raspi3的 GPIO 14, GPIO 15来作路口输出,连线情况如下图所示:
|
||||
|
||||
|
||||
|
||||

|
||||
|
||||
串口参数: 115200 8N1 ,硬件和软件流控为关。
|
||||
|
||||
按上面的方法做好SD卡后,插入树莓派3B,通电可以在串口上看到如下所示的输出信息:
|
||||
|
||||
```text
|
||||
heap: 0x0005d784 - 0x0045d784
|
||||
|
||||
\ | /
|
||||
@@ -131,23 +120,14 @@ Hello RT-Thread!
|
||||
msh />
|
||||
```
|
||||
|
||||
## 4. 支持情况
|
||||
## **Peripheral Condition**
|
||||
|
||||
| 驱动 | 支持情况 | 备注 |
|
||||
| ------ | ---- | :------: |
|
||||
| UART | 支持 | UART0|
|
||||
| GPIO | 支持 | |
|
||||
| IIC | 支持 | |
|
||||
| SPI | 支持 | |
|
||||
| CPU Timer | 支持 | |
|
||||
| SD卡驱动 | 支持 | |
|
||||
| Drive | Support | Remark |
|
||||
| -------------- | ------- | ------ |
|
||||
| UART | Support | UART0 |
|
||||
| GPIO | Support | |
|
||||
| IIC | Support | |
|
||||
| SPI | Support | |
|
||||
| CPU Timer | Support | |
|
||||
| SD card driver | Support | |
|
||||
|
||||
## 5. 联系人信息
|
||||
|
||||
维护人:[bernard][5]
|
||||
|
||||
[1]: https://www.rt-thread.org/page/download.html
|
||||
[2]: https://launchpad.net/gcc-arm-embedded/4.8/4.8-2014-q1-update/+download/gcc-arm-none-eabi-4_8-2014q1-20140314-linux.tar.bz2
|
||||
[3]: https://downloads.raspberrypi.org/raspbian_lite_latest
|
||||
[4]: https://etcher.io
|
||||
[5]: https://github.com/BernardXiong
|
||||
|
||||
153
bsp/raspberry-pi/raspi3-32/README_zh.md
Normal file
153
bsp/raspberry-pi/raspi3-32/README_zh.md
Normal file
@@ -0,0 +1,153 @@
|
||||
# Raspberry PI 3B(32位)板级支持包说明
|
||||
|
||||
## 1. 简介
|
||||
|
||||
树莓派由注册于英国的慈善组织“Raspberry Pi 基金会”开发,莓派3采用4核Broadcom BCM2837 (ARMv8)芯片、双核VideoCore IV GPU和1GB内存。
|
||||
|
||||
这份RT-Thread BSP是针对 Raspberry Pi 3B (32位)的一份移植,树莓派价格便宜, 使用者甚众,是研究和运行RT-Thread的可选平台之一。
|
||||
|
||||
随着RT-Thread的发展,它越来越多的向一些Cortex-A等AP类处理器提供支持,例如全志的ARM9、Cortex-A处理器,Xilinx的Zynq处理器等。
|
||||
|
||||
而RT-Thread也是一套高度社区化发展的操作系统,所以在一些方向推进上希望以社区化方式,大家一起来推动的方式向前发展,在这个过程中RT-Thread得到了不同开发者、不同领域的应用,一步步把RT-Thread推向成熟。而在Cortex-A平台上,目前最流行的硬件平台是树莓派,分树莓派[2B](https://www.raspberrypi.org/products/raspberry-pi-2-model-b/)、[3B](https://www.raspberrypi.org/products/raspberry-pi-3-model-b/)以及最新的[4B](https://www.raspberrypi.org/products/raspberry-pi-4-model-b/)等。
|
||||
|
||||
RT-Thread对树莓派的支持主要从树莓派2B开始,它是一个四核Cortex-A7的平台,以32位单核的模式运行。后续将推动着RT-Thread向树莓派3,四核Cortex-A53 64位模式发展(中间当然也可能出现四核Cortex-A7模式执行的过渡性版本)。
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
当前Raspberry Pi 3B对应的硬件特性:
|
||||
|
||||
| 硬件 | 描述 |
|
||||
|------- | ------------------------------- |
|
||||
| CPU | quad-core ARM Cortex A53(ARMv8) |
|
||||
| 主频 | 1.2 GHz |
|
||||
| GPU | VideoCore IV |
|
||||
| GPU频率 | 400MHz |
|
||||
| Memory | 1GB (0x0000000 - 0x40000000) |
|
||||
| | 其中0x3f000000 - 0x40000000为peripheral |
|
||||
|
||||
硬件引脚分布情况
|
||||
|
||||

|
||||
|
||||
## 2. 编译说明
|
||||
|
||||
Windows环境下推荐使用[env工具][1]进行编译。
|
||||
|
||||
Linux下推荐使用gcc工具 gcc-arm-none-eabi-5_4-2016q3,如果还没有编译工具,下载后,解开文件。
|
||||
|
||||
```
|
||||
tar vxf gcc-arm-none-eabi-5_4-2016q3-20160926-linux.tar.bz2
|
||||
```
|
||||
|
||||
Linux环境下需要修改编译器目录设置,修改`bsp/raspi3-32/rtconfig.py`中的
|
||||
|
||||
```
|
||||
EXEC_PATH = r'/opt/gcc-arm-none-eabi-5_4-2016q3/bin'
|
||||
```
|
||||
|
||||
为编译工具的实际所在目录,这里注意要加上后缀 `/bin`
|
||||
|
||||
进入到`rt-thread/bsp/raspi3-32`目录中,运行以下命令:
|
||||
|
||||
```
|
||||
scons
|
||||
```
|
||||
|
||||
来编译这个板级支持包。如果编译正确无误,会产生rtthread.elf、kernel7.img文件。
|
||||
kernel7.img即是要cp到raspberry SD卡中根目录的文件
|
||||
|
||||
### 2.1 eclipse 编码环境 ###
|
||||
第一步: 安装 eclipse cdt
|
||||
第二步: 打开 eclipse cdt 设置workspace ,推荐设置于xxx\xxx\rt-thread\bsp
|
||||
第三步: Import 工程 General-> Existing Peojects into Workspace 然后 Browse.. 你的raspi3目录,点击Finish
|
||||
|
||||
btw:编译依旧使用scons,目前不支持qemu debug,后期如果有大佬实现ARM JTAG调试
|
||||
|
||||
## 3. 执行
|
||||
|
||||
### 3.1 下载[raspbian镜像][3],生成可以运行的raspbian SD卡
|
||||
|
||||
Windows下,去[etcher.io][4]下载etcher,这是个可以烧写img的工具
|
||||
|
||||
解开下载的镜像文件, linux下使用如下的命令
|
||||
|
||||
```
|
||||
unzip 2018-06-27-raspbian-stretch-lite.zip
|
||||
```
|
||||
|
||||
准备一张空SD卡,linux环境下,插入电脑并执行
|
||||
|
||||
```
|
||||
sudo dd if=2018-06-27-raspbian-stretch-lite.img of=/dev/xxx bs=32M conv=fsync
|
||||
```
|
||||
|
||||
**注意: /dev/xxx 要换成真实环境中的SD卡所在设置,千万不要弄错。**
|
||||
|
||||
Windows环境下,执行etcher选择解压后的2018-06-27-raspbian-stretch-lite.img文件和SD卡就可以开始烧写了。
|
||||
|
||||
最后把kernel7.img放入SD boot分区,覆盖原来的文件。
|
||||
|
||||
### 3.2 准备好串口线
|
||||
|
||||
目前版本是使用raspi3的 GPIO 14, GPIO 15来作路口输出,连线情况如下图所示:
|
||||
|
||||
|
||||
|
||||

|
||||
|
||||
串口参数: 115200 8N1 ,硬件和软件流控为关。
|
||||
|
||||
按上面的方法做好SD卡后,插入树莓派3B,通电可以在串口上看到如下所示的输出信息:
|
||||
|
||||
```text
|
||||
heap: 0x0005d784 - 0x0045d784
|
||||
|
||||
\ | /
|
||||
- RT - Thread Operating System
|
||||
/ | \ 4.0.2 build Jan 9 2020
|
||||
2006 - 2019 Copyright by rt-thread team
|
||||
[I/I2C] I2C bus [i2c0] registered
|
||||
[I/I2C] I2C bus [i2c1] registered
|
||||
[I/SDIO] SD card capacity 15558144 KB.
|
||||
found part[0], begin: 1048576, size: 63.0MB
|
||||
found part[1], begin: 67108864, size: 14.793GB
|
||||
file system initialization done!
|
||||
boot cpu:3
|
||||
msh />cpu = 0x00000003
|
||||
cpu 3 startup.
|
||||
start OK: CPU 3
|
||||
boot cpu:2
|
||||
cpu = 0x00000002
|
||||
cpu 2 startup.
|
||||
start OK: CPU 2
|
||||
boot cpu:1
|
||||
cpu = 0x00000001
|
||||
cpu 1 startup.
|
||||
start OK: CPU 1
|
||||
Hello RT-Thread!
|
||||
|
||||
msh />
|
||||
```
|
||||
|
||||
## 4. 支持情况
|
||||
|
||||
| 驱动 | 支持情况 | 备注 |
|
||||
| ------ | ---- | :------: |
|
||||
| UART | 支持 | UART0|
|
||||
| GPIO | 支持 | |
|
||||
| IIC | 支持 | |
|
||||
| SPI | 支持 | |
|
||||
| CPU Timer | 支持 | |
|
||||
| SD卡驱动 | 支持 | |
|
||||
|
||||
## 5. 联系人信息
|
||||
|
||||
维护人:[bernard][5]
|
||||
|
||||
[1]: https://www.rt-thread.org/page/download.html
|
||||
[2]: https://launchpad.net/gcc-arm-embedded/4.8/4.8-2014-q1-update/+download/gcc-arm-none-eabi-4_8-2014q1-20140314-linux.tar.bz2
|
||||
[3]: https://downloads.raspberrypi.org/raspbian_lite_latest
|
||||
[4]: https://etcher.io
|
||||
[5]: https://github.com/BernardXiong
|
||||
@@ -1,88 +1,68 @@
|
||||
# Raspberry PI 3-64板级支持包说明
|
||||
# Raspberry PI 3–64 BSP (Board Support Package) Execution Instruction
|
||||
|
||||
## 1. 简介
|
||||
[中文页](README_zh.md) |
|
||||
|
||||
树莓派由注册于英国的慈善组织“Raspberry Pi 基金会”开发,莓派3有三个发行版本:
|
||||
## Introduction
|
||||
|
||||
* B : 4核 Broadcom BCM2837 (ARMv8-A) 1.2GHz,双核VideoCore IV GPU,1GB内存,100 Base-T Ethernet
|
||||
* B+: 4核 Broadcom BCM2837B0 Cortex-A53 (ARMv8) 1.4GHz, 1GB LPDDR2 SDRAM, GigaE over USB 2.0
|
||||
* A+: 4核 Broadcom BCM2837B0 Cortex-A53 (ARMv8) 1.4GHz, 512MB LPDDR2 SDRAM
|
||||
This 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.
|
||||
|
||||
这份RT-Thread BSP是针对 Raspberry Pi 3 64位模式的一份移植,树莓派价格便宜, 使用者甚众,是研究和运行RT-Thread的可选平台之一。
|
||||
## **Compilation Instruction**
|
||||
|
||||
### Build Environment on Windows
|
||||
|
||||
## 2. 编译说明
|
||||
It's recommended to use the [env tool ](https://github.com/RT-Thread/rtthread-manual-doc/blob/master/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).
|
||||
|
||||
### 2.1 Window上的环境搭建
|
||||
Here we choose the version "[gcc-arm-8.3–2019.03-i686-mingw32-aarch64-elf].
|
||||
|
||||
Windows环境下推荐使用[env工具][1]进行编译。
|
||||
Unzip the compressed package to the local directory, like "E:/env/tools/gnu_gcc/arm_gcc".
|
||||
|
||||
首先下载windows上的aarch64的gcc交叉编译工具,版本为gcc-arm-8.3选择aarch64-elf就可以。
|
||||
|
||||
将推荐将gcc解压到`\env\tools\gnu_gcc\arm_gcc`目录下。
|
||||
|
||||
接着修改`bsp\raspberry-pi\raspi3-64\rtconfig.py`
|
||||
|
||||
修改路径:
|
||||
Then edit the file "<rt-thread_directory>/bsp/raspberry-pi/raspi3–64/rtconfig. py", modify the variable "EXEC_PATH" to the compiler path:
|
||||
|
||||
```
|
||||
EXEC_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'
|
||||
EXEC_PATH = r'E:/env/tools/gnu_gcc/arm_gcc/gcc-arm-8.3–2019.03-i686-mingw32-aarch64-elf/bin'
|
||||
```
|
||||
|
||||
然后在`bsp\raspberry-pi\raspi3-64\`下输入scons编译即可。
|
||||
Finally, enter the BSP directory "<rt-thread_directory>/bsp/raspberry-pi/raspi3–64/" and execute the "scons" command.
|
||||
|
||||
**window环境搭建注意**
|
||||
### Build Environment on Linux
|
||||
|
||||
下载完成`gcc-arm-8.3-2019.03-i686-mingw32-aarch64-elf.tar.xz`交叉编译工具链后,最好采用7-zip解压工具进行两次解压。
|
||||
确保解压目录下的`/bin/aarch64-elf-ld.exe`文件的size不为0。
|
||||
否则编译会出现如下错误:
|
||||
The 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".
|
||||
|
||||
Then we unpack the compiler package, modify the file "rtconfig.h" and run "scons".
|
||||
|
||||
## Execution
|
||||
|
||||
### Prepare the raspbian SD card
|
||||
|
||||
- Download the raspbian image, for example, "2018–06–27-raspbian-stretch-lite.zip". Unpack it.
|
||||
|
||||
- Burn the SD card on Windows
|
||||
|
||||
On Windows, download the burning tool "[etcher.io](http://etcher.io/)", run it and choose the unpacked image "2018–06–27-raspbian-stretch-lite.img".
|
||||
|
||||
When the burning process is completed, put "kernel8.img" into the boot partition to replace the file wit the same name.
|
||||
|
||||
- Burn the SD card on Linux
|
||||
|
||||
Prepare 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"
|
||||
|
||||
Note that the device file "/dev/xxx" should be replaced with the real SD card.
|
||||
|
||||
### Prepare the serial port wire
|
||||
|
||||
The 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):
|
||||
|
||||
|
||||
|
||||
[](https://github.com/RT-Thread/rt-thread/blob/master/bsp/raspberry-pi/raspi3-64/figures/raspi_uart.png)
|
||||
|
||||
The serial port parameters: 115200 8N1, hardware and software flow control is off.
|
||||
|
||||
## Running Result
|
||||
|
||||
Insert the burned SD card into Raspberry Pi, power up, the output information on serial port should be like this:
|
||||
|
||||
```
|
||||
collect2.exe:fatal error:CreateProcess:No such file or directory
|
||||
```
|
||||
|
||||
### 2.2 Linux上的环境搭建
|
||||
|
||||
Linux下推荐使用[gcc工具][2]。Linux版本下gcc版本可采用`gcc-arm-8.3-2019.03-x86_64-aarch64-elf`。
|
||||
|
||||
直接进入`bsp\raspberry-pi\raspi3-64`,输入scons编译即可。
|
||||
|
||||
|
||||
## 3. 执行
|
||||
|
||||
### 3.1 下载[raspbian镜像][3],生成可以运行的raspbian SD卡
|
||||
|
||||
Windows下,去[etcher.io][4]下载etcher,这是个可以烧写img的工具
|
||||
|
||||
解开下载的镜像文件, linux下使用如下的命令
|
||||
|
||||
```
|
||||
unzip 2018-06-27-raspbian-stretch-lite.zip
|
||||
```
|
||||
|
||||
准备一张空SD卡,linux环境下,插入电脑并执行
|
||||
|
||||
```
|
||||
sudo dd if=2018-06-27-raspbian-stretch-lite.img of=/dev/xxx bs=32M conv=fsync
|
||||
```
|
||||
|
||||
**注意: /dev/xxx 要换成真实环境中的SD卡所在设置,千万不要弄错。**
|
||||
|
||||
Windows环境下,执行etcher选择解压后的2018-06-27-raspbian-stretch-lite.img文件和SD卡就可以开始烧写了。
|
||||
|
||||
最后把kernel8.img放入SD boot分区,删除其它 kernel*.img。
|
||||
|
||||
### 3.2 准备好串口线
|
||||
|
||||
目前版本是使用raspi3的 GPIO 14, GPIO 15来作路口输出,连线情况如下图所示(图片中的板子是pi2,GPIO引脚是一样的):
|
||||
|
||||

|
||||
|
||||
串口参数: 115200 8N1 ,硬件和软件流控为关。
|
||||
|
||||
按上面的方法做好SD卡后,插入树莓派,通电可以在串口上看到如下所示的输出信息:
|
||||
|
||||
```text
|
||||
heap: 0x00020b20 - 0x00400000
|
||||
|
||||
\ | /
|
||||
@@ -93,18 +73,9 @@ Hello RT-Thread!
|
||||
msh >
|
||||
```
|
||||
|
||||
## 4. 支持情况
|
||||
## Peripheral Condition
|
||||
|
||||
| 驱动 | 支持情况 | 备注 |
|
||||
| ------ | ---- | :------: |
|
||||
| UART | 支持 | UART0|
|
||||
| Drive | Support | Remark |
|
||||
| ----- | ------- | ------ |
|
||||
| UART | Support | UART0 |
|
||||
|
||||
## 5. 联系人信息
|
||||
|
||||
维护人:[bernard][5]
|
||||
|
||||
[1]: https://www.rt-thread.org/page/download.html
|
||||
[2]: https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads
|
||||
[3]: https://downloads.raspberrypi.org/raspbian_lite_latest
|
||||
[4]: https://etcher.io
|
||||
[5]: https://github.com/BernardXiong
|
||||
|
||||
110
bsp/raspberry-pi/raspi3-64/README_zh.md
Normal file
110
bsp/raspberry-pi/raspi3-64/README_zh.md
Normal file
@@ -0,0 +1,110 @@
|
||||
# Raspberry PI 3-64板级支持包说明
|
||||
|
||||
## 1. 简介
|
||||
|
||||
树莓派由注册于英国的慈善组织“Raspberry Pi 基金会”开发,莓派3有三个发行版本:
|
||||
|
||||
* B : 4核 Broadcom BCM2837 (ARMv8-A) 1.2GHz,双核VideoCore IV GPU,1GB内存,100 Base-T Ethernet
|
||||
* B+: 4核 Broadcom BCM2837B0 Cortex-A53 (ARMv8) 1.4GHz, 1GB LPDDR2 SDRAM, GigaE over USB 2.0
|
||||
* A+: 4核 Broadcom BCM2837B0 Cortex-A53 (ARMv8) 1.4GHz, 512MB LPDDR2 SDRAM
|
||||
|
||||
这份RT-Thread BSP是针对 Raspberry Pi 3 64位模式的一份移植,树莓派价格便宜, 使用者甚众,是研究和运行RT-Thread的可选平台之一。
|
||||
|
||||
|
||||
## 2. 编译说明
|
||||
|
||||
### 2.1 Window上的环境搭建
|
||||
|
||||
Windows环境下推荐使用[env工具][1]进行编译。
|
||||
|
||||
首先下载windows上的aarch64的gcc交叉编译工具,版本为gcc-arm-8.3选择aarch64-elf就可以。
|
||||
|
||||
将推荐将gcc解压到`\env\tools\gnu_gcc\arm_gcc`目录下。
|
||||
|
||||
接着修改`bsp\raspberry-pi\raspi3-64\rtconfig.py`
|
||||
|
||||
修改路径:
|
||||
|
||||
```
|
||||
EXEC_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'
|
||||
```
|
||||
|
||||
然后在`bsp\raspberry-pi\raspi3-64\`下输入scons编译即可。
|
||||
|
||||
**window环境搭建注意**
|
||||
|
||||
下载完成`gcc-arm-8.3-2019.03-i686-mingw32-aarch64-elf.tar.xz`交叉编译工具链后,最好采用7-zip解压工具进行两次解压。
|
||||
确保解压目录下的`/bin/aarch64-elf-ld.exe`文件的size不为0。
|
||||
否则编译会出现如下错误:
|
||||
|
||||
```
|
||||
collect2.exe:fatal error:CreateProcess:No such file or directory
|
||||
```
|
||||
|
||||
### 2.2 Linux上的环境搭建
|
||||
|
||||
Linux下推荐使用[gcc工具][2]。Linux版本下gcc版本可采用`gcc-arm-8.3-2019.03-x86_64-aarch64-elf`。
|
||||
|
||||
直接进入`bsp\raspberry-pi\raspi3-64`,输入scons编译即可。
|
||||
|
||||
|
||||
## 3. 执行
|
||||
|
||||
### 3.1 下载[raspbian镜像][3],生成可以运行的raspbian SD卡
|
||||
|
||||
Windows下,去[etcher.io][4]下载etcher,这是个可以烧写img的工具
|
||||
|
||||
解开下载的镜像文件, linux下使用如下的命令
|
||||
|
||||
```
|
||||
unzip 2018-06-27-raspbian-stretch-lite.zip
|
||||
```
|
||||
|
||||
准备一张空SD卡,linux环境下,插入电脑并执行
|
||||
|
||||
```
|
||||
sudo dd if=2018-06-27-raspbian-stretch-lite.img of=/dev/xxx bs=32M conv=fsync
|
||||
```
|
||||
|
||||
**注意: /dev/xxx 要换成真实环境中的SD卡所在设置,千万不要弄错。**
|
||||
|
||||
Windows环境下,执行etcher选择解压后的2018-06-27-raspbian-stretch-lite.img文件和SD卡就可以开始烧写了。
|
||||
|
||||
最后把kernel8.img放入SD boot分区,删除其它 kernel*.img。
|
||||
|
||||
### 3.2 准备好串口线
|
||||
|
||||
目前版本是使用raspi3的 GPIO 14, GPIO 15来作路口输出,连线情况如下图所示(图片中的板子是pi2,GPIO引脚是一样的):
|
||||
|
||||

|
||||
|
||||
串口参数: 115200 8N1 ,硬件和软件流控为关。
|
||||
|
||||
按上面的方法做好SD卡后,插入树莓派,通电可以在串口上看到如下所示的输出信息:
|
||||
|
||||
```text
|
||||
heap: 0x00020b20 - 0x00400000
|
||||
|
||||
\ | /
|
||||
- RT - Thread Operating System
|
||||
/ | \ 3.1.0 build Aug 23 2019
|
||||
2006 - 2019 Copyright by rt-thread team
|
||||
Hello RT-Thread!
|
||||
msh >
|
||||
```
|
||||
|
||||
## 4. 支持情况
|
||||
|
||||
| 驱动 | 支持情况 | 备注 |
|
||||
| ------ | ---- | :------: |
|
||||
| UART | 支持 | UART0|
|
||||
|
||||
## 5. 联系人信息
|
||||
|
||||
维护人:[bernard][5]
|
||||
|
||||
[1]: https://www.rt-thread.org/page/download.html
|
||||
[2]: https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads
|
||||
[3]: https://downloads.raspberrypi.org/raspbian_lite_latest
|
||||
[4]: https://etcher.io
|
||||
[5]: https://github.com/BernardXiong
|
||||
Reference in New Issue
Block a user