[Add] 新增 F5Plus、Raspi4B支持
This commit is contained in:
@ -25,8 +25,11 @@
|
||||
/*******************************************************************
|
||||
* Enable User/Kernel space SPI.
|
||||
******************************************************************/
|
||||
/*#define PHDRIVER_LINUX_USER_SPI*/
|
||||
#define PHDRIVER_LINUX_KERNEL_SPI
|
||||
# ifdef NXPBUILD__PHBAL_REG_LINUX_USER_SPI
|
||||
#define PHDRIVER_LINUX_USER_SPI
|
||||
# else
|
||||
#define PHDRIVER_LINUX_KERNEL_SPI
|
||||
#endif /* NXPBUILD__PHBAL_REG_LINUX_USER_SPI */
|
||||
|
||||
/******************************************************************
|
||||
* Board Pin/Gpio configurations
|
||||
|
||||
14
Platform/F5Plus/F5Plus-Toolchain.cmake
Normal file
14
Platform/F5Plus/F5Plus-Toolchain.cmake
Normal file
@ -0,0 +1,14 @@
|
||||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_PROCESSOR arm)
|
||||
|
||||
set(tools /opt/f5plus/aarch64-ca53-linux-gnueabihf-10.4.0)
|
||||
|
||||
set(CMAKE_C_COMPILER ${tools}/bin/aarch64-ca53-linux-gnu-gcc)
|
||||
set(CMAKE_CXX_COMPILER ${tools}/bin/aarch64-ca53-linux-gnu-g++)
|
||||
set(CMAKE_SYSROOT ${tools}/aarch64-ca53-linux-gnu/sysroot)
|
||||
#set(CMAKE_STAGING_PREFIX ${HOME}/recycle/stage)
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
||||
15
Platform/Raspi4B/F5Plus-Toolchain.cmake
Normal file
15
Platform/Raspi4B/F5Plus-Toolchain.cmake
Normal file
@ -0,0 +1,15 @@
|
||||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_PROCESSOR arm)
|
||||
|
||||
set(tools ${HOME}/recycle/gcc-4.7-linaro-rpi-gnueabihf)
|
||||
|
||||
set(CMAKE_SYSROOT ${HOME}/recycle/rasp-pi-rootfs)
|
||||
set(CMAKE_STAGING_PREFIX ${HOME}/recycle/stage)
|
||||
|
||||
set(CMAKE_C_COMPILER ${tools}/bin/arm-linux-gnueabihf-gcc)
|
||||
set(CMAKE_CXX_COMPILER ${tools}/bin/arm-linux-gnueabihf-g++)
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
||||
41
ReadMe.md
Normal file
41
ReadMe.md
Normal file
@ -0,0 +1,41 @@
|
||||
|
||||
|
||||
## 编译
|
||||
|
||||
```shell
|
||||
mkdir -p output && cd output/
|
||||
|
||||
# Cmake 生成 Makefile
|
||||
cmake ../
|
||||
|
||||
# 编译
|
||||
make all
|
||||
```
|
||||
|
||||
## 环境
|
||||
|
||||
### 支持VScode下clang跳转
|
||||
```shell
|
||||
mkdir -p output && cd output/
|
||||
|
||||
# Cmake 生成 Makefile
|
||||
cmake ../ -DCMAKE_EXPORT_COMPILE_COMMANDS=True
|
||||
|
||||
# 编译
|
||||
make all
|
||||
```
|
||||
|
||||
|
||||
## 项目示例
|
||||
|
||||
### F5Plus + PN5180
|
||||
|
||||
```shell
|
||||
cmake -DBUS_SPIUserMode=ON -DFRONTEND_PN5180=ON -DFRONTEND_PN5190=OFF -DCMAKE_EXPORT_COMPILE_COMMANDS=True --toolchain ../Platform/F5Plus/F5Plus-Toolchain.cmake ../
|
||||
```
|
||||
|
||||
### Raspi4B + PN5180
|
||||
|
||||
```shell
|
||||
cmake -DBUS_SPIUserMode=ON -DFRONTEND_PN5180=ON -DFRONTEND_PN5190=OFF -DCMAKE_EXPORT_COMPILE_COMMANDS=True --toolchain ../Platform/Raspi4B/F5Plus-Toolchain.cmake ../
|
||||
```
|
||||
Reference in New Issue
Block a user