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[](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