rt-thread-official/bsp/raspberry-pi/raspi3-64/README.md

91 lines
3.4 KiB
Markdown
Raw Normal View History

2020-09-09 18:22:26 +08:00
# Raspberry PI 364 BSP (Board Support Package) Execution Instruction
2020-01-10 10:38:21 +08:00
2020-09-09 18:22:26 +08:00
[中文页](README_zh.md) |
2020-01-10 10:38:21 +08:00
2020-09-09 18:22:26 +08:00
## Introduction
2020-01-10 10:38:21 +08:00
2020-09-09 18:22:26 +08:00
This document records the execution instruction of the BSP (board support package) provided by the RT-Thread development team for the Raspberry PI 364 development board.
2020-01-10 10:38:21 +08:00
2020-09-09 18:22:26 +08:00
## **Compilation Instruction**
2020-01-10 10:38:21 +08:00
2020-09-09 18:22:26 +08:00
### Build Environment on Windows
2020-01-10 10:38:21 +08:00
2020-09-09 18:22:26 +08:00
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 364 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).
2020-01-10 10:38:21 +08:00
2020-09-09 18:22:26 +08:00
Here we choose the version "[gcc-arm-8.32019.03-i686-mingw32-aarch64-elf].
2020-01-10 10:38:21 +08:00
2020-09-09 18:22:26 +08:00
Unzip the compressed package to the local directory, like "E:/env/tools/gnu_gcc/arm_gcc".
2020-01-10 10:38:21 +08:00
2020-09-09 18:22:26 +08:00
Then edit the file "<rt-thread_directory>/bsp/raspberry-pi/raspi364/rtconfig. py", modify the variable "EXEC_PATH" to the compiler path:
2020-01-10 10:38:21 +08:00
```
2020-09-09 18:22:26 +08:00
EXEC_PATH = r'E:/env/tools/gnu_gcc/arm_gcc/gcc-arm-8.32019.03-i686-mingw32-aarch64-elf/bin'
2020-01-10 10:38:21 +08:00
```
2020-09-09 18:22:26 +08:00
Finally, enter the BSP directory "<rt-thread_directory>/bsp/raspberry-pi/raspi364/" and execute the "scons" command.
2020-04-17 22:16:34 +08:00
2020-09-09 18:22:26 +08:00
### Build Environment on Linux
2020-04-17 22:16:34 +08:00
2020-09-09 18:22:26 +08:00
The steps to build Raspberry PI 364 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.32019.03-x86_64-aarch64-elf".
2020-01-10 10:38:21 +08:00
2020-09-09 18:22:26 +08:00
Then we unpack the compiler package, modify the file "rtconfig.h" and run "scons".
2020-01-10 10:38:21 +08:00
2020-09-09 18:22:26 +08:00
## Execution
2020-01-10 10:38:21 +08:00
2020-09-09 18:22:26 +08:00
### Prepare the raspbian SD card
2020-01-10 10:38:21 +08:00
2020-09-09 18:22:26 +08:00
- Download the raspbian image, for example, "20180627-raspbian-stretch-lite.zip". Unpack it.
2020-01-10 10:38:21 +08:00
2020-09-09 18:22:26 +08:00
- Burn the SD card on Windows
2020-01-10 10:38:21 +08:00
2020-09-09 18:22:26 +08:00
On Windows, download the burning tool "[etcher.io](http://etcher.io/)", run it and choose the unpacked image "20180627-raspbian-stretch-lite.img".
2020-01-10 10:38:21 +08:00
2020-09-09 18:22:26 +08:00
When the burning process is completed, put "kernel8.img" into the boot partition to replace the file wit the same name.
2020-01-10 10:38:21 +08:00
2020-09-09 18:22:26 +08:00
- Burn the SD card on Linux
2020-01-10 10:38:21 +08:00
2020-09-09 18:22:26 +08:00
Prepare an empty SD card, plug it in the computer and then execute the command below: "sudo dd if=20180627-raspbian-stretch-lite.img of=/dev/xxx bs=32M conv=fsync"
2020-01-10 10:38:21 +08:00
2020-09-09 18:22:26 +08:00
Note that the device file "/dev/xxx" should be replaced with the real SD card.
2020-01-10 10:38:21 +08:00
2020-09-09 18:22:26 +08:00
### Prepare the serial port wire
2020-01-10 10:38:21 +08:00
2020-09-09 18:22:26 +08:00
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):
2020-01-10 10:38:21 +08:00
2020-09-09 18:22:26 +08:00
[![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)
2020-01-10 10:38:21 +08:00
2020-09-09 18:22:26 +08:00
The serial port parameters: 115200 8N1, hardware and software flow control is off.
2020-01-10 10:38:21 +08:00
2020-09-09 18:22:26 +08:00
## Running Result
2020-01-10 10:38:21 +08:00
2020-09-09 18:22:26 +08:00
Insert the burned SD card into Raspberry Pi, power up, the output information on serial port should be like this:
2020-01-10 10:38:21 +08:00
2020-09-09 18:22:26 +08:00
```
2020-01-10 10:38:21 +08:00
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 >
```
2020-09-09 18:22:26 +08:00
## Peripheral Condition
2020-01-10 10:38:21 +08:00
2020-09-09 18:22:26 +08:00
| Drive | Support | Remark |
| ----- | ------- | ------ |
| UART | Support | UART0 |
2020-09-11 16:39:54 +08:00
| GPIO | Support | - |
| I2C | Support | - |
| RTC | Support | - |
2020-09-14 14:25:38 +08:00
| SDIO | Support | SDCARD |
2020-09-11 16:39:54 +08:00
| SPI | Support | - |
| TIMER | Support | - |
| WDT | Support | - |
| MBOX | Support | - |
| FRAMEBUFFER | Support | HDMI |
2020-01-10 10:38:21 +08:00