This BSP was created by RT-Thread Community contributor.
Hardware Features of Raspberry Pi 3B:
Hardware Description
CPU quad-core ARM Cortex A53(ARMv8)
Frequency 1.2 GHz
GPU VideoCore IV
GPU Frequency 400MHz
Memory 1GB (0x0000000 - 0x40000000)
0x3f000000 - 0x40000000 is peripheral
Hardware pin distribution, shown as follow:
1. Compiling Process
The env tool is recommended for compiling in Windows environments.
The gcc-arm-none-eabi-4_8-2014q1_linux is recommended under Linux, and if the tool is not compiled, unzip the file after downloading.
tar vxf gcc-arm-none-eabi-4_8-2014q1_linux.tar.bz2
In the Linux environment, you need to modify the compiler directory settings, modify the actual directory of the compiling tool in bsp/raspi3-32/rtconfig.py, note to add the suffix /bin here.
EXEC_PATH = r'/opt/gcc-arm-none-eabi-4_8-2014q1_gri/bin'
Enter the rt-thread/bsp/raspi3-32 directory and run the following command to compile this BSP:
scons
If compiled correctly, a rtthread.elf, kernel7.img file is generated. kernel7.img is the file that is going to cp to the root directory of the raspberry SD card.
1.1 eclipse compiling environment
Step 1: Install eclipse cdt
Step 2: Open eclipse cdt and set workspace, set it as xxx\xxx\rt-thread\bsp is recommended.
Step 3: Import project General-Existing Peojects into Workspace , and then browse Your raspi3 directory, click Finish.
However compiling still uses scons, currently does not support qemu debug.
2. Execution
2.1 Download the raspbian mirroring to generate a running raspbian SD card
Under Windows, find etcher.io and download etcher, it is a tool that can burn img
Unzip the downloaded mirroring file, and use the following command under linux:
unzip 2018-06-27-raspbian-stretch-lite.zip
Prepare an empty SD card, plug in the computer and execute under linux environment
sudo dd if=2018-06-27-raspbian-stretch-lite.img of=/dev/xxx bs=32M conv=fsync
Note: /dev/xxx SD card settings should be change into a real environment, don’t forget this.
In the Windows environment, executed the unzipped file of etcher 2018-06-27-raspbian-stretch-lighte.img and SD card, you can start burning.
Finally, put kernel7.img into the SD boot partition and overwrite the original file.
2.2 Prepare the serial port line
The current version uses the GPIO 14 and GPIO 15 of raspi3 and as the junction output, as shown in the following figure:
Serial port parameters: 115200 8N1, hardware and software flow control is off.
After conducting the SD card according to the above method, insert the Raspberry Pi 3B and power it up, you can see the output information on the serial port, which is shown as follow:
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 />
3. Supporting Status
Driver Supporting Status Remark
UART Support UART0
GPIO Support
IIC Support
SPI Support
CPU Timer Support
If you have any questions you can reach out at
https://github.com/RT-Thread/rt-thread/tree/master/bsp/raspberry-pi/raspi3-32And for more information about RT-Thread, refer to
https://github.com/RT-Thread