diff --git a/bsp/raspberry-pi/raspi4/.config b/bsp/raspberry-pi/raspi4-64/.config similarity index 91% rename from bsp/raspberry-pi/raspi4/.config rename to bsp/raspberry-pi/raspi4-64/.config index e300d0217b..0ab68e8fe3 100644 --- a/bsp/raspberry-pi/raspi4/.config +++ b/bsp/raspberry-pi/raspi4-64/.config @@ -69,6 +69,7 @@ CONFIG_RT_CONSOLE_DEVICE_NAME="uart" CONFIG_RT_VER_NUM=0x40003 CONFIG_ARCH_CPU_64BIT=y # CONFIG_RT_USING_CPU_FFS is not set +CONFIG_ARCH_ARMV8=y # CONFIG_ARCH_CPU_STACK_GROWS_UPWARD is not set # @@ -215,6 +216,8 @@ CONFIG_RT_USING_POSIX=y # CONFIG_PKG_USING_WEBNET is not set # CONFIG_PKG_USING_MONGOOSE is not set # CONFIG_PKG_USING_MYMQTT is not set +# CONFIG_PKG_USING_KAWAII_MQTT is not set +# CONFIG_PKG_USING_BC28_MQTT is not set # CONFIG_PKG_USING_WEBTERMINAL is not set # CONFIG_PKG_USING_CJSON is not set # CONFIG_PKG_USING_JSMN is not set @@ -241,6 +244,7 @@ CONFIG_RT_USING_POSIX=y # CONFIG_PKG_USING_COAP is not set # CONFIG_PKG_USING_NOPOLL is not set # CONFIG_PKG_USING_NETUTILS is not set +# CONFIG_PKG_USING_CMUX is not set # CONFIG_PKG_USING_PPP_DEVICE is not set # CONFIG_PKG_USING_AT_DEVICE is not set # CONFIG_PKG_USING_ATSRV_SOCKET is not set @@ -255,6 +259,8 @@ CONFIG_RT_USING_POSIX=y # CONFIG_PKG_USING_AZURE is not set # CONFIG_PKG_USING_TENCENT_IOTHUB is not set # CONFIG_PKG_USING_JIOT-C-SDK is not set +# CONFIG_PKG_USING_UCLOUD_IOT_SDK is not set +# CONFIG_PKG_USING_JOYLINK is not set # CONFIG_PKG_USING_NIMBLE is not set # CONFIG_PKG_USING_OTA_DOWNLOADER is not set # CONFIG_PKG_USING_IPMSG is not set @@ -269,6 +275,10 @@ CONFIG_RT_USING_POSIX=y # CONFIG_PKG_USING_QXWZ is not set # CONFIG_PKG_USING_SMTP_CLIENT is not set # CONFIG_PKG_USING_ABUP_FOTA is not set +# CONFIG_PKG_USING_LIBCURL2RTT is not set +# CONFIG_PKG_USING_CAPNP is not set +# CONFIG_PKG_USING_RT_CJSON_TOOLS is not set +# CONFIG_PKG_USING_AGILE_TELNET is not set # # security packages @@ -276,6 +286,7 @@ CONFIG_RT_USING_POSIX=y # CONFIG_PKG_USING_MBEDTLS is not set # CONFIG_PKG_USING_libsodium is not set # CONFIG_PKG_USING_TINYCRYPT is not set +# CONFIG_PKG_USING_TFM is not set # # language packages @@ -310,6 +321,7 @@ CONFIG_RT_USING_POSIX=y # CONFIG_PKG_USING_CHINESE_FONT_LIBRARY is not set # CONFIG_PKG_USING_LUNAR_CALENDAR is not set # CONFIG_PKG_USING_BS8116A is not set +# CONFIG_PKG_USING_URLENCODE is not set # # system packages @@ -320,6 +332,7 @@ CONFIG_RT_USING_POSIX=y # CONFIG_PKG_USING_LWEXT4 is not set # CONFIG_PKG_USING_PARTITION is not set # CONFIG_PKG_USING_FAL is not set +# CONFIG_PKG_USING_FLASHDB is not set # CONFIG_PKG_USING_SQLITE is not set # CONFIG_PKG_USING_RTI is not set # CONFIG_PKG_USING_LITTLEVGL2RTT is not set @@ -329,6 +342,9 @@ CONFIG_RT_USING_POSIX=y # CONFIG_PKG_USING_THREAD_POOL is not set # CONFIG_PKG_USING_ROBOTS is not set # CONFIG_PKG_USING_EV is not set +# CONFIG_PKG_USING_SYSWATCH is not set +# CONFIG_PKG_USING_SYS_LOAD_MONITOR is not set +# CONFIG_PKG_USING_PLCCORE is not set # # peripheral libraries and drivers @@ -345,6 +361,10 @@ CONFIG_RT_USING_POSIX=y # CONFIG_PKG_USING_SX12XX is not set # CONFIG_PKG_USING_SIGNAL_LED is not set # CONFIG_PKG_USING_LEDBLINK is not set +# CONFIG_PKG_USING_LITTLED is not set +# CONFIG_PKG_USING_LKDGUI is not set +# CONFIG_PKG_USING_NRF5X_SDK is not set +# CONFIG_PKG_USING_NRFX is not set # CONFIG_PKG_USING_WM_LIBRARIES is not set # CONFIG_PKG_USING_KENDRYTE_SDK is not set # CONFIG_PKG_USING_INFRARED is not set @@ -361,6 +381,15 @@ CONFIG_RT_USING_POSIX=y # CONFIG_PKG_USING_MAX17048 is not set # CONFIG_PKG_USING_RPLIDAR is not set # CONFIG_PKG_USING_AS608 is not set +# CONFIG_PKG_USING_RC522 is not set +# CONFIG_PKG_USING_EMBARC_BSP is not set +# CONFIG_PKG_USING_EXTERN_RTC_DRIVERS is not set +# CONFIG_PKG_USING_MULTI_RTIMER is not set +# CONFIG_PKG_USING_MAX7219 is not set +# CONFIG_PKG_USING_BEEP is not set +# CONFIG_PKG_USING_EASYBLINK is not set +# CONFIG_PKG_USING_PMS_SERIES is not set +# CONFIG_PKG_USING_CAN_YMODEM is not set # # miscellaneous packages @@ -397,36 +426,6 @@ CONFIG_RT_USING_POSIX=y # CONFIG_PKG_USING_VT100 is not set # CONFIG_PKG_USING_ULAPACK is not set # CONFIG_PKG_USING_UKAL is not set - -# -# Privated Packages of RealThread -# -# CONFIG_PKG_USING_CODEC is not set -# CONFIG_PKG_USING_PLAYER is not set -# CONFIG_PKG_USING_MPLAYER is not set -# CONFIG_PKG_USING_PERSIMMON_SRC is not set -# CONFIG_PKG_USING_JS_PERSIMMON is not set -# CONFIG_PKG_USING_JERRYSCRIPT_WIN32 is not set - -# -# Network Utilities -# -# CONFIG_PKG_USING_WICED is not set -# CONFIG_PKG_USING_CLOUDSDK is not set -# CONFIG_PKG_USING_POWER_MANAGER is not set -# CONFIG_PKG_USING_RT_OTA is not set -# CONFIG_PKG_USING_RDBD_SRC is not set -# CONFIG_PKG_USING_RTINSIGHT is not set -# CONFIG_PKG_USING_SMARTCONFIG is not set -# CONFIG_PKG_USING_RTX is not set -# CONFIG_RT_USING_TESTCASE is not set -# CONFIG_PKG_USING_NGHTTP2 is not set -# CONFIG_PKG_USING_AVS is not set -# CONFIG_PKG_USING_JOYLINK is not set -# CONFIG_PKG_USING_STS is not set -# CONFIG_PKG_USING_DLMS is not set -# CONFIG_PKG_USING_AUDIO_FRAMEWORK is not set -# CONFIG_PKG_USING_ZBAR is not set CONFIG_BCM2711_SOC=y # CONFIG_BSP_SUPPORT_FPU is not set diff --git a/bsp/raspberry-pi/raspi4/Kconfig b/bsp/raspberry-pi/raspi4-64/Kconfig similarity index 93% rename from bsp/raspberry-pi/raspi4/Kconfig rename to bsp/raspberry-pi/raspi4-64/Kconfig index 075a5d81aa..c1ee600450 100644 --- a/bsp/raspberry-pi/raspi4/Kconfig +++ b/bsp/raspberry-pi/raspi4-64/Kconfig @@ -20,7 +20,7 @@ source "$PKGS_DIR/Kconfig" config BCM2711_SOC bool - select ARCH_ARM_CORTEX_A72 + select ARCH_ARMV8 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-64/README.md similarity index 70% rename from bsp/raspberry-pi/raspi4/README.md rename to bsp/raspberry-pi/raspi4-64/README.md index 1e7411894e..56aa6f0ca5 100644 --- a/bsp/raspberry-pi/raspi4/README.md +++ b/bsp/raspberry-pi/raspi4-64/README.md @@ -11,6 +11,38 @@ ## 2. 编译说明 + + +### 2.1 Window上的环境搭建 + +Windows环境下推荐使用[env工具](https://www.rt-thread.org/page/download.html)进行编译。 + +首先下载windows上的aarch64的gcc交叉编译工具,版本为gcc-arm-8.3选择aarch64-elf就可以。 + +将推荐将gcc解压到`\env\tools\gnu_gcc\arm_gcc`目录下。 + +接着修改`bsp\raspberry-pi\raspi4-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\raspi4-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下的`EXEC_PATH`为自定义gcc目录。 @@ -20,7 +52,7 @@ PLATFORM = 'gcc' EXEC_PATH = r'/opt/gcc-arm-8.3-2019.03-x86_64-aarch64-elf/bin/' ``` -直接进入`bsp\raspberry-pi\raspi4`,输入scons编译即可。 +直接进入`bsp\raspberry-pi\raspi4-64`,输入scons编译即可。 ## 3. 执行 diff --git a/bsp/raspberry-pi/raspi4/SConscript b/bsp/raspberry-pi/raspi4-64/SConscript similarity index 100% rename from bsp/raspberry-pi/raspi4/SConscript rename to bsp/raspberry-pi/raspi4-64/SConscript diff --git a/bsp/raspberry-pi/raspi4/SConstruct b/bsp/raspberry-pi/raspi4-64/SConstruct similarity index 100% rename from bsp/raspberry-pi/raspi4/SConstruct rename to bsp/raspberry-pi/raspi4-64/SConstruct diff --git a/bsp/raspberry-pi/raspi4/applications/SConscript b/bsp/raspberry-pi/raspi4-64/applications/SConscript similarity index 100% rename from bsp/raspberry-pi/raspi4/applications/SConscript rename to bsp/raspberry-pi/raspi4-64/applications/SConscript diff --git a/bsp/raspberry-pi/raspi4/applications/main.c b/bsp/raspberry-pi/raspi4-64/applications/main.c similarity index 100% rename from bsp/raspberry-pi/raspi4/applications/main.c rename to bsp/raspberry-pi/raspi4-64/applications/main.c diff --git a/bsp/raspberry-pi/raspi4/driver/Kconfig b/bsp/raspberry-pi/raspi4-64/driver/Kconfig similarity index 100% rename from bsp/raspberry-pi/raspi4/driver/Kconfig rename to bsp/raspberry-pi/raspi4-64/driver/Kconfig diff --git a/bsp/raspberry-pi/raspi4/driver/SConscript b/bsp/raspberry-pi/raspi4-64/driver/SConscript similarity index 100% rename from bsp/raspberry-pi/raspi4/driver/SConscript rename to bsp/raspberry-pi/raspi4-64/driver/SConscript diff --git a/bsp/raspberry-pi/raspi4/driver/board.c b/bsp/raspberry-pi/raspi4-64/driver/board.c similarity index 100% rename from bsp/raspberry-pi/raspi4/driver/board.c rename to bsp/raspberry-pi/raspi4-64/driver/board.c diff --git a/bsp/raspberry-pi/raspi4/driver/board.h b/bsp/raspberry-pi/raspi4-64/driver/board.h similarity index 96% rename from bsp/raspberry-pi/raspi4/driver/board.h rename to bsp/raspberry-pi/raspi4-64/driver/board.h index a7c96b3276..d675cc658e 100644 --- a/bsp/raspberry-pi/raspi4/driver/board.h +++ b/bsp/raspberry-pi/raspi4-64/driver/board.h @@ -12,7 +12,7 @@ #define BOARD_H__ #include -#include "iomap.h" +#include "raspi4.h" extern unsigned char __bss_start; extern unsigned char __bss_end; diff --git a/bsp/raspberry-pi/raspi4/driver/drv_gpio.c b/bsp/raspberry-pi/raspi4-64/driver/drv_gpio.c similarity index 100% rename from bsp/raspberry-pi/raspi4/driver/drv_gpio.c rename to bsp/raspberry-pi/raspi4-64/driver/drv_gpio.c diff --git a/bsp/raspberry-pi/raspi4/driver/drv_gpio.h b/bsp/raspberry-pi/raspi4-64/driver/drv_gpio.h similarity index 100% rename from bsp/raspberry-pi/raspi4/driver/drv_gpio.h rename to bsp/raspberry-pi/raspi4-64/driver/drv_gpio.h diff --git a/bsp/raspberry-pi/raspi4/driver/drv_uart.c b/bsp/raspberry-pi/raspi4-64/driver/drv_uart.c similarity index 100% rename from bsp/raspberry-pi/raspi4/driver/drv_uart.c rename to bsp/raspberry-pi/raspi4-64/driver/drv_uart.c diff --git a/bsp/raspberry-pi/raspi4/driver/drv_uart.h b/bsp/raspberry-pi/raspi4-64/driver/drv_uart.h similarity index 100% rename from bsp/raspberry-pi/raspi4/driver/drv_uart.h rename to bsp/raspberry-pi/raspi4-64/driver/drv_uart.h diff --git a/bsp/raspberry-pi/raspi4/driver/iomap.h b/bsp/raspberry-pi/raspi4-64/driver/raspi4.h similarity index 100% rename from bsp/raspberry-pi/raspi4/driver/iomap.h rename to bsp/raspberry-pi/raspi4-64/driver/raspi4.h diff --git a/bsp/raspberry-pi/raspi4/link.lds b/bsp/raspberry-pi/raspi4-64/link.lds similarity index 100% rename from bsp/raspberry-pi/raspi4/link.lds rename to bsp/raspberry-pi/raspi4-64/link.lds diff --git a/bsp/raspberry-pi/raspi4/rtconfig.h b/bsp/raspberry-pi/raspi4-64/rtconfig.h similarity index 97% rename from bsp/raspberry-pi/raspi4/rtconfig.h rename to bsp/raspberry-pi/raspi4-64/rtconfig.h index 049e117559..bdde9d5f4a 100644 --- a/bsp/raspberry-pi/raspi4/rtconfig.h +++ b/bsp/raspberry-pi/raspi4-64/rtconfig.h @@ -43,6 +43,7 @@ #define RT_CONSOLE_DEVICE_NAME "uart" #define RT_VER_NUM 0x40003 #define ARCH_CPU_64BIT +#define ARCH_ARMV8 /* RT-Thread Components */ @@ -154,12 +155,6 @@ /* samples: kernel and components samples */ - -/* Privated Packages of RealThread */ - - -/* Network Utilities */ - #define BCM2711_SOC /* Hardware Drivers Config */ diff --git a/bsp/raspberry-pi/raspi4/rtconfig.py b/bsp/raspberry-pi/raspi4-64/rtconfig.py similarity index 100% rename from bsp/raspberry-pi/raspi4/rtconfig.py rename to bsp/raspberry-pi/raspi4-64/rtconfig.py diff --git a/libcpu/Kconfig b/libcpu/Kconfig index 95d3dd5228..e355664de2 100644 --- a/libcpu/Kconfig +++ b/libcpu/Kconfig @@ -74,6 +74,9 @@ config ARCH_ARM_CORTEX_A9 bool select ARCH_ARM_CORTEX_A +config ARCH_ARMV8 + bool + config ARCH_MIPS bool diff --git a/libcpu/aarch64/common/gic/gic_pl400.c b/libcpu/aarch64/common/gic/gic_pl400.c index 4d003a9dcd..1f4d868636 100644 --- a/libcpu/aarch64/common/gic/gic_pl400.c +++ b/libcpu/aarch64/common/gic/gic_pl400.c @@ -14,7 +14,6 @@ #include "gic_pl400.h" #include "cp15.h" -#include "iomap.h" #define ARM_GIC_MAX_NR 1 struct arm_gic diff --git a/libcpu/aarch64/cortex-a72/interrupt.c b/libcpu/aarch64/cortex-a72/interrupt.c index 6fec968dc2..3b689dceb3 100644 --- a/libcpu/aarch64/cortex-a72/interrupt.c +++ b/libcpu/aarch64/cortex-a72/interrupt.c @@ -13,7 +13,6 @@ #include #include #include -#include "iomap.h" #define MAX_HANDLERS 256 #define GIC_ACK_INTID_MASK 0x000003ff