diff options
| author | bigmagic <[email protected]> | 2020-04-16 16:42:07 +0800 |
|---|---|---|
| committer | bigmagic <[email protected]> | 2020-04-16 16:44:29 +0800 |
| commit | a120c914bb003646010d1d385be36b5260284132 (patch) | |
| tree | 3998191299b35a04be76210b31fae122674fa9ad | |
| parent | fb8c7829a8a861f9837912ecf926899f48349967 (diff) | |
add bsp/raspi4 readme
| -rw-r--r-- | bsp/raspberry-pi/raspi3-64/README.md | 2 | ||||
| -rw-r--r-- | bsp/raspberry-pi/raspi4/Kconfig | 2 | ||||
| -rw-r--r-- | bsp/raspberry-pi/raspi4/README.md | 81 | ||||
| -rw-r--r-- | bsp/raspberry-pi/raspi4/rtconfig.py | 2 | ||||
| -rw-r--r-- | libcpu/aarch64/cortex-a72/SConscript (renamed from libcpu/aarch64/cortex-a57/SConscript) | 0 | ||||
| -rw-r--r-- | libcpu/aarch64/cortex-a72/entry_point.S (renamed from libcpu/aarch64/cortex-a57/entry_point.S) | 0 | ||||
| -rw-r--r-- | libcpu/aarch64/cortex-a72/interrupt.c (renamed from libcpu/aarch64/cortex-a57/interrupt.c) | 0 | ||||
| -rw-r--r-- | libcpu/aarch64/cortex-a72/interrupt.h (renamed from libcpu/aarch64/cortex-a57/interrupt.h) | 0 | ||||
| -rw-r--r-- | libcpu/aarch64/cortex-a72/stack.c (renamed from libcpu/aarch64/cortex-a57/stack.c) | 0 | ||||
| -rw-r--r-- | libcpu/aarch64/cortex-a72/trap.c (renamed from libcpu/aarch64/cortex-a57/trap.c) | 0 |
10 files changed, 34 insertions, 53 deletions
diff --git a/bsp/raspberry-pi/raspi3-64/README.md b/bsp/raspberry-pi/raspi3-64/README.md index 28e00f96c0..576b13ed0e 100644 --- a/bsp/raspberry-pi/raspi3-64/README.md +++ b/bsp/raspberry-pi/raspi3-64/README.md @@ -17,7 +17,7 @@ Windows环境下推荐使用[env工具][1]进行编译。 -首先下载Linux上的gcc工具,版本为gcc-arm-8.3选择aarch64-elf就可以。 +首先下载windows上的aarch64的gcc交叉编译工具,版本为gcc-arm-8.3选择aarch64-elf就可以。 将推荐将gcc解压到`\env\tools\gnu_gcc\arm_gcc`目录下。 diff --git a/bsp/raspberry-pi/raspi4/Kconfig b/bsp/raspberry-pi/raspi4/Kconfig index e71ed3d54b..075a5d81aa 100644 --- a/bsp/raspberry-pi/raspi4/Kconfig +++ b/bsp/raspberry-pi/raspi4/Kconfig @@ -20,7 +20,7 @@ source "$PKGS_DIR/Kconfig" config BCM2711_SOC bool - select ARCH_ARM_CORTEX_A57 + select ARCH_ARM_CORTEX_A72 select RT_USING_COMPONENTS_INIT select RT_USING_USER_MAIN select ARCH_CPU_64BIT diff --git a/bsp/raspberry-pi/raspi4/README.md b/bsp/raspberry-pi/raspi4/README.md index 28e00f96c0..1e7411894e 100644 --- a/bsp/raspberry-pi/raspi4/README.md +++ b/bsp/raspberry-pi/raspi4/README.md @@ -1,86 +1,67 @@ -# Raspberry PI 3-64板级支持包说明 +# Raspberry PI 4板级支持包说明 ## 1. 简介 -树莓派由注册于英国的慈善组织“Raspberry Pi 基金会”开发,莓派3有三个发行版本: +树莓派4B的核心处理器为博通BCM2711(四核1.5GHz,Cortex A72架构,树莓派3是四核A53)。LPDDR4内存,由5V/3A USB-C供电或GPIO 5V。 -* 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 +外设支持上,引入了双频Wi-Fi,蓝牙5.0,千兆网卡,MIPI CSI相机接口,两个USB口,40个扩展帧。 -这份RT-Thread BSP是针对 Raspberry Pi 3 64位模式的一份移植,树莓派价格便宜, 使用者甚众,是研究和运行RT-Thread的可选平台之一。 +这份RT-Thread BSP是针对 Raspberry Pi 4的一份移植,树莓派价格便宜, 使用者甚众,是研究和运行RT-Thread的可选平台之一。 ## 2. 编译说明 -### 2.1 Window上的环境搭建 - -Windows环境下推荐使用[env工具][1]进行编译。 - -首先下载Linux上的gcc工具,版本为gcc-arm-8.3选择aarch64-elf就可以。 - -将推荐将gcc解压到`\env\tools\gnu_gcc\arm_gcc`目录下。 - -接着修改`bsp\raspberry-pi\raspi3-64\rtconfig.py` +Linux下推荐使用[gcc工具][2]。Linux版本下gcc版本可采用`gcc-arm-8.3-2019.03-x86_64-aarch64-elf`。 -修改路径: +将工具链解压到指定目录,并修改当前bsp下的`EXEC_PATH`为自定义gcc目录。 ``` -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' +PLATFORM = 'gcc' +EXEC_PATH = r'/opt/gcc-arm-8.3-2019.03-x86_64-aarch64-elf/bin/' ``` -然后在`bsp\raspberry-pi\raspi3-64\`下输入scons编译即可。 - -### 2.2 Linux上的环境搭建 - -Linux下推荐使用[gcc工具][2]。Linux版本下gcc版本可采用`gcc-arm-8.3-2019.03-x86_64-aarch64-elf`。 - -直接进入`bsp\raspberry-pi\raspi3-64`,输入scons编译即可。 +直接进入`bsp\raspberry-pi\raspi4`,输入scons编译即可。 ## 3. 执行 -### 3.1 下载[raspbian镜像][3],生成可以运行的raspbian SD卡 - -Windows下,去[etcher.io][4]下载etcher,这是个可以烧写img的工具 - -解开下载的镜像文件, linux下使用如下的命令 +### 3.1 下载**Raspberry Pi Imager**,生成可以运行的raspbian SD卡 -``` -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 -``` +* [Raspberry Pi Imager for Ubuntu](https://downloads.raspberrypi.org/imager/imager_amd64.deb) +* [Raspberry Pi Imager for Windows](https://downloads.raspberrypi.org/imager/imager.exe) +* [Raspberry Pi Imager for macOS](https://downloads.raspberrypi.org/imager/imager.dmg) -**注意: /dev/xxx 要换成真实环境中的SD卡所在设置,千万不要弄错。** +### 3.2 准备好串口线 -Windows环境下,执行etcher选择解压后的2018-06-27-raspbian-stretch-lite.img文件和SD卡就可以开始烧写了。 +目前版本是使用raspi4的 GPIO 14, GPIO 15来作路口输出,连线情况如下图所示: -最后把kernel8.img放入SD boot分区,删除其它 kernel*.img。 + -### 3.2 准备好串口线 +串口参数: 115200 8N1 ,硬件和软件流控为关。 -目前版本是使用raspi3的 GPIO 14, GPIO 15来作路口输出,连线情况如下图所示(图片中的板子是pi2,GPIO引脚是一样的): +### 3.3 程序下载 - +当编译生成了rtthread.bin文件后,我们可以将该文件放到sd卡上,并修改sd卡中的`config.txt`文件如下: -串口参数: 115200 8N1 ,硬件和软件流控为关。 +``` +enable_uart=1 +arm_64bit=1 +kernel=rtthread.bin +``` -按上面的方法做好SD卡后,插入树莓派,通电可以在串口上看到如下所示的输出信息: +按上面的方法做好SD卡后,插入树莓派4,通电可以在串口上看到如下所示的输出信息: ```text - heap: 0x00020b20 - 0x00400000 +heap: 0x000c9350 - 0x040c9350 \ | / - RT - Thread Operating System - / | \ 3.1.0 build Aug 23 2019 - 2006 - 2019 Copyright by rt-thread team -Hello RT-Thread! -msh > + / | \ 4.0.3 build Apr 16 2020 + 2006 - 2020 Copyright by rt-thread team +Hi, this is RT-Thread!! +msh /> ``` ## 4. 支持情况 diff --git a/bsp/raspberry-pi/raspi4/rtconfig.py b/bsp/raspberry-pi/raspi4/rtconfig.py index 228ec0176a..9265b016be 100644 --- a/bsp/raspberry-pi/raspi4/rtconfig.py +++ b/bsp/raspberry-pi/raspi4/rtconfig.py @@ -2,7 +2,7 @@ import os # toolchains options ARCH ='aarch64' -CPU ='cortex-a57' +CPU ='cortex-a72' CROSS_TOOL ='gcc' if os.getenv('RTT_ROOT'): diff --git a/libcpu/aarch64/cortex-a57/SConscript b/libcpu/aarch64/cortex-a72/SConscript index c6a4817802..c6a4817802 100644 --- a/libcpu/aarch64/cortex-a57/SConscript +++ b/libcpu/aarch64/cortex-a72/SConscript diff --git a/libcpu/aarch64/cortex-a57/entry_point.S b/libcpu/aarch64/cortex-a72/entry_point.S index 6d2c69226b..6d2c69226b 100644 --- a/libcpu/aarch64/cortex-a57/entry_point.S +++ b/libcpu/aarch64/cortex-a72/entry_point.S diff --git a/libcpu/aarch64/cortex-a57/interrupt.c b/libcpu/aarch64/cortex-a72/interrupt.c index d770259d61..d770259d61 100644 --- a/libcpu/aarch64/cortex-a57/interrupt.c +++ b/libcpu/aarch64/cortex-a72/interrupt.c diff --git a/libcpu/aarch64/cortex-a57/interrupt.h b/libcpu/aarch64/cortex-a72/interrupt.h index 0d2d4867c7..0d2d4867c7 100644 --- a/libcpu/aarch64/cortex-a57/interrupt.h +++ b/libcpu/aarch64/cortex-a72/interrupt.h diff --git a/libcpu/aarch64/cortex-a57/stack.c b/libcpu/aarch64/cortex-a72/stack.c index 68222c2c67..68222c2c67 100644 --- a/libcpu/aarch64/cortex-a57/stack.c +++ b/libcpu/aarch64/cortex-a72/stack.c diff --git a/libcpu/aarch64/cortex-a57/trap.c b/libcpu/aarch64/cortex-a72/trap.c index d93aa18fd6..d93aa18fd6 100644 --- a/libcpu/aarch64/cortex-a57/trap.c +++ b/libcpu/aarch64/cortex-a72/trap.c |
