liushengming
9 months ago
33 changed files with 2804 additions and 56 deletions
@ -0,0 +1,3 @@ |
|||
mainmenu "Phytium Baremetal Configuration" |
|||
|
|||
source "$(SDK_DIR)/standalone.kconfig" |
@ -0,0 +1,137 @@ |
|||
# DDMA 测试 |
|||
|
|||
## 1\. 例程介绍 |
|||
|
|||
> 介绍例程的用途,使用场景,相关基本概念,描述用户可以使用例程完成哪些工作 |
|||
|
|||
本例程示范了使用DDMA进行spi外设数据传输。 |
|||
|
|||
- 此例程在E2000D\\Q DEMO板和Phytiumpi上均通过测试。 |
|||
|
|||
- 该例程支持测试模式(无需接线,数据内部换回)和接线模式(数据外部环回)。通过修改宏定义SPIM_TEST_MODE_ENABLE进行模式切换(TRUE:测试模式;FALSE:接线模式) |
|||
|
|||
- 支持软件配置数据传输量。 |
|||
|
|||
SPI DMA模式环回测试(ddma_spim_lookback_example.c) |
|||
|
|||
- spi外设传输数据时使用DMA模式。 |
|||
|
|||
- DDMA发送通道将数据从内存传输到外设;DDMA接收通道将数据从外设传输到内存。 |
|||
|
|||
- 对比发送数据和接收数据是否相同,以此确认DDMA模式的环回测试是否成功。 |
|||
|
|||
## 2\. 如何使用例程 |
|||
|
|||
> 描述开发平台准备,使用例程配置,构建和下载镜像的过程 |
|||
|
|||
本例程需要以下硬件: |
|||
|
|||
- E2000D\\Q Demo板或Phytiun pi |
|||
|
|||
- 串口线和串口上位机 |
|||
|
|||
- 杜邦线(接线模式下需要) |
|||
|
|||
### 2\.1 硬件配置方法 |
|||
|
|||
> 哪些硬件平台是支持的,需要哪些外设,例程与开发板哪些IO口相关等(建议附录开发板照片,展示哪些IO口被引出) |
|||
|
|||
- E2000D\\Q接线方法:测试使用SPI2。若使用接线模式测试,测试前需按照下图,通过杜邦线连接SPI的TX口(9号引脚)和RX口(5号引脚)。 |
|||
|
|||
![alt text](./figs/e2000_d.png) |
|||
|
|||
- Phytium Pi接线方法:杜邦线连接下图所示得19号引脚和21号引脚。 |
|||
<div align="center"> |
|||
<img src="./figs/phytiumpi.png" width="20%"> |
|||
</div> |
|||
|
|||
### 2\.2 SDK配置方法 |
|||
|
|||
打开第三方库: |
|||
|
|||
- Use letter shell |
|||
|
|||
打开驱动配置项: |
|||
|
|||
- Use FSPIM |
|||
|
|||
- Use FDDMA |
|||
|
|||
- Use sata |
|||
|
|||
- Use IOMux |
|||
|
|||
本例子已经提供好具体的编译指令,以下进行介绍: |
|||
|
|||
- make 将目录下的工程进行编译 |
|||
|
|||
- make clean 将目录下的工程进行清理 |
|||
|
|||
- make image 将目录下的工程进行编译,并将生成的elf 复制到目标地址 |
|||
|
|||
- make list_kconfig 当前工程支持哪些配置文件 |
|||
|
|||
- make load_kconfig LOAD_CONFIG_NAME= 将预设配置加载至工程中 |
|||
|
|||
- make menuconfig 配置目录下的参数变量 |
|||
|
|||
- make backup_kconfig 将目录下的sdkconfig 备份到./configs下 |
|||
|
|||
具体使用方法为: |
|||
|
|||
- 在当前目录下 |
|||
|
|||
- 执行以上指令 |
|||
|
|||
### 2\.3 构建和下载 |
|||
|
|||
> 描述构建、烧录下载镜像的过程,列出相关的命令 |
|||
|
|||
- 在host侧完成配置 |
|||
|
|||
> 配置成E2000D,对于其它平台,使用对应的默认配置,如E2000d 32位: |
|||
|
|||
```csharp |
|||
$ make load_kconfig LOAD_CONFIG_NAME=e2000d_aarch32_demo_ddma_spim |
|||
``` |
|||
|
|||
- 在host侧完成配置 |
|||
|
|||
```csharp |
|||
$ make image |
|||
``` |
|||
|
|||
- host侧设置重启host侧tftp服务器 |
|||
|
|||
```csharp |
|||
sudo service tftpd-hpa restart |
|||
``` |
|||
|
|||
- 开发板侧使用bootelf命令跳转 |
|||
|
|||
```csharp |
|||
setenv ipaddr 192.168.4.20 |
|||
setenv serverip 192.168.4.50 |
|||
setenv gatewayip 192.168.4.1 |
|||
tftpboot 0x90100000 baremetal.elf |
|||
bootelf -p 0x90100000 |
|||
``` |
|||
|
|||
### 2\.4 输出与实验现象 |
|||
|
|||
> 描述输入输出情况,列出存在哪些输出,对应的输出是什么(建议附录相关现象图片) |
|||
|
|||
#### 2\.4.1 ddma spim环回测试 |
|||
|
|||
```csharp |
|||
$ ddma spim_lookback |
|||
``` |
|||
![alt text](./figs/result.png) |
|||
|
|||
## 3\. 如何解决问题 |
|||
|
|||
> 主要记录使用例程中可能会遇到的问题,给出相应的解决方案 |
|||
|
|||
## 4\. 修改历史记录 |
|||
|
|||
> 记录例程的重大修改记录,标明修改发生的版本号 |
@ -0,0 +1,256 @@ |
|||
CONFIG_USE_BAREMETAL=y |
|||
|
|||
# |
|||
# Arch configuration |
|||
# |
|||
CONFIG_TARGET_ARMv8=y |
|||
CONFIG_ARCH_NAME="armv8" |
|||
|
|||
# |
|||
# Arm architecture configuration |
|||
# |
|||
# CONFIG_ARCH_ARMV8_AARCH64 is not set |
|||
CONFIG_ARCH_ARMV8_AARCH32=y |
|||
|
|||
# |
|||
# Compiler configuration |
|||
# |
|||
CONFIG_ARM_GCC_SELECT=y |
|||
# CONFIG_ARM_CLANG_SELECT is not set |
|||
CONFIG_TOOLCHAIN_NAME="gcc" |
|||
CONFIG_TARGET_ARMV8_AARCH32=y |
|||
CONFIG_ARCH_EXECUTION_STATE="aarch32" |
|||
|
|||
# |
|||
# Fpu configuration |
|||
# |
|||
CONFIG_CRYPTO_NEON_FP_ARMV8=y |
|||
# CONFIG_VFPV4 is not set |
|||
# CONFIG_VFPV4_D16 is not set |
|||
# CONFIG_VFPV3 is not set |
|||
# CONFIG_VFPV3_D16 is not set |
|||
CONFIG_ARM_MFPU="crypto-neon-fp-armv8" |
|||
CONFIG_MFLOAT_ABI_HARD=y |
|||
# CONFIG_MFLOAT_ABI_SOFTFP is not set |
|||
CONFIG_ARM_MFLOAT_ABI="hard" |
|||
# end of Fpu configuration |
|||
# end of Compiler configuration |
|||
|
|||
CONFIG_USE_CACHE=y |
|||
CONFIG_USE_MMU=y |
|||
CONFIG_USE_AARCH64_L1_TO_AARCH32=y |
|||
# end of Arm architecture configuration |
|||
# end of Arch configuration |
|||
|
|||
# |
|||
# Soc configuration |
|||
# |
|||
# CONFIG_TARGET_PHYTIUMPI is not set |
|||
# CONFIG_TARGET_E2000Q is not set |
|||
CONFIG_TARGET_E2000D=y |
|||
# CONFIG_TARGET_E2000S is not set |
|||
# CONFIG_TARGET_FT2004 is not set |
|||
# CONFIG_TARGET_D2000 is not set |
|||
CONFIG_SOC_NAME="e2000" |
|||
CONFIG_TARGET_TYPE_NAME="d" |
|||
CONFIG_SOC_CORE_NUM=2 |
|||
CONFIG_F32BIT_MEMORY_ADDRESS=0x80000000 |
|||
CONFIG_F32BIT_MEMORY_LENGTH=0x80000000 |
|||
CONFIG_F64BIT_MEMORY_ADDRESS=0x2000000000 |
|||
CONFIG_F64BIT_MEMORY_LENGTH=0x800000000 |
|||
CONFIG_TARGET_E2000=y |
|||
# CONFIG_USE_SPINLOCK is not set |
|||
CONFIG_DEFAULT_DEBUG_PRINT_UART1=y |
|||
# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set |
|||
# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set |
|||
# end of Soc configuration |
|||
|
|||
# |
|||
# Board Configuration |
|||
# |
|||
CONFIG_E2000D_DEMO_BOARD=y |
|||
CONFIG_BOARD_NAME="demo" |
|||
|
|||
# |
|||
# IO mux configuration when board start up |
|||
# |
|||
# CONFIG_USE_SPI_IOPAD is not set |
|||
# CONFIG_USE_GPIO_IOPAD is not set |
|||
# CONFIG_USE_CAN_IOPAD is not set |
|||
# CONFIG_USE_QSPI_IOPAD is not set |
|||
# CONFIG_USE_PWM_IOPAD is not set |
|||
# CONFIG_USE_ADC_IOPAD is not set |
|||
# CONFIG_USE_MIO_IOPAD is not set |
|||
# CONFIG_USE_TACHO_IOPAD is not set |
|||
# CONFIG_USE_UART_IOPAD is not set |
|||
# CONFIG_USE_THIRD_PARTY_IOPAD is not set |
|||
# end of IO mux configuration when board start up |
|||
|
|||
# CONFIG_CUS_DEMO_BOARD is not set |
|||
|
|||
# |
|||
# Build project name |
|||
# |
|||
CONFIG_TARGET_NAME="ddma_spim" |
|||
# end of Build project name |
|||
# end of Board Configuration |
|||
|
|||
# |
|||
# Sdk common configuration |
|||
# |
|||
# CONFIG_LOG_VERBOS is not set |
|||
# CONFIG_LOG_DEBUG is not set |
|||
# CONFIG_LOG_INFO is not set |
|||
# CONFIG_LOG_WARN is not set |
|||
CONFIG_LOG_ERROR=y |
|||
# CONFIG_LOG_NONE is not set |
|||
CONFIG_LOG_EXTRA_INFO=y |
|||
# CONFIG_LOG_DISPALY_CORE_NUM is not set |
|||
# CONFIG_BOOTUP_DEBUG_PRINTS is not set |
|||
CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y |
|||
CONFIG_INTERRUPT_ROLE_MASTER=y |
|||
# CONFIG_INTERRUPT_ROLE_SLAVE is not set |
|||
# end of Sdk common configuration |
|||
|
|||
# |
|||
# Image information configuration |
|||
# |
|||
# CONFIG_IMAGE_INFO is not set |
|||
# end of Image information configuration |
|||
|
|||
# |
|||
# Drivers configuration |
|||
# |
|||
CONFIG_USE_IOMUX=y |
|||
# CONFIG_ENABLE_IOCTRL is not set |
|||
CONFIG_ENABLE_IOPAD=y |
|||
CONFIG_USE_SPI=y |
|||
CONFIG_USE_FSPIM=y |
|||
# CONFIG_USE_QSPI is not set |
|||
CONFIG_USE_SERIAL=y |
|||
|
|||
# |
|||
# Usart Configuration |
|||
# |
|||
CONFIG_ENABLE_Pl011_UART=y |
|||
# end of Usart Configuration |
|||
|
|||
CONFIG_USE_GPIO=y |
|||
# CONFIG_ENABLE_FGPIO is not set |
|||
# CONFIG_USE_ETH is not set |
|||
# CONFIG_USE_CAN is not set |
|||
# CONFIG_USE_I2C is not set |
|||
# CONFIG_USE_TIMER is not set |
|||
# CONFIG_USE_MIO is not set |
|||
# CONFIG_USE_SDMMC is not set |
|||
# CONFIG_USE_PCIE is not set |
|||
# CONFIG_USE_WDT is not set |
|||
CONFIG_USE_DMA=y |
|||
# CONFIG_ENABLE_FGDMA is not set |
|||
CONFIG_ENABLE_FDDMA=y |
|||
# CONFIG_USE_NAND is not set |
|||
# CONFIG_USE_RTC is not set |
|||
CONFIG_USE_SATA=y |
|||
|
|||
# |
|||
# FSATA Configuration |
|||
# |
|||
CONFIG_ENABLE_FSATA=y |
|||
# end of FSATA Configuration |
|||
|
|||
# CONFIG_USE_USB is not set |
|||
# CONFIG_USE_ADC is not set |
|||
# CONFIG_USE_PWM is not set |
|||
# CONFIG_USE_IPC is not set |
|||
# CONFIG_USE_MEDIA is not set |
|||
# CONFIG_USE_SCMI_MHU is not set |
|||
# CONFIG_USE_I2S is not set |
|||
# end of Drivers configuration |
|||
|
|||
# |
|||
# Third-party configuration |
|||
# |
|||
# CONFIG_USE_LWIP is not set |
|||
CONFIG_USE_LETTER_SHELL=y |
|||
|
|||
# |
|||
# Letter shell configuration |
|||
# |
|||
CONFIG_LS_PL011_UART=y |
|||
CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y |
|||
# CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set |
|||
# CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set |
|||
# end of Letter shell configuration |
|||
|
|||
# CONFIG_USE_AMP is not set |
|||
# CONFIG_USE_YMODEM is not set |
|||
# CONFIG_USE_SFUD is not set |
|||
# CONFIG_USE_FATFS_0_1_4 is not set |
|||
CONFIG_USE_TLSF=y |
|||
# CONFIG_USE_SPIFFS is not set |
|||
# CONFIG_USE_LITTLE_FS is not set |
|||
# CONFIG_USE_LVGL is not set |
|||
# CONFIG_USE_FREEMODBUS is not set |
|||
# CONFIG_USE_FSL_SDMMC is not set |
|||
# CONFIG_USE_MICROPYTHON is not set |
|||
# end of Third-party configuration |
|||
|
|||
# |
|||
# Build setup |
|||
# |
|||
CONFIG_CHECK_DEPS=y |
|||
CONFIG_OUTPUT_BINARY=y |
|||
|
|||
# |
|||
# Optimization options |
|||
# |
|||
# CONFIG_DEBUG_NOOPT is not set |
|||
# CONFIG_DEBUG_CUSTOMOPT is not set |
|||
CONFIG_DEBUG_FULLOPT=y |
|||
CONFIG_DEBUG_OPT_UNUSED_SECTIONS=y |
|||
CONFIG_DEBUG_LINK_MAP=y |
|||
# CONFIG_CCACHE is not set |
|||
# CONFIG_ARCH_COVERAGE is not set |
|||
# CONFIG_LTO_FULL is not set |
|||
# end of Optimization options |
|||
|
|||
# |
|||
# Debug options |
|||
# |
|||
# CONFIG_DEBUG_ENABLE_ALL_WARNING is not set |
|||
# CONFIG_WALL_WARNING_ERROR is not set |
|||
# CONFIG_STRICT_PROTOTYPES is not set |
|||
# CONFIG_DEBUG_SYMBOLS is not set |
|||
# CONFIG_FRAME_POINTER is not set |
|||
# CONFIG_OUTPUT_ASM_DIS is not set |
|||
# CONFIG_ENABLE_WSHADOW is not set |
|||
# CONFIG_ENABLE_WUNDEF is not set |
|||
CONFIG_DOWNGRADE_DIAG_WARNING=y |
|||
# end of Debug options |
|||
|
|||
# |
|||
# Lib |
|||
# |
|||
CONFIG_USE_COMPILE_CHAIN=y |
|||
# CONFIG_USE_NEWLIB is not set |
|||
# CONFIG_USE_USER_DEFINED is not set |
|||
# end of Lib |
|||
|
|||
# CONFIG_ENABLE_CXX is not set |
|||
|
|||
# |
|||
# Linker Options |
|||
# |
|||
CONFIG_DEFAULT_LINKER_SCRIPT=y |
|||
# CONFIG_USER_DEFINED_LD is not set |
|||
CONFIG_IMAGE_LOAD_ADDRESS=0x80100000 |
|||
CONFIG_IMAGE_MAX_LENGTH=0x1000000 |
|||
CONFIG_HEAP_SIZE=1 |
|||
CONFIG_SVC_STACK_SIZE=0x1000 |
|||
CONFIG_SYS_STACK_SIZE=0x1000 |
|||
CONFIG_IRQ_STACK_SIZE=0x1000 |
|||
CONFIG_ABORT_STACK_SIZE=0x1000 |
|||
CONFIG_FIQ_STACK_SIZE=0x1000 |
|||
CONFIG_UNDEF_STACK_SIZE=0x1000 |
|||
# end of Linker Options |
|||
# end of Build setup |
@ -0,0 +1,245 @@ |
|||
CONFIG_USE_BAREMETAL=y |
|||
|
|||
# |
|||
# Arch configuration |
|||
# |
|||
CONFIG_TARGET_ARMv8=y |
|||
CONFIG_ARCH_NAME="armv8" |
|||
|
|||
# |
|||
# Arm architecture configuration |
|||
# |
|||
CONFIG_ARCH_ARMV8_AARCH64=y |
|||
# CONFIG_ARCH_ARMV8_AARCH32 is not set |
|||
|
|||
# |
|||
# Compiler configuration |
|||
# |
|||
CONFIG_ARM_GCC_SELECT=y |
|||
# CONFIG_ARM_CLANG_SELECT is not set |
|||
CONFIG_TOOLCHAIN_NAME="gcc" |
|||
CONFIG_TARGET_ARMV8_AARCH64=y |
|||
CONFIG_ARCH_EXECUTION_STATE="aarch64" |
|||
CONFIG_ARM_NEON=y |
|||
CONFIG_ARM_CRC=y |
|||
CONFIG_ARM_CRYPTO=y |
|||
CONFIG_ARM_FLOAT_POINT=y |
|||
# CONFIG_GCC_CODE_MODEL_TINY is not set |
|||
CONFIG_GCC_CODE_MODEL_SMALL=y |
|||
# CONFIG_GCC_CODE_MODEL_LARGE is not set |
|||
# end of Compiler configuration |
|||
|
|||
CONFIG_USE_CACHE=y |
|||
CONFIG_USE_MMU=y |
|||
CONFIG_BOOT_WITH_FLUSH_CACHE=y |
|||
# CONFIG_MMU_DEBUG_PRINTS is not set |
|||
# end of Arm architecture configuration |
|||
# end of Arch configuration |
|||
|
|||
# |
|||
# Soc configuration |
|||
# |
|||
# CONFIG_TARGET_PHYTIUMPI is not set |
|||
# CONFIG_TARGET_E2000Q is not set |
|||
CONFIG_TARGET_E2000D=y |
|||
# CONFIG_TARGET_E2000S is not set |
|||
# CONFIG_TARGET_FT2004 is not set |
|||
# CONFIG_TARGET_D2000 is not set |
|||
CONFIG_SOC_NAME="e2000" |
|||
CONFIG_TARGET_TYPE_NAME="d" |
|||
CONFIG_SOC_CORE_NUM=2 |
|||
CONFIG_F32BIT_MEMORY_ADDRESS=0x80000000 |
|||
CONFIG_F32BIT_MEMORY_LENGTH=0x80000000 |
|||
CONFIG_F64BIT_MEMORY_ADDRESS=0x2000000000 |
|||
CONFIG_F64BIT_MEMORY_LENGTH=0x800000000 |
|||
CONFIG_TARGET_E2000=y |
|||
# CONFIG_USE_SPINLOCK is not set |
|||
CONFIG_DEFAULT_DEBUG_PRINT_UART1=y |
|||
# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set |
|||
# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set |
|||
# end of Soc configuration |
|||
|
|||
# |
|||
# Board Configuration |
|||
# |
|||
CONFIG_E2000D_DEMO_BOARD=y |
|||
CONFIG_BOARD_NAME="demo" |
|||
|
|||
# |
|||
# IO mux configuration when board start up |
|||
# |
|||
# CONFIG_USE_SPI_IOPAD is not set |
|||
# CONFIG_USE_GPIO_IOPAD is not set |
|||
# CONFIG_USE_CAN_IOPAD is not set |
|||
# CONFIG_USE_QSPI_IOPAD is not set |
|||
# CONFIG_USE_PWM_IOPAD is not set |
|||
# CONFIG_USE_ADC_IOPAD is not set |
|||
# CONFIG_USE_MIO_IOPAD is not set |
|||
# CONFIG_USE_TACHO_IOPAD is not set |
|||
# CONFIG_USE_UART_IOPAD is not set |
|||
# CONFIG_USE_THIRD_PARTY_IOPAD is not set |
|||
# end of IO mux configuration when board start up |
|||
|
|||
# CONFIG_CUS_DEMO_BOARD is not set |
|||
|
|||
# |
|||
# Build project name |
|||
# |
|||
CONFIG_TARGET_NAME="ddma_spim" |
|||
# end of Build project name |
|||
# end of Board Configuration |
|||
|
|||
# |
|||
# Sdk common configuration |
|||
# |
|||
# CONFIG_LOG_VERBOS is not set |
|||
# CONFIG_LOG_DEBUG is not set |
|||
# CONFIG_LOG_INFO is not set |
|||
# CONFIG_LOG_WARN is not set |
|||
CONFIG_LOG_ERROR=y |
|||
# CONFIG_LOG_NONE is not set |
|||
CONFIG_LOG_EXTRA_INFO=y |
|||
# CONFIG_LOG_DISPALY_CORE_NUM is not set |
|||
# CONFIG_BOOTUP_DEBUG_PRINTS is not set |
|||
CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y |
|||
CONFIG_INTERRUPT_ROLE_MASTER=y |
|||
# CONFIG_INTERRUPT_ROLE_SLAVE is not set |
|||
# end of Sdk common configuration |
|||
|
|||
# |
|||
# Image information configuration |
|||
# |
|||
# CONFIG_IMAGE_INFO is not set |
|||
# end of Image information configuration |
|||
|
|||
# |
|||
# Drivers configuration |
|||
# |
|||
CONFIG_USE_IOMUX=y |
|||
# CONFIG_ENABLE_IOCTRL is not set |
|||
CONFIG_ENABLE_IOPAD=y |
|||
CONFIG_USE_SPI=y |
|||
CONFIG_USE_FSPIM=y |
|||
# CONFIG_USE_QSPI is not set |
|||
CONFIG_USE_SERIAL=y |
|||
|
|||
# |
|||
# Usart Configuration |
|||
# |
|||
CONFIG_ENABLE_Pl011_UART=y |
|||
# end of Usart Configuration |
|||
|
|||
CONFIG_USE_GPIO=y |
|||
# CONFIG_ENABLE_FGPIO is not set |
|||
# CONFIG_USE_ETH is not set |
|||
# CONFIG_USE_CAN is not set |
|||
# CONFIG_USE_I2C is not set |
|||
# CONFIG_USE_TIMER is not set |
|||
# CONFIG_USE_MIO is not set |
|||
# CONFIG_USE_SDMMC is not set |
|||
# CONFIG_USE_PCIE is not set |
|||
# CONFIG_USE_WDT is not set |
|||
CONFIG_USE_DMA=y |
|||
# CONFIG_ENABLE_FGDMA is not set |
|||
CONFIG_ENABLE_FDDMA=y |
|||
# CONFIG_USE_NAND is not set |
|||
# CONFIG_USE_RTC is not set |
|||
CONFIG_USE_SATA=y |
|||
|
|||
# |
|||
# FSATA Configuration |
|||
# |
|||
CONFIG_ENABLE_FSATA=y |
|||
# end of FSATA Configuration |
|||
|
|||
# CONFIG_USE_USB is not set |
|||
# CONFIG_USE_ADC is not set |
|||
# CONFIG_USE_PWM is not set |
|||
# CONFIG_USE_IPC is not set |
|||
# CONFIG_USE_MEDIA is not set |
|||
# CONFIG_USE_SCMI_MHU is not set |
|||
# CONFIG_USE_I2S is not set |
|||
# end of Drivers configuration |
|||
|
|||
# |
|||
# Third-party configuration |
|||
# |
|||
# CONFIG_USE_LWIP is not set |
|||
CONFIG_USE_LETTER_SHELL=y |
|||
|
|||
# |
|||
# Letter shell configuration |
|||
# |
|||
CONFIG_LS_PL011_UART=y |
|||
CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y |
|||
# CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set |
|||
# CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set |
|||
# end of Letter shell configuration |
|||
|
|||
# CONFIG_USE_AMP is not set |
|||
# CONFIG_USE_YMODEM is not set |
|||
# CONFIG_USE_SFUD is not set |
|||
# CONFIG_USE_FATFS_0_1_4 is not set |
|||
CONFIG_USE_TLSF=y |
|||
# CONFIG_USE_SPIFFS is not set |
|||
# CONFIG_USE_LITTLE_FS is not set |
|||
# CONFIG_USE_LVGL is not set |
|||
# CONFIG_USE_FREEMODBUS is not set |
|||
# CONFIG_USE_FSL_SDMMC is not set |
|||
# CONFIG_USE_MICROPYTHON is not set |
|||
# end of Third-party configuration |
|||
|
|||
# |
|||
# Build setup |
|||
# |
|||
CONFIG_CHECK_DEPS=y |
|||
CONFIG_OUTPUT_BINARY=y |
|||
|
|||
# |
|||
# Optimization options |
|||
# |
|||
# CONFIG_DEBUG_NOOPT is not set |
|||
# CONFIG_DEBUG_CUSTOMOPT is not set |
|||
CONFIG_DEBUG_FULLOPT=y |
|||
CONFIG_DEBUG_OPT_UNUSED_SECTIONS=y |
|||
CONFIG_DEBUG_LINK_MAP=y |
|||
# CONFIG_CCACHE is not set |
|||
# CONFIG_ARCH_COVERAGE is not set |
|||
# CONFIG_LTO_FULL is not set |
|||
# end of Optimization options |
|||
|
|||
# |
|||
# Debug options |
|||
# |
|||
# CONFIG_DEBUG_ENABLE_ALL_WARNING is not set |
|||
# CONFIG_WALL_WARNING_ERROR is not set |
|||
# CONFIG_STRICT_PROTOTYPES is not set |
|||
# CONFIG_DEBUG_SYMBOLS is not set |
|||
# CONFIG_FRAME_POINTER is not set |
|||
# CONFIG_OUTPUT_ASM_DIS is not set |
|||
# CONFIG_ENABLE_WSHADOW is not set |
|||
# CONFIG_ENABLE_WUNDEF is not set |
|||
CONFIG_DOWNGRADE_DIAG_WARNING=y |
|||
# end of Debug options |
|||
|
|||
# |
|||
# Lib |
|||
# |
|||
CONFIG_USE_COMPILE_CHAIN=y |
|||
# CONFIG_USE_NEWLIB is not set |
|||
# CONFIG_USE_USER_DEFINED is not set |
|||
# end of Lib |
|||
|
|||
# CONFIG_ENABLE_CXX is not set |
|||
|
|||
# |
|||
# Linker Options |
|||
# |
|||
CONFIG_DEFAULT_LINKER_SCRIPT=y |
|||
# CONFIG_USER_DEFINED_LD is not set |
|||
CONFIG_IMAGE_LOAD_ADDRESS=0x80100000 |
|||
CONFIG_IMAGE_MAX_LENGTH=0x1000000 |
|||
CONFIG_HEAP_SIZE=1 |
|||
CONFIG_STACK_SIZE=0x400 |
|||
# end of Linker Options |
|||
# end of Build setup |
@ -0,0 +1,255 @@ |
|||
CONFIG_USE_BAREMETAL=y |
|||
|
|||
# |
|||
# Arch configuration |
|||
# |
|||
CONFIG_TARGET_ARMv8=y |
|||
CONFIG_ARCH_NAME="armv8" |
|||
|
|||
# |
|||
# Arm architecture configuration |
|||
# |
|||
# CONFIG_ARCH_ARMV8_AARCH64 is not set |
|||
CONFIG_ARCH_ARMV8_AARCH32=y |
|||
|
|||
# |
|||
# Compiler configuration |
|||
# |
|||
CONFIG_ARM_GCC_SELECT=y |
|||
# CONFIG_ARM_CLANG_SELECT is not set |
|||
CONFIG_TOOLCHAIN_NAME="gcc" |
|||
CONFIG_TARGET_ARMV8_AARCH32=y |
|||
CONFIG_ARCH_EXECUTION_STATE="aarch32" |
|||
|
|||
# |
|||
# Fpu configuration |
|||
# |
|||
CONFIG_CRYPTO_NEON_FP_ARMV8=y |
|||
# CONFIG_VFPV4 is not set |
|||
# CONFIG_VFPV4_D16 is not set |
|||
# CONFIG_VFPV3 is not set |
|||
# CONFIG_VFPV3_D16 is not set |
|||
CONFIG_ARM_MFPU="crypto-neon-fp-armv8" |
|||
CONFIG_MFLOAT_ABI_HARD=y |
|||
# CONFIG_MFLOAT_ABI_SOFTFP is not set |
|||
CONFIG_ARM_MFLOAT_ABI="hard" |
|||
# end of Fpu configuration |
|||
# end of Compiler configuration |
|||
|
|||
CONFIG_USE_CACHE=y |
|||
CONFIG_USE_MMU=y |
|||
CONFIG_USE_AARCH64_L1_TO_AARCH32=y |
|||
# end of Arm architecture configuration |
|||
# end of Arch configuration |
|||
|
|||
# |
|||
# Soc configuration |
|||
# |
|||
# CONFIG_TARGET_PHYTIUMPI is not set |
|||
CONFIG_TARGET_E2000Q=y |
|||
# CONFIG_TARGET_E2000D is not set |
|||
# CONFIG_TARGET_E2000S is not set |
|||
# CONFIG_TARGET_FT2004 is not set |
|||
# CONFIG_TARGET_D2000 is not set |
|||
CONFIG_SOC_NAME="e2000" |
|||
CONFIG_TARGET_TYPE_NAME="q" |
|||
CONFIG_SOC_CORE_NUM=4 |
|||
CONFIG_F32BIT_MEMORY_ADDRESS=0x80000000 |
|||
CONFIG_F32BIT_MEMORY_LENGTH=0x80000000 |
|||
CONFIG_F64BIT_MEMORY_ADDRESS=0x2000000000 |
|||
CONFIG_F64BIT_MEMORY_LENGTH=0x800000000 |
|||
CONFIG_TARGET_E2000=y |
|||
# CONFIG_USE_SPINLOCK is not set |
|||
CONFIG_DEFAULT_DEBUG_PRINT_UART1=y |
|||
# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set |
|||
# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set |
|||
# end of Soc configuration |
|||
|
|||
# |
|||
# Board Configuration |
|||
# |
|||
CONFIG_BOARD_NAME="demo" |
|||
# CONFIG_USE_SPI_IOPAD is not set |
|||
# CONFIG_USE_GPIO_IOPAD is not set |
|||
# CONFIG_USE_CAN_IOPAD is not set |
|||
# CONFIG_USE_QSPI_IOPAD is not set |
|||
# CONFIG_USE_PWM_IOPAD is not set |
|||
# CONFIG_USE_MIO_IOPAD is not set |
|||
# CONFIG_USE_TACHO_IOPAD is not set |
|||
# CONFIG_USE_UART_IOPAD is not set |
|||
# CONFIG_USE_THIRD_PARTY_IOPAD is not set |
|||
CONFIG_E2000Q_DEMO_BOARD=y |
|||
|
|||
# |
|||
# IO mux configuration when board start up |
|||
# |
|||
# end of IO mux configuration when board start up |
|||
|
|||
# CONFIG_CUS_DEMO_BOARD is not set |
|||
|
|||
# |
|||
# Build project name |
|||
# |
|||
CONFIG_TARGET_NAME="ddma_spim" |
|||
# end of Build project name |
|||
# end of Board Configuration |
|||
|
|||
# |
|||
# Sdk common configuration |
|||
# |
|||
# CONFIG_LOG_VERBOS is not set |
|||
# CONFIG_LOG_DEBUG is not set |
|||
# CONFIG_LOG_INFO is not set |
|||
# CONFIG_LOG_WARN is not set |
|||
CONFIG_LOG_ERROR=y |
|||
# CONFIG_LOG_NONE is not set |
|||
CONFIG_LOG_EXTRA_INFO=y |
|||
# CONFIG_LOG_DISPALY_CORE_NUM is not set |
|||
# CONFIG_BOOTUP_DEBUG_PRINTS is not set |
|||
CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y |
|||
CONFIG_INTERRUPT_ROLE_MASTER=y |
|||
# CONFIG_INTERRUPT_ROLE_SLAVE is not set |
|||
# end of Sdk common configuration |
|||
|
|||
# |
|||
# Image information configuration |
|||
# |
|||
# CONFIG_IMAGE_INFO is not set |
|||
# end of Image information configuration |
|||
|
|||
# |
|||
# Drivers configuration |
|||
# |
|||
CONFIG_USE_IOMUX=y |
|||
# CONFIG_ENABLE_IOCTRL is not set |
|||
CONFIG_ENABLE_IOPAD=y |
|||
CONFIG_USE_SPI=y |
|||
CONFIG_USE_FSPIM=y |
|||
# CONFIG_USE_QSPI is not set |
|||
CONFIG_USE_SERIAL=y |
|||
|
|||
# |
|||
# Usart Configuration |
|||
# |
|||
CONFIG_ENABLE_Pl011_UART=y |
|||
# end of Usart Configuration |
|||
|
|||
CONFIG_USE_GPIO=y |
|||
# CONFIG_ENABLE_FGPIO is not set |
|||
# CONFIG_USE_ETH is not set |
|||
# CONFIG_USE_CAN is not set |
|||
# CONFIG_USE_I2C is not set |
|||
# CONFIG_USE_TIMER is not set |
|||
# CONFIG_USE_MIO is not set |
|||
# CONFIG_USE_SDMMC is not set |
|||
# CONFIG_USE_PCIE is not set |
|||
# CONFIG_USE_WDT is not set |
|||
CONFIG_USE_DMA=y |
|||
# CONFIG_ENABLE_FGDMA is not set |
|||
CONFIG_ENABLE_FDDMA=y |
|||
# CONFIG_USE_NAND is not set |
|||
# CONFIG_USE_RTC is not set |
|||
CONFIG_USE_SATA=y |
|||
|
|||
# |
|||
# FSATA Configuration |
|||
# |
|||
CONFIG_ENABLE_FSATA=y |
|||
# end of FSATA Configuration |
|||
|
|||
# CONFIG_USE_USB is not set |
|||
# CONFIG_USE_ADC is not set |
|||
# CONFIG_USE_PWM is not set |
|||
# CONFIG_USE_IPC is not set |
|||
# CONFIG_USE_MEDIA is not set |
|||
# CONFIG_USE_SCMI_MHU is not set |
|||
# CONFIG_USE_I2S is not set |
|||
# end of Drivers configuration |
|||
|
|||
# |
|||
# Third-party configuration |
|||
# |
|||
# CONFIG_USE_LWIP is not set |
|||
CONFIG_USE_LETTER_SHELL=y |
|||
|
|||
# |
|||
# Letter shell configuration |
|||
# |
|||
CONFIG_LS_PL011_UART=y |
|||
CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y |
|||
# CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set |
|||
# CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set |
|||
# end of Letter shell configuration |
|||
|
|||
# CONFIG_USE_AMP is not set |
|||
# CONFIG_USE_YMODEM is not set |
|||
# CONFIG_USE_SFUD is not set |
|||
# CONFIG_USE_FATFS_0_1_4 is not set |
|||
CONFIG_USE_TLSF=y |
|||
# CONFIG_USE_SPIFFS is not set |
|||
# CONFIG_USE_LITTLE_FS is not set |
|||
# CONFIG_USE_LVGL is not set |
|||
# CONFIG_USE_FREEMODBUS is not set |
|||
# CONFIG_USE_FSL_SDMMC is not set |
|||
# CONFIG_USE_MICROPYTHON is not set |
|||
# end of Third-party configuration |
|||
|
|||
# |
|||
# Build setup |
|||
# |
|||
CONFIG_CHECK_DEPS=y |
|||
CONFIG_OUTPUT_BINARY=y |
|||
|
|||
# |
|||
# Optimization options |
|||
# |
|||
# CONFIG_DEBUG_NOOPT is not set |
|||
# CONFIG_DEBUG_CUSTOMOPT is not set |
|||
CONFIG_DEBUG_FULLOPT=y |
|||
CONFIG_DEBUG_OPT_UNUSED_SECTIONS=y |
|||
CONFIG_DEBUG_LINK_MAP=y |
|||
# CONFIG_CCACHE is not set |
|||
# CONFIG_ARCH_COVERAGE is not set |
|||
# CONFIG_LTO_FULL is not set |
|||
# end of Optimization options |
|||
|
|||
# |
|||
# Debug options |
|||
# |
|||
# CONFIG_DEBUG_ENABLE_ALL_WARNING is not set |
|||
# CONFIG_WALL_WARNING_ERROR is not set |
|||
# CONFIG_STRICT_PROTOTYPES is not set |
|||
# CONFIG_DEBUG_SYMBOLS is not set |
|||
# CONFIG_FRAME_POINTER is not set |
|||
# CONFIG_OUTPUT_ASM_DIS is not set |
|||
# CONFIG_ENABLE_WSHADOW is not set |
|||
# CONFIG_ENABLE_WUNDEF is not set |
|||
CONFIG_DOWNGRADE_DIAG_WARNING=y |
|||
# end of Debug options |
|||
|
|||
# |
|||
# Lib |
|||
# |
|||
CONFIG_USE_COMPILE_CHAIN=y |
|||
# CONFIG_USE_NEWLIB is not set |
|||
# CONFIG_USE_USER_DEFINED is not set |
|||
# end of Lib |
|||
|
|||
# CONFIG_ENABLE_CXX is not set |
|||
|
|||
# |
|||
# Linker Options |
|||
# |
|||
CONFIG_DEFAULT_LINKER_SCRIPT=y |
|||
# CONFIG_USER_DEFINED_LD is not set |
|||
CONFIG_IMAGE_LOAD_ADDRESS=0x80100000 |
|||
CONFIG_IMAGE_MAX_LENGTH=0x1000000 |
|||
CONFIG_HEAP_SIZE=1 |
|||
CONFIG_SVC_STACK_SIZE=0x1000 |
|||
CONFIG_SYS_STACK_SIZE=0x1000 |
|||
CONFIG_IRQ_STACK_SIZE=0x1000 |
|||
CONFIG_ABORT_STACK_SIZE=0x1000 |
|||
CONFIG_FIQ_STACK_SIZE=0x1000 |
|||
CONFIG_UNDEF_STACK_SIZE=0x1000 |
|||
# end of Linker Options |
|||
# end of Build setup |
@ -0,0 +1,244 @@ |
|||
CONFIG_USE_BAREMETAL=y |
|||
|
|||
# |
|||
# Arch configuration |
|||
# |
|||
CONFIG_TARGET_ARMv8=y |
|||
CONFIG_ARCH_NAME="armv8" |
|||
|
|||
# |
|||
# Arm architecture configuration |
|||
# |
|||
CONFIG_ARCH_ARMV8_AARCH64=y |
|||
# CONFIG_ARCH_ARMV8_AARCH32 is not set |
|||
|
|||
# |
|||
# Compiler configuration |
|||
# |
|||
CONFIG_ARM_GCC_SELECT=y |
|||
# CONFIG_ARM_CLANG_SELECT is not set |
|||
CONFIG_TOOLCHAIN_NAME="gcc" |
|||
CONFIG_TARGET_ARMV8_AARCH64=y |
|||
CONFIG_ARCH_EXECUTION_STATE="aarch64" |
|||
CONFIG_ARM_NEON=y |
|||
CONFIG_ARM_CRC=y |
|||
CONFIG_ARM_CRYPTO=y |
|||
CONFIG_ARM_FLOAT_POINT=y |
|||
# CONFIG_GCC_CODE_MODEL_TINY is not set |
|||
CONFIG_GCC_CODE_MODEL_SMALL=y |
|||
# CONFIG_GCC_CODE_MODEL_LARGE is not set |
|||
# end of Compiler configuration |
|||
|
|||
CONFIG_USE_CACHE=y |
|||
CONFIG_USE_MMU=y |
|||
CONFIG_BOOT_WITH_FLUSH_CACHE=y |
|||
# CONFIG_MMU_DEBUG_PRINTS is not set |
|||
# end of Arm architecture configuration |
|||
# end of Arch configuration |
|||
|
|||
# |
|||
# Soc configuration |
|||
# |
|||
# CONFIG_TARGET_PHYTIUMPI is not set |
|||
CONFIG_TARGET_E2000Q=y |
|||
# CONFIG_TARGET_E2000D is not set |
|||
# CONFIG_TARGET_E2000S is not set |
|||
# CONFIG_TARGET_FT2004 is not set |
|||
# CONFIG_TARGET_D2000 is not set |
|||
CONFIG_SOC_NAME="e2000" |
|||
CONFIG_TARGET_TYPE_NAME="q" |
|||
CONFIG_SOC_CORE_NUM=4 |
|||
CONFIG_F32BIT_MEMORY_ADDRESS=0x80000000 |
|||
CONFIG_F32BIT_MEMORY_LENGTH=0x80000000 |
|||
CONFIG_F64BIT_MEMORY_ADDRESS=0x2000000000 |
|||
CONFIG_F64BIT_MEMORY_LENGTH=0x800000000 |
|||
CONFIG_TARGET_E2000=y |
|||
# CONFIG_USE_SPINLOCK is not set |
|||
CONFIG_DEFAULT_DEBUG_PRINT_UART1=y |
|||
# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set |
|||
# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set |
|||
# end of Soc configuration |
|||
|
|||
# |
|||
# Board Configuration |
|||
# |
|||
CONFIG_BOARD_NAME="demo" |
|||
# CONFIG_USE_SPI_IOPAD is not set |
|||
# CONFIG_USE_GPIO_IOPAD is not set |
|||
# CONFIG_USE_CAN_IOPAD is not set |
|||
# CONFIG_USE_QSPI_IOPAD is not set |
|||
# CONFIG_USE_PWM_IOPAD is not set |
|||
# CONFIG_USE_MIO_IOPAD is not set |
|||
# CONFIG_USE_TACHO_IOPAD is not set |
|||
# CONFIG_USE_UART_IOPAD is not set |
|||
# CONFIG_USE_THIRD_PARTY_IOPAD is not set |
|||
CONFIG_E2000Q_DEMO_BOARD=y |
|||
|
|||
# |
|||
# IO mux configuration when board start up |
|||
# |
|||
# end of IO mux configuration when board start up |
|||
|
|||
# CONFIG_CUS_DEMO_BOARD is not set |
|||
|
|||
# |
|||
# Build project name |
|||
# |
|||
CONFIG_TARGET_NAME="ddma_spim" |
|||
# end of Build project name |
|||
# end of Board Configuration |
|||
|
|||
# |
|||
# Sdk common configuration |
|||
# |
|||
# CONFIG_LOG_VERBOS is not set |
|||
# CONFIG_LOG_DEBUG is not set |
|||
# CONFIG_LOG_INFO is not set |
|||
# CONFIG_LOG_WARN is not set |
|||
CONFIG_LOG_ERROR=y |
|||
# CONFIG_LOG_NONE is not set |
|||
CONFIG_LOG_EXTRA_INFO=y |
|||
# CONFIG_LOG_DISPALY_CORE_NUM is not set |
|||
# CONFIG_BOOTUP_DEBUG_PRINTS is not set |
|||
CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y |
|||
CONFIG_INTERRUPT_ROLE_MASTER=y |
|||
# CONFIG_INTERRUPT_ROLE_SLAVE is not set |
|||
# end of Sdk common configuration |
|||
|
|||
# |
|||
# Image information configuration |
|||
# |
|||
# CONFIG_IMAGE_INFO is not set |
|||
# end of Image information configuration |
|||
|
|||
# |
|||
# Drivers configuration |
|||
# |
|||
CONFIG_USE_IOMUX=y |
|||
# CONFIG_ENABLE_IOCTRL is not set |
|||
CONFIG_ENABLE_IOPAD=y |
|||
CONFIG_USE_SPI=y |
|||
CONFIG_USE_FSPIM=y |
|||
# CONFIG_USE_QSPI is not set |
|||
CONFIG_USE_SERIAL=y |
|||
|
|||
# |
|||
# Usart Configuration |
|||
# |
|||
CONFIG_ENABLE_Pl011_UART=y |
|||
# end of Usart Configuration |
|||
|
|||
CONFIG_USE_GPIO=y |
|||
# CONFIG_ENABLE_FGPIO is not set |
|||
# CONFIG_USE_ETH is not set |
|||
# CONFIG_USE_CAN is not set |
|||
# CONFIG_USE_I2C is not set |
|||
# CONFIG_USE_TIMER is not set |
|||
# CONFIG_USE_MIO is not set |
|||
# CONFIG_USE_SDMMC is not set |
|||
# CONFIG_USE_PCIE is not set |
|||
# CONFIG_USE_WDT is not set |
|||
CONFIG_USE_DMA=y |
|||
# CONFIG_ENABLE_FGDMA is not set |
|||
CONFIG_ENABLE_FDDMA=y |
|||
# CONFIG_USE_NAND is not set |
|||
# CONFIG_USE_RTC is not set |
|||
CONFIG_USE_SATA=y |
|||
|
|||
# |
|||
# FSATA Configuration |
|||
# |
|||
CONFIG_ENABLE_FSATA=y |
|||
# end of FSATA Configuration |
|||
|
|||
# CONFIG_USE_USB is not set |
|||
# CONFIG_USE_ADC is not set |
|||
# CONFIG_USE_PWM is not set |
|||
# CONFIG_USE_IPC is not set |
|||
# CONFIG_USE_MEDIA is not set |
|||
# CONFIG_USE_SCMI_MHU is not set |
|||
# CONFIG_USE_I2S is not set |
|||
# end of Drivers configuration |
|||
|
|||
# |
|||
# Third-party configuration |
|||
# |
|||
# CONFIG_USE_LWIP is not set |
|||
CONFIG_USE_LETTER_SHELL=y |
|||
|
|||
# |
|||
# Letter shell configuration |
|||
# |
|||
CONFIG_LS_PL011_UART=y |
|||
CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y |
|||
# CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set |
|||
# CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set |
|||
# end of Letter shell configuration |
|||
|
|||
# CONFIG_USE_AMP is not set |
|||
# CONFIG_USE_YMODEM is not set |
|||
# CONFIG_USE_SFUD is not set |
|||
# CONFIG_USE_FATFS_0_1_4 is not set |
|||
CONFIG_USE_TLSF=y |
|||
# CONFIG_USE_SPIFFS is not set |
|||
# CONFIG_USE_LITTLE_FS is not set |
|||
# CONFIG_USE_LVGL is not set |
|||
# CONFIG_USE_FREEMODBUS is not set |
|||
# CONFIG_USE_FSL_SDMMC is not set |
|||
# CONFIG_USE_MICROPYTHON is not set |
|||
# end of Third-party configuration |
|||
|
|||
# |
|||
# Build setup |
|||
# |
|||
CONFIG_CHECK_DEPS=y |
|||
CONFIG_OUTPUT_BINARY=y |
|||
|
|||
# |
|||
# Optimization options |
|||
# |
|||
# CONFIG_DEBUG_NOOPT is not set |
|||
# CONFIG_DEBUG_CUSTOMOPT is not set |
|||
CONFIG_DEBUG_FULLOPT=y |
|||
CONFIG_DEBUG_OPT_UNUSED_SECTIONS=y |
|||
CONFIG_DEBUG_LINK_MAP=y |
|||
# CONFIG_CCACHE is not set |
|||
# CONFIG_ARCH_COVERAGE is not set |
|||
# CONFIG_LTO_FULL is not set |
|||
# end of Optimization options |
|||
|
|||
# |
|||
# Debug options |
|||
# |
|||
# CONFIG_DEBUG_ENABLE_ALL_WARNING is not set |
|||
# CONFIG_WALL_WARNING_ERROR is not set |
|||
# CONFIG_STRICT_PROTOTYPES is not set |
|||
# CONFIG_DEBUG_SYMBOLS is not set |
|||
# CONFIG_FRAME_POINTER is not set |
|||
# CONFIG_OUTPUT_ASM_DIS is not set |
|||
# CONFIG_ENABLE_WSHADOW is not set |
|||
# CONFIG_ENABLE_WUNDEF is not set |
|||
CONFIG_DOWNGRADE_DIAG_WARNING=y |
|||
# end of Debug options |
|||
|
|||
# |
|||
# Lib |
|||
# |
|||
CONFIG_USE_COMPILE_CHAIN=y |
|||
# CONFIG_USE_NEWLIB is not set |
|||
# CONFIG_USE_USER_DEFINED is not set |
|||
# end of Lib |
|||
|
|||
# CONFIG_ENABLE_CXX is not set |
|||
|
|||
# |
|||
# Linker Options |
|||
# |
|||
CONFIG_DEFAULT_LINKER_SCRIPT=y |
|||
# CONFIG_USER_DEFINED_LD is not set |
|||
CONFIG_IMAGE_LOAD_ADDRESS=0x80100000 |
|||
CONFIG_IMAGE_MAX_LENGTH=0x1000000 |
|||
CONFIG_HEAP_SIZE=1 |
|||
CONFIG_STACK_SIZE=0x400 |
|||
# end of Linker Options |
|||
# end of Build setup |
@ -0,0 +1,254 @@ |
|||
CONFIG_USE_BAREMETAL=y |
|||
|
|||
# |
|||
# Arch configuration |
|||
# |
|||
CONFIG_TARGET_ARMv8=y |
|||
CONFIG_ARCH_NAME="armv8" |
|||
|
|||
# |
|||
# Arm architecture configuration |
|||
# |
|||
# CONFIG_ARCH_ARMV8_AARCH64 is not set |
|||
CONFIG_ARCH_ARMV8_AARCH32=y |
|||
|
|||
# |
|||
# Compiler configuration |
|||
# |
|||
CONFIG_ARM_GCC_SELECT=y |
|||
# CONFIG_ARM_CLANG_SELECT is not set |
|||
CONFIG_TOOLCHAIN_NAME="gcc" |
|||
CONFIG_TARGET_ARMV8_AARCH32=y |
|||
CONFIG_ARCH_EXECUTION_STATE="aarch32" |
|||
|
|||
# |
|||
# Fpu configuration |
|||
# |
|||
CONFIG_CRYPTO_NEON_FP_ARMV8=y |
|||
# CONFIG_VFPV4 is not set |
|||
# CONFIG_VFPV4_D16 is not set |
|||
# CONFIG_VFPV3 is not set |
|||
# CONFIG_VFPV3_D16 is not set |
|||
CONFIG_ARM_MFPU="crypto-neon-fp-armv8" |
|||
CONFIG_MFLOAT_ABI_HARD=y |
|||
# CONFIG_MFLOAT_ABI_SOFTFP is not set |
|||
CONFIG_ARM_MFLOAT_ABI="hard" |
|||
# end of Fpu configuration |
|||
# end of Compiler configuration |
|||
|
|||
CONFIG_USE_CACHE=y |
|||
CONFIG_USE_MMU=y |
|||
CONFIG_USE_AARCH64_L1_TO_AARCH32=y |
|||
# end of Arm architecture configuration |
|||
# end of Arch configuration |
|||
|
|||
# |
|||
# Soc configuration |
|||
# |
|||
CONFIG_TARGET_PHYTIUMPI=y |
|||
# CONFIG_TARGET_E2000Q is not set |
|||
# CONFIG_TARGET_E2000D is not set |
|||
# CONFIG_TARGET_E2000S is not set |
|||
# CONFIG_TARGET_FT2004 is not set |
|||
# CONFIG_TARGET_D2000 is not set |
|||
CONFIG_SOC_NAME="phytiumpi" |
|||
CONFIG_SOC_CORE_NUM=4 |
|||
CONFIG_F32BIT_MEMORY_ADDRESS=0x80000000 |
|||
CONFIG_F32BIT_MEMORY_LENGTH=0x80000000 |
|||
CONFIG_F64BIT_MEMORY_ADDRESS=0x2000000000 |
|||
CONFIG_F64BIT_MEMORY_LENGTH=0x800000000 |
|||
CONFIG_TARGET_E2000=y |
|||
# CONFIG_USE_SPINLOCK is not set |
|||
CONFIG_DEFAULT_DEBUG_PRINT_UART1=y |
|||
# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set |
|||
# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set |
|||
# end of Soc configuration |
|||
|
|||
# |
|||
# Board Configuration |
|||
# |
|||
CONFIG_BOARD_NAME="firefly" |
|||
# CONFIG_USE_SPI_IOPAD is not set |
|||
# CONFIG_USE_GPIO_IOPAD is not set |
|||
# CONFIG_USE_CAN_IOPAD is not set |
|||
# CONFIG_USE_QSPI_IOPAD is not set |
|||
# CONFIG_USE_PWM_IOPAD is not set |
|||
# CONFIG_USE_MIO_IOPAD is not set |
|||
# CONFIG_USE_TACHO_IOPAD is not set |
|||
# CONFIG_USE_UART_IOPAD is not set |
|||
# CONFIG_USE_THIRD_PARTY_IOPAD is not set |
|||
CONFIG_FIREFLY_DEMO_BOARD=y |
|||
|
|||
# |
|||
# IO mux configuration when board start up |
|||
# |
|||
# end of IO mux configuration when board start up |
|||
|
|||
# CONFIG_CUS_DEMO_BOARD is not set |
|||
|
|||
# |
|||
# Build project name |
|||
# |
|||
CONFIG_TARGET_NAME="ddma_spim" |
|||
# end of Build project name |
|||
# end of Board Configuration |
|||
|
|||
# |
|||
# Sdk common configuration |
|||
# |
|||
# CONFIG_LOG_VERBOS is not set |
|||
# CONFIG_LOG_DEBUG is not set |
|||
# CONFIG_LOG_INFO is not set |
|||
# CONFIG_LOG_WARN is not set |
|||
CONFIG_LOG_ERROR=y |
|||
# CONFIG_LOG_NONE is not set |
|||
CONFIG_LOG_EXTRA_INFO=y |
|||
# CONFIG_LOG_DISPALY_CORE_NUM is not set |
|||
# CONFIG_BOOTUP_DEBUG_PRINTS is not set |
|||
CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y |
|||
CONFIG_INTERRUPT_ROLE_MASTER=y |
|||
# CONFIG_INTERRUPT_ROLE_SLAVE is not set |
|||
# end of Sdk common configuration |
|||
|
|||
# |
|||
# Image information configuration |
|||
# |
|||
# CONFIG_IMAGE_INFO is not set |
|||
# end of Image information configuration |
|||
|
|||
# |
|||
# Drivers configuration |
|||
# |
|||
CONFIG_USE_IOMUX=y |
|||
# CONFIG_ENABLE_IOCTRL is not set |
|||
CONFIG_ENABLE_IOPAD=y |
|||
CONFIG_USE_SPI=y |
|||
CONFIG_USE_FSPIM=y |
|||
# CONFIG_USE_QSPI is not set |
|||
CONFIG_USE_SERIAL=y |
|||
|
|||
# |
|||
# Usart Configuration |
|||
# |
|||
CONFIG_ENABLE_Pl011_UART=y |
|||
# end of Usart Configuration |
|||
|
|||
CONFIG_USE_GPIO=y |
|||
# CONFIG_ENABLE_FGPIO is not set |
|||
# CONFIG_USE_ETH is not set |
|||
# CONFIG_USE_CAN is not set |
|||
# CONFIG_USE_I2C is not set |
|||
# CONFIG_USE_TIMER is not set |
|||
# CONFIG_USE_MIO is not set |
|||
# CONFIG_USE_SDMMC is not set |
|||
# CONFIG_USE_PCIE is not set |
|||
# CONFIG_USE_WDT is not set |
|||
CONFIG_USE_DMA=y |
|||
# CONFIG_ENABLE_FGDMA is not set |
|||
CONFIG_ENABLE_FDDMA=y |
|||
# CONFIG_USE_NAND is not set |
|||
# CONFIG_USE_RTC is not set |
|||
CONFIG_USE_SATA=y |
|||
|
|||
# |
|||
# FSATA Configuration |
|||
# |
|||
CONFIG_ENABLE_FSATA=y |
|||
# end of FSATA Configuration |
|||
|
|||
# CONFIG_USE_USB is not set |
|||
# CONFIG_USE_ADC is not set |
|||
# CONFIG_USE_PWM is not set |
|||
# CONFIG_USE_IPC is not set |
|||
# CONFIG_USE_MEDIA is not set |
|||
# CONFIG_USE_SCMI_MHU is not set |
|||
# CONFIG_USE_I2S is not set |
|||
# end of Drivers configuration |
|||
|
|||
# |
|||
# Third-party configuration |
|||
# |
|||
# CONFIG_USE_LWIP is not set |
|||
CONFIG_USE_LETTER_SHELL=y |
|||
|
|||
# |
|||
# Letter shell configuration |
|||
# |
|||
CONFIG_LS_PL011_UART=y |
|||
CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y |
|||
# CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set |
|||
# CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set |
|||
# end of Letter shell configuration |
|||
|
|||
# CONFIG_USE_AMP is not set |
|||
# CONFIG_USE_YMODEM is not set |
|||
# CONFIG_USE_SFUD is not set |
|||
# CONFIG_USE_FATFS_0_1_4 is not set |
|||
CONFIG_USE_TLSF=y |
|||
# CONFIG_USE_SPIFFS is not set |
|||
# CONFIG_USE_LITTLE_FS is not set |
|||
# CONFIG_USE_LVGL is not set |
|||
# CONFIG_USE_FREEMODBUS is not set |
|||
# CONFIG_USE_FSL_SDMMC is not set |
|||
# CONFIG_USE_MICROPYTHON is not set |
|||
# end of Third-party configuration |
|||
|
|||
# |
|||
# Build setup |
|||
# |
|||
CONFIG_CHECK_DEPS=y |
|||
CONFIG_OUTPUT_BINARY=y |
|||
|
|||
# |
|||
# Optimization options |
|||
# |
|||
# CONFIG_DEBUG_NOOPT is not set |
|||
# CONFIG_DEBUG_CUSTOMOPT is not set |
|||
CONFIG_DEBUG_FULLOPT=y |
|||
CONFIG_DEBUG_OPT_UNUSED_SECTIONS=y |
|||
CONFIG_DEBUG_LINK_MAP=y |
|||
# CONFIG_CCACHE is not set |
|||
# CONFIG_ARCH_COVERAGE is not set |
|||
# CONFIG_LTO_FULL is not set |
|||
# end of Optimization options |
|||
|
|||
# |
|||
# Debug options |
|||
# |
|||
# CONFIG_DEBUG_ENABLE_ALL_WARNING is not set |
|||
# CONFIG_WALL_WARNING_ERROR is not set |
|||
# CONFIG_STRICT_PROTOTYPES is not set |
|||
# CONFIG_DEBUG_SYMBOLS is not set |
|||
# CONFIG_FRAME_POINTER is not set |
|||
# CONFIG_OUTPUT_ASM_DIS is not set |
|||
# CONFIG_ENABLE_WSHADOW is not set |
|||
# CONFIG_ENABLE_WUNDEF is not set |
|||
CONFIG_DOWNGRADE_DIAG_WARNING=y |
|||
# end of Debug options |
|||
|
|||
# |
|||
# Lib |
|||
# |
|||
CONFIG_USE_COMPILE_CHAIN=y |
|||
# CONFIG_USE_NEWLIB is not set |
|||
# CONFIG_USE_USER_DEFINED is not set |
|||
# end of Lib |
|||
|
|||
# CONFIG_ENABLE_CXX is not set |
|||
|
|||
# |
|||
# Linker Options |
|||
# |
|||
CONFIG_DEFAULT_LINKER_SCRIPT=y |
|||
# CONFIG_USER_DEFINED_LD is not set |
|||
CONFIG_IMAGE_LOAD_ADDRESS=0x80100000 |
|||
CONFIG_IMAGE_MAX_LENGTH=0x1000000 |
|||
CONFIG_HEAP_SIZE=1 |
|||
CONFIG_SVC_STACK_SIZE=0x1000 |
|||
CONFIG_SYS_STACK_SIZE=0x1000 |
|||
CONFIG_IRQ_STACK_SIZE=0x1000 |
|||
CONFIG_ABORT_STACK_SIZE=0x1000 |
|||
CONFIG_FIQ_STACK_SIZE=0x1000 |
|||
CONFIG_UNDEF_STACK_SIZE=0x1000 |
|||
# end of Linker Options |
|||
# end of Build setup |
@ -0,0 +1,243 @@ |
|||
CONFIG_USE_BAREMETAL=y |
|||
|
|||
# |
|||
# Arch configuration |
|||
# |
|||
CONFIG_TARGET_ARMv8=y |
|||
CONFIG_ARCH_NAME="armv8" |
|||
|
|||
# |
|||
# Arm architecture configuration |
|||
# |
|||
CONFIG_ARCH_ARMV8_AARCH64=y |
|||
# CONFIG_ARCH_ARMV8_AARCH32 is not set |
|||
|
|||
# |
|||
# Compiler configuration |
|||
# |
|||
CONFIG_ARM_GCC_SELECT=y |
|||
# CONFIG_ARM_CLANG_SELECT is not set |
|||
CONFIG_TOOLCHAIN_NAME="gcc" |
|||
CONFIG_TARGET_ARMV8_AARCH64=y |
|||
CONFIG_ARCH_EXECUTION_STATE="aarch64" |
|||
CONFIG_ARM_NEON=y |
|||
CONFIG_ARM_CRC=y |
|||
CONFIG_ARM_CRYPTO=y |
|||
CONFIG_ARM_FLOAT_POINT=y |
|||
# CONFIG_GCC_CODE_MODEL_TINY is not set |
|||
CONFIG_GCC_CODE_MODEL_SMALL=y |
|||
# CONFIG_GCC_CODE_MODEL_LARGE is not set |
|||
# end of Compiler configuration |
|||
|
|||
CONFIG_USE_CACHE=y |
|||
CONFIG_USE_MMU=y |
|||
CONFIG_BOOT_WITH_FLUSH_CACHE=y |
|||
# CONFIG_MMU_DEBUG_PRINTS is not set |
|||
# end of Arm architecture configuration |
|||
# end of Arch configuration |
|||
|
|||
# |
|||
# Soc configuration |
|||
# |
|||
CONFIG_TARGET_PHYTIUMPI=y |
|||
# CONFIG_TARGET_E2000Q is not set |
|||
# CONFIG_TARGET_E2000D is not set |
|||
# CONFIG_TARGET_E2000S is not set |
|||
# CONFIG_TARGET_FT2004 is not set |
|||
# CONFIG_TARGET_D2000 is not set |
|||
CONFIG_SOC_NAME="phytiumpi" |
|||
CONFIG_SOC_CORE_NUM=4 |
|||
CONFIG_F32BIT_MEMORY_ADDRESS=0x80000000 |
|||
CONFIG_F32BIT_MEMORY_LENGTH=0x80000000 |
|||
CONFIG_F64BIT_MEMORY_ADDRESS=0x2000000000 |
|||
CONFIG_F64BIT_MEMORY_LENGTH=0x800000000 |
|||
CONFIG_TARGET_E2000=y |
|||
# CONFIG_USE_SPINLOCK is not set |
|||
CONFIG_DEFAULT_DEBUG_PRINT_UART1=y |
|||
# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set |
|||
# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set |
|||
# end of Soc configuration |
|||
|
|||
# |
|||
# Board Configuration |
|||
# |
|||
CONFIG_BOARD_NAME="firefly" |
|||
# CONFIG_USE_SPI_IOPAD is not set |
|||
# CONFIG_USE_GPIO_IOPAD is not set |
|||
# CONFIG_USE_CAN_IOPAD is not set |
|||
# CONFIG_USE_QSPI_IOPAD is not set |
|||
# CONFIG_USE_PWM_IOPAD is not set |
|||
# CONFIG_USE_MIO_IOPAD is not set |
|||
# CONFIG_USE_TACHO_IOPAD is not set |
|||
# CONFIG_USE_UART_IOPAD is not set |
|||
# CONFIG_USE_THIRD_PARTY_IOPAD is not set |
|||
CONFIG_FIREFLY_DEMO_BOARD=y |
|||
|
|||
# |
|||
# IO mux configuration when board start up |
|||
# |
|||
# end of IO mux configuration when board start up |
|||
|
|||
# CONFIG_CUS_DEMO_BOARD is not set |
|||
|
|||
# |
|||
# Build project name |
|||
# |
|||
CONFIG_TARGET_NAME="ddma_spim" |
|||
# end of Build project name |
|||
# end of Board Configuration |
|||
|
|||
# |
|||
# Sdk common configuration |
|||
# |
|||
# CONFIG_LOG_VERBOS is not set |
|||
# CONFIG_LOG_DEBUG is not set |
|||
# CONFIG_LOG_INFO is not set |
|||
# CONFIG_LOG_WARN is not set |
|||
CONFIG_LOG_ERROR=y |
|||
# CONFIG_LOG_NONE is not set |
|||
CONFIG_LOG_EXTRA_INFO=y |
|||
# CONFIG_LOG_DISPALY_CORE_NUM is not set |
|||
# CONFIG_BOOTUP_DEBUG_PRINTS is not set |
|||
CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y |
|||
CONFIG_INTERRUPT_ROLE_MASTER=y |
|||
# CONFIG_INTERRUPT_ROLE_SLAVE is not set |
|||
# end of Sdk common configuration |
|||
|
|||
# |
|||
# Image information configuration |
|||
# |
|||
# CONFIG_IMAGE_INFO is not set |
|||
# end of Image information configuration |
|||
|
|||
# |
|||
# Drivers configuration |
|||
# |
|||
CONFIG_USE_IOMUX=y |
|||
# CONFIG_ENABLE_IOCTRL is not set |
|||
CONFIG_ENABLE_IOPAD=y |
|||
CONFIG_USE_SPI=y |
|||
CONFIG_USE_FSPIM=y |
|||
# CONFIG_USE_QSPI is not set |
|||
CONFIG_USE_SERIAL=y |
|||
|
|||
# |
|||
# Usart Configuration |
|||
# |
|||
CONFIG_ENABLE_Pl011_UART=y |
|||
# end of Usart Configuration |
|||
|
|||
CONFIG_USE_GPIO=y |
|||
# CONFIG_ENABLE_FGPIO is not set |
|||
# CONFIG_USE_ETH is not set |
|||
# CONFIG_USE_CAN is not set |
|||
# CONFIG_USE_I2C is not set |
|||
# CONFIG_USE_TIMER is not set |
|||
# CONFIG_USE_MIO is not set |
|||
# CONFIG_USE_SDMMC is not set |
|||
# CONFIG_USE_PCIE is not set |
|||
# CONFIG_USE_WDT is not set |
|||
CONFIG_USE_DMA=y |
|||
# CONFIG_ENABLE_FGDMA is not set |
|||
CONFIG_ENABLE_FDDMA=y |
|||
# CONFIG_USE_NAND is not set |
|||
# CONFIG_USE_RTC is not set |
|||
CONFIG_USE_SATA=y |
|||
|
|||
# |
|||
# FSATA Configuration |
|||
# |
|||
CONFIG_ENABLE_FSATA=y |
|||
# end of FSATA Configuration |
|||
|
|||
# CONFIG_USE_USB is not set |
|||
# CONFIG_USE_ADC is not set |
|||
# CONFIG_USE_PWM is not set |
|||
# CONFIG_USE_IPC is not set |
|||
# CONFIG_USE_MEDIA is not set |
|||
# CONFIG_USE_SCMI_MHU is not set |
|||
# CONFIG_USE_I2S is not set |
|||
# end of Drivers configuration |
|||
|
|||
# |
|||
# Third-party configuration |
|||
# |
|||
# CONFIG_USE_LWIP is not set |
|||
CONFIG_USE_LETTER_SHELL=y |
|||
|
|||
# |
|||
# Letter shell configuration |
|||
# |
|||
CONFIG_LS_PL011_UART=y |
|||
CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y |
|||
# CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set |
|||
# CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set |
|||
# end of Letter shell configuration |
|||
|
|||
# CONFIG_USE_AMP is not set |
|||
# CONFIG_USE_YMODEM is not set |
|||
# CONFIG_USE_SFUD is not set |
|||
# CONFIG_USE_FATFS_0_1_4 is not set |
|||
CONFIG_USE_TLSF=y |
|||
# CONFIG_USE_SPIFFS is not set |
|||
# CONFIG_USE_LITTLE_FS is not set |
|||
# CONFIG_USE_LVGL is not set |
|||
# CONFIG_USE_FREEMODBUS is not set |
|||
# CONFIG_USE_FSL_SDMMC is not set |
|||
# CONFIG_USE_MICROPYTHON is not set |
|||
# end of Third-party configuration |
|||
|
|||
# |
|||
# Build setup |
|||
# |
|||
CONFIG_CHECK_DEPS=y |
|||
CONFIG_OUTPUT_BINARY=y |
|||
|
|||
# |
|||
# Optimization options |
|||
# |
|||
# CONFIG_DEBUG_NOOPT is not set |
|||
# CONFIG_DEBUG_CUSTOMOPT is not set |
|||
CONFIG_DEBUG_FULLOPT=y |
|||
CONFIG_DEBUG_OPT_UNUSED_SECTIONS=y |
|||
CONFIG_DEBUG_LINK_MAP=y |
|||
# CONFIG_CCACHE is not set |
|||
# CONFIG_ARCH_COVERAGE is not set |
|||
# CONFIG_LTO_FULL is not set |
|||
# end of Optimization options |
|||
|
|||
# |
|||
# Debug options |
|||
# |
|||
# CONFIG_DEBUG_ENABLE_ALL_WARNING is not set |
|||
# CONFIG_WALL_WARNING_ERROR is not set |
|||
# CONFIG_STRICT_PROTOTYPES is not set |
|||
# CONFIG_DEBUG_SYMBOLS is not set |
|||
# CONFIG_FRAME_POINTER is not set |
|||
# CONFIG_OUTPUT_ASM_DIS is not set |
|||
# CONFIG_ENABLE_WSHADOW is not set |
|||
# CONFIG_ENABLE_WUNDEF is not set |
|||
CONFIG_DOWNGRADE_DIAG_WARNING=y |
|||
# end of Debug options |
|||
|
|||
# |
|||
# Lib |
|||
# |
|||
CONFIG_USE_COMPILE_CHAIN=y |
|||
# CONFIG_USE_NEWLIB is not set |
|||
# CONFIG_USE_USER_DEFINED is not set |
|||
# end of Lib |
|||
|
|||
# CONFIG_ENABLE_CXX is not set |
|||
|
|||
# |
|||
# Linker Options |
|||
# |
|||
CONFIG_DEFAULT_LINKER_SCRIPT=y |
|||
# CONFIG_USER_DEFINED_LD is not set |
|||
CONFIG_IMAGE_LOAD_ADDRESS=0x80100000 |
|||
CONFIG_IMAGE_MAX_LENGTH=0x1000000 |
|||
CONFIG_HEAP_SIZE=1 |
|||
CONFIG_STACK_SIZE=0x400 |
|||
# end of Linker Options |
|||
# end of Build setup |
After Width: | Height: | Size: 7.5 MiB |
After Width: | Height: | Size: 5.8 MiB |
After Width: | Height: | Size: 15 KiB |
@ -0,0 +1,115 @@ |
|||
/*
|
|||
* Copyright : (C) 2024 Phytium Information Technology, Inc. |
|||
* All Rights Reserved. |
|||
* |
|||
* This program is OPEN SOURCE software: you can redistribute it and/or modify it |
|||
* under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, |
|||
* either version 1.0 of the License, or (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; |
|||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|||
* See the Phytium Public License for more details. |
|||
* |
|||
* |
|||
* FilePath: ddma_spim_example.h |
|||
* Date: 2024-01-25 14:53:41 |
|||
* LastEditTime: 2024-02-01 17:36:17 |
|||
* Description: This file is for ddma spim example main functions. |
|||
* |
|||
* Modify History: |
|||
* Ver Who Date Changes |
|||
* ----- ------ -------- -------------------------------------- |
|||
* 1.0 liyilun 2024/1/25 first release |
|||
*/ |
|||
|
|||
#ifndef DDMA_SPIM_EXAMPLE_H |
|||
#define DDMA_SPIM_EXAMPLE_H |
|||
|
|||
#include <stdio.h> |
|||
#include <string.h> |
|||
|
|||
#include "finterrupt.h" |
|||
#include "fdebug.h" |
|||
#include "fddma.h" |
|||
#include "fddma_hw.h" |
|||
|
|||
#include "fspim_hw.h" |
|||
#include "fspim.h" |
|||
#include "ferror_code.h" |
|||
#include "fparameters.h" |
|||
#include "fsleep.h" |
|||
#include "fio_mux.h" |
|||
#ifdef __cplusplus |
|||
extern "C" |
|||
{ |
|||
#endif |
|||
|
|||
|
|||
/* user-defined parameters */ |
|||
#define DDMA_CONTROLLER_ID FDDMA0_ID |
|||
|
|||
#if defined(CONFIG_E2000D_DEMO_BOARD) || defined(CONFIG_E2000Q_DEMO_BOARD) |
|||
#define TX_SLAVE_ID FDDMA0_SPIM2_TX_SLAVE_ID |
|||
#define RX_SLAVE_ID FDDMA0_SPIM2_RX_SLAVE_ID |
|||
|
|||
#define FSPIM_TEST_ID 2 /*default spim test id*/ |
|||
|
|||
#else |
|||
#define TX_SLAVE_ID FDDMA0_SPIM0_TX_SLAVE_ID |
|||
#define RX_SLAVE_ID FDDMA0_SPIM0_RX_SLAVE_ID |
|||
#define FSPIM_TEST_ID 0 /*default spim test id*/ |
|||
#endif |
|||
|
|||
#define TX_CHAN_ID 0 |
|||
#define RX_CHAN_ID 1 |
|||
|
|||
#define TRANS_DATA_SIZE 32 |
|||
#define TX_ON TRUE |
|||
#define RX_ON TRUE |
|||
|
|||
|
|||
|
|||
#define FSPIM_TX_RX_LENGTH 256 /*default spim tx and rx length */ |
|||
|
|||
#define FSPIM_TEST_BYTES_LENGTH 32 /*default spim test bytes_length*/ |
|||
#define FSPIM_DELAY_MS 100 /*timer Delay in milli-seconds */ |
|||
|
|||
#define FSPIM_DMA_ENABLE TRUE |
|||
#define FSPIM_DMA_DISABLE FALSE |
|||
|
|||
/*if bit_16 enable, the transmission data width is 16 bits, otherwise it is 8 bits*/ |
|||
#define FSPIM_BIT_16_ENABLE TRUE |
|||
#define FSPIM_BIT_16_DISABLE FALSE |
|||
|
|||
/*spim test mode enable or disable*/ |
|||
#define SPIM_TEST_MODE_ENABLE FALSE |
|||
|
|||
enum |
|||
{ |
|||
FDDMA_SPIM_OK = 0, |
|||
FDDMA_SPIM_INIT_FAILED, |
|||
FDDMA_SPIM_TEST_ABORT, |
|||
FDDMA_SPIM_TEST_FAILED, |
|||
}; |
|||
|
|||
/* entry function for spi transfer under control of DDMA example */ |
|||
int FDdmaSpimExample(void); |
|||
FError FDdmaTest(void); |
|||
|
|||
static FError FDdmaSpimInit(void); |
|||
static FError FDdmaSpimDeinit(void); |
|||
|
|||
FError FDdmaInit(void); |
|||
FError FDdmaDeinit(void); |
|||
|
|||
/*init spim function*/ |
|||
int FSpimOpsInit(u32 spi_id, boolean test_mode, boolean en_dma, boolean bit_16); |
|||
/*deinit spim function*/ |
|||
void FSpimOpsDeInit(void); |
|||
|
|||
|
|||
#ifdef __cplusplus |
|||
} |
|||
#endif |
|||
|
|||
#endif /* DDMA_SPIM_EXAMPLE_H */ |
@ -0,0 +1,48 @@ |
|||
/*
|
|||
* Copyright : (C) 2024 Phytium Information Technology, Inc. |
|||
* All Rights Reserved. |
|||
* |
|||
* This program is OPEN SOURCE software: you can redistribute it and/or modify it |
|||
* under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, |
|||
* either version 1.0 of the License, or (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; |
|||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|||
* See the Phytium Public License for more details. |
|||
* |
|||
* |
|||
* FilePath: main.c |
|||
* Date: 2023-01-25 14:53:41 |
|||
* LastEditTime: 2023-02-04 17:36:17 |
|||
* Description: This file is for ddma example main functions. |
|||
* |
|||
* Modify History: |
|||
* Ver Who Date Changes |
|||
* ----- ------ -------- -------------------------------------- |
|||
* 1.0 liyilun 2024/2/4 first release |
|||
*/ |
|||
|
|||
#include "sdkconfig.h" |
|||
#ifndef SDK_CONFIG_H__ |
|||
#warning "Please include sdkconfig.h" |
|||
#endif |
|||
|
|||
#ifdef CONFIG_USE_LETTER_SHELL |
|||
#include "shell_port.h" |
|||
#else |
|||
#include <stdio.h> |
|||
#include "ddma_spim_lookback_example.h" |
|||
#endif |
|||
|
|||
int main() |
|||
{ |
|||
|
|||
#ifdef CONFIG_USE_LETTER_SHELL |
|||
/* if shell command is enabled, register example entry as shell command */ |
|||
LSUserShellLoop(); |
|||
#else |
|||
/* if shell command is not enabled, run example one by one */ |
|||
FDdmaSpimExample(); |
|||
#endif |
|||
return 0; |
|||
} |
@ -0,0 +1,20 @@ |
|||
# 指定工程项目根目录为当前
|
|||
PROJECT_DIR = $(CURDIR) |
|||
SDK_DIR ?= $(CURDIR)/../../../.. |
|||
|
|||
USER_CSRC := main.c |
|||
USER_CSRC += $(wildcard src/*.c) |
|||
|
|||
USER_INCLUDE := $(PROJECT_DIR) \
|
|||
$(PROJECT_DIR)/inc \
|
|||
|
|||
include $(SDK_DIR)/tools/build/makeall.mk |
|||
|
|||
USR_BOOT_DIR ?= /mnt/d/tftboot |
|||
image: |
|||
make clean |
|||
make all -j |
|||
cp ./$(IMAGE_OUT_NAME).elf $(USR_BOOT_DIR)/baremetal.elf |
|||
ifdef CONFIG_OUTPUT_BINARY |
|||
cp ./$(IMAGE_OUT_NAME).bin $(USR_BOOT_DIR)/baremetal.bin |
|||
endif |
@ -0,0 +1,256 @@ |
|||
CONFIG_USE_BAREMETAL=y |
|||
|
|||
# |
|||
# Arch configuration |
|||
# |
|||
CONFIG_TARGET_ARMv8=y |
|||
CONFIG_ARCH_NAME="armv8" |
|||
|
|||
# |
|||
# Arm architecture configuration |
|||
# |
|||
# CONFIG_ARCH_ARMV8_AARCH64 is not set |
|||
CONFIG_ARCH_ARMV8_AARCH32=y |
|||
|
|||
# |
|||
# Compiler configuration |
|||
# |
|||
CONFIG_ARM_GCC_SELECT=y |
|||
# CONFIG_ARM_CLANG_SELECT is not set |
|||
CONFIG_TOOLCHAIN_NAME="gcc" |
|||
CONFIG_TARGET_ARMV8_AARCH32=y |
|||
CONFIG_ARCH_EXECUTION_STATE="aarch32" |
|||
|
|||
# |
|||
# Fpu configuration |
|||
# |
|||
CONFIG_CRYPTO_NEON_FP_ARMV8=y |
|||
# CONFIG_VFPV4 is not set |
|||
# CONFIG_VFPV4_D16 is not set |
|||
# CONFIG_VFPV3 is not set |
|||
# CONFIG_VFPV3_D16 is not set |
|||
CONFIG_ARM_MFPU="crypto-neon-fp-armv8" |
|||
CONFIG_MFLOAT_ABI_HARD=y |
|||
# CONFIG_MFLOAT_ABI_SOFTFP is not set |
|||
CONFIG_ARM_MFLOAT_ABI="hard" |
|||
# end of Fpu configuration |
|||
# end of Compiler configuration |
|||
|
|||
CONFIG_USE_CACHE=y |
|||
CONFIG_USE_MMU=y |
|||
CONFIG_USE_AARCH64_L1_TO_AARCH32=y |
|||
# end of Arm architecture configuration |
|||
# end of Arch configuration |
|||
|
|||
# |
|||
# Soc configuration |
|||
# |
|||
# CONFIG_TARGET_PHYTIUMPI is not set |
|||
# CONFIG_TARGET_E2000Q is not set |
|||
CONFIG_TARGET_E2000D=y |
|||
# CONFIG_TARGET_E2000S is not set |
|||
# CONFIG_TARGET_FT2004 is not set |
|||
# CONFIG_TARGET_D2000 is not set |
|||
CONFIG_SOC_NAME="e2000" |
|||
CONFIG_TARGET_TYPE_NAME="d" |
|||
CONFIG_SOC_CORE_NUM=2 |
|||
CONFIG_F32BIT_MEMORY_ADDRESS=0x80000000 |
|||
CONFIG_F32BIT_MEMORY_LENGTH=0x80000000 |
|||
CONFIG_F64BIT_MEMORY_ADDRESS=0x2000000000 |
|||
CONFIG_F64BIT_MEMORY_LENGTH=0x800000000 |
|||
CONFIG_TARGET_E2000=y |
|||
# CONFIG_USE_SPINLOCK is not set |
|||
CONFIG_DEFAULT_DEBUG_PRINT_UART1=y |
|||
# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set |
|||
# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set |
|||
# end of Soc configuration |
|||
|
|||
# |
|||
# Board Configuration |
|||
# |
|||
CONFIG_E2000D_DEMO_BOARD=y |
|||
CONFIG_BOARD_NAME="demo" |
|||
|
|||
# |
|||
# IO mux configuration when board start up |
|||
# |
|||
# CONFIG_USE_SPI_IOPAD is not set |
|||
# CONFIG_USE_GPIO_IOPAD is not set |
|||
# CONFIG_USE_CAN_IOPAD is not set |
|||
# CONFIG_USE_QSPI_IOPAD is not set |
|||
# CONFIG_USE_PWM_IOPAD is not set |
|||
# CONFIG_USE_ADC_IOPAD is not set |
|||
# CONFIG_USE_MIO_IOPAD is not set |
|||
# CONFIG_USE_TACHO_IOPAD is not set |
|||
# CONFIG_USE_UART_IOPAD is not set |
|||
# CONFIG_USE_THIRD_PARTY_IOPAD is not set |
|||
# end of IO mux configuration when board start up |
|||
|
|||
# CONFIG_CUS_DEMO_BOARD is not set |
|||
|
|||
# |
|||
# Build project name |
|||
# |
|||
CONFIG_TARGET_NAME="ddma_spim" |
|||
# end of Build project name |
|||
# end of Board Configuration |
|||
|
|||
# |
|||
# Sdk common configuration |
|||
# |
|||
# CONFIG_LOG_VERBOS is not set |
|||
# CONFIG_LOG_DEBUG is not set |
|||
# CONFIG_LOG_INFO is not set |
|||
# CONFIG_LOG_WARN is not set |
|||
CONFIG_LOG_ERROR=y |
|||
# CONFIG_LOG_NONE is not set |
|||
CONFIG_LOG_EXTRA_INFO=y |
|||
# CONFIG_LOG_DISPALY_CORE_NUM is not set |
|||
# CONFIG_BOOTUP_DEBUG_PRINTS is not set |
|||
CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y |
|||
CONFIG_INTERRUPT_ROLE_MASTER=y |
|||
# CONFIG_INTERRUPT_ROLE_SLAVE is not set |
|||
# end of Sdk common configuration |
|||
|
|||
# |
|||
# Image information configuration |
|||
# |
|||
# CONFIG_IMAGE_INFO is not set |
|||
# end of Image information configuration |
|||
|
|||
# |
|||
# Drivers configuration |
|||
# |
|||
CONFIG_USE_IOMUX=y |
|||
# CONFIG_ENABLE_IOCTRL is not set |
|||
CONFIG_ENABLE_IOPAD=y |
|||
CONFIG_USE_SPI=y |
|||
CONFIG_USE_FSPIM=y |
|||
# CONFIG_USE_QSPI is not set |
|||
CONFIG_USE_SERIAL=y |
|||
|
|||
# |
|||
# Usart Configuration |
|||
# |
|||
CONFIG_ENABLE_Pl011_UART=y |
|||
# end of Usart Configuration |
|||
|
|||
CONFIG_USE_GPIO=y |
|||
# CONFIG_ENABLE_FGPIO is not set |
|||
# CONFIG_USE_ETH is not set |
|||
# CONFIG_USE_CAN is not set |
|||
# CONFIG_USE_I2C is not set |
|||
# CONFIG_USE_TIMER is not set |
|||
# CONFIG_USE_MIO is not set |
|||
# CONFIG_USE_SDMMC is not set |
|||
# CONFIG_USE_PCIE is not set |
|||
# CONFIG_USE_WDT is not set |
|||
CONFIG_USE_DMA=y |
|||
# CONFIG_ENABLE_FGDMA is not set |
|||
CONFIG_ENABLE_FDDMA=y |
|||
# CONFIG_USE_NAND is not set |
|||
# CONFIG_USE_RTC is not set |
|||
CONFIG_USE_SATA=y |
|||
|
|||
# |
|||
# FSATA Configuration |
|||
# |
|||
CONFIG_ENABLE_FSATA=y |
|||
# end of FSATA Configuration |
|||
|
|||
# CONFIG_USE_USB is not set |
|||
# CONFIG_USE_ADC is not set |
|||
# CONFIG_USE_PWM is not set |
|||
# CONFIG_USE_IPC is not set |
|||
# CONFIG_USE_MEDIA is not set |
|||
# CONFIG_USE_SCMI_MHU is not set |
|||
# CONFIG_USE_I2S is not set |
|||
# end of Drivers configuration |
|||
|
|||
# |
|||
# Third-party configuration |
|||
# |
|||
# CONFIG_USE_LWIP is not set |
|||
CONFIG_USE_LETTER_SHELL=y |
|||
|
|||
# |
|||
# Letter shell configuration |
|||
# |
|||
CONFIG_LS_PL011_UART=y |
|||
CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y |
|||
# CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set |
|||
# CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set |
|||
# end of Letter shell configuration |
|||
|
|||
# CONFIG_USE_AMP is not set |
|||
# CONFIG_USE_YMODEM is not set |
|||
# CONFIG_USE_SFUD is not set |
|||
# CONFIG_USE_FATFS_0_1_4 is not set |
|||
CONFIG_USE_TLSF=y |
|||
# CONFIG_USE_SPIFFS is not set |
|||
# CONFIG_USE_LITTLE_FS is not set |
|||
# CONFIG_USE_LVGL is not set |
|||
# CONFIG_USE_FREEMODBUS is not set |
|||
# CONFIG_USE_FSL_SDMMC is not set |
|||
# CONFIG_USE_MICROPYTHON is not set |
|||
# end of Third-party configuration |
|||
|
|||
# |
|||
# Build setup |
|||
# |
|||
CONFIG_CHECK_DEPS=y |
|||
CONFIG_OUTPUT_BINARY=y |
|||
|
|||
# |
|||
# Optimization options |
|||
# |
|||
# CONFIG_DEBUG_NOOPT is not set |
|||
# CONFIG_DEBUG_CUSTOMOPT is not set |
|||
CONFIG_DEBUG_FULLOPT=y |
|||
CONFIG_DEBUG_OPT_UNUSED_SECTIONS=y |
|||
CONFIG_DEBUG_LINK_MAP=y |
|||
# CONFIG_CCACHE is not set |
|||
# CONFIG_ARCH_COVERAGE is not set |
|||
# CONFIG_LTO_FULL is not set |
|||
# end of Optimization options |
|||
|
|||
# |
|||
# Debug options |
|||
# |
|||
# CONFIG_DEBUG_ENABLE_ALL_WARNING is not set |
|||
# CONFIG_WALL_WARNING_ERROR is not set |
|||
# CONFIG_STRICT_PROTOTYPES is not set |
|||
# CONFIG_DEBUG_SYMBOLS is not set |
|||
# CONFIG_FRAME_POINTER is not set |
|||
# CONFIG_OUTPUT_ASM_DIS is not set |
|||
# CONFIG_ENABLE_WSHADOW is not set |
|||
# CONFIG_ENABLE_WUNDEF is not set |
|||
CONFIG_DOWNGRADE_DIAG_WARNING=y |
|||
# end of Debug options |
|||
|
|||
# |
|||
# Lib |
|||
# |
|||
CONFIG_USE_COMPILE_CHAIN=y |
|||
# CONFIG_USE_NEWLIB is not set |
|||
# CONFIG_USE_USER_DEFINED is not set |
|||
# end of Lib |
|||
|
|||
# CONFIG_ENABLE_CXX is not set |
|||
|
|||
# |
|||
# Linker Options |
|||
# |
|||
CONFIG_DEFAULT_LINKER_SCRIPT=y |
|||
# CONFIG_USER_DEFINED_LD is not set |
|||
CONFIG_IMAGE_LOAD_ADDRESS=0x80100000 |
|||
CONFIG_IMAGE_MAX_LENGTH=0x1000000 |
|||
CONFIG_HEAP_SIZE=1 |
|||
CONFIG_SVC_STACK_SIZE=0x1000 |
|||
CONFIG_SYS_STACK_SIZE=0x1000 |
|||
CONFIG_IRQ_STACK_SIZE=0x1000 |
|||
CONFIG_ABORT_STACK_SIZE=0x1000 |
|||
CONFIG_FIQ_STACK_SIZE=0x1000 |
|||
CONFIG_UNDEF_STACK_SIZE=0x1000 |
|||
# end of Linker Options |
|||
# end of Build setup |
@ -0,0 +1,235 @@ |
|||
#ifndef SDK_CONFIG_H__ |
|||
#define SDK_CONFIG_H__ |
|||
|
|||
#define CONFIG_USE_BAREMETAL |
|||
|
|||
/* Arch configuration */ |
|||
|
|||
#define CONFIG_TARGET_ARMv8 |
|||
#define CONFIG_ARCH_NAME "armv8" |
|||
|
|||
/* Arm architecture configuration */ |
|||
|
|||
/* CONFIG_ARCH_ARMV8_AARCH64 is not set */ |
|||
#define CONFIG_ARCH_ARMV8_AARCH32 |
|||
|
|||
/* Compiler configuration */ |
|||
|
|||
#define CONFIG_ARM_GCC_SELECT |
|||
/* CONFIG_ARM_CLANG_SELECT is not set */ |
|||
#define CONFIG_TOOLCHAIN_NAME "gcc" |
|||
#define CONFIG_TARGET_ARMV8_AARCH32 |
|||
#define CONFIG_ARCH_EXECUTION_STATE "aarch32" |
|||
|
|||
/* Fpu configuration */ |
|||
|
|||
#define CONFIG_CRYPTO_NEON_FP_ARMV8 |
|||
/* CONFIG_VFPV4 is not set */ |
|||
/* CONFIG_VFPV4_D16 is not set */ |
|||
/* CONFIG_VFPV3 is not set */ |
|||
/* CONFIG_VFPV3_D16 is not set */ |
|||
#define CONFIG_ARM_MFPU "crypto-neon-fp-armv8" |
|||
#define CONFIG_MFLOAT_ABI_HARD |
|||
/* CONFIG_MFLOAT_ABI_SOFTFP is not set */ |
|||
#define CONFIG_ARM_MFLOAT_ABI "hard" |
|||
/* end of Fpu configuration */ |
|||
/* end of Compiler configuration */ |
|||
#define CONFIG_USE_CACHE |
|||
#define CONFIG_USE_MMU |
|||
#define CONFIG_USE_AARCH64_L1_TO_AARCH32 |
|||
/* end of Arm architecture configuration */ |
|||
/* end of Arch configuration */ |
|||
|
|||
/* Soc configuration */ |
|||
|
|||
/* CONFIG_TARGET_PHYTIUMPI is not set */ |
|||
/* CONFIG_TARGET_E2000Q is not set */ |
|||
#define CONFIG_TARGET_E2000D |
|||
/* CONFIG_TARGET_E2000S is not set */ |
|||
/* CONFIG_TARGET_FT2004 is not set */ |
|||
/* CONFIG_TARGET_D2000 is not set */ |
|||
#define CONFIG_SOC_NAME "e2000" |
|||
#define CONFIG_TARGET_TYPE_NAME "d" |
|||
#define CONFIG_SOC_CORE_NUM 2 |
|||
#define CONFIG_F32BIT_MEMORY_ADDRESS 0x80000000 |
|||
#define CONFIG_F32BIT_MEMORY_LENGTH 0x80000000 |
|||
#define CONFIG_F64BIT_MEMORY_ADDRESS 0x2000000000 |
|||
#define CONFIG_F64BIT_MEMORY_LENGTH 0x800000000 |
|||
#define CONFIG_TARGET_E2000 |
|||
/* CONFIG_USE_SPINLOCK is not set */ |
|||
#define CONFIG_DEFAULT_DEBUG_PRINT_UART1 |
|||
/* CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set */ |
|||
/* CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set */ |
|||
/* end of Soc configuration */ |
|||
|
|||
/* Board Configuration */ |
|||
|
|||
#define CONFIG_E2000D_DEMO_BOARD |
|||
#define CONFIG_BOARD_NAME "demo" |
|||
|
|||
/* IO mux configuration when board start up */ |
|||
|
|||
/* CONFIG_USE_SPI_IOPAD is not set */ |
|||
/* CONFIG_USE_GPIO_IOPAD is not set */ |
|||
/* CONFIG_USE_CAN_IOPAD is not set */ |
|||
/* CONFIG_USE_QSPI_IOPAD is not set */ |
|||
/* CONFIG_USE_PWM_IOPAD is not set */ |
|||
/* CONFIG_USE_ADC_IOPAD is not set */ |
|||
/* CONFIG_USE_MIO_IOPAD is not set */ |
|||
/* CONFIG_USE_TACHO_IOPAD is not set */ |
|||
/* CONFIG_USE_UART_IOPAD is not set */ |
|||
/* CONFIG_USE_THIRD_PARTY_IOPAD is not set */ |
|||
/* end of IO mux configuration when board start up */ |
|||
/* CONFIG_CUS_DEMO_BOARD is not set */ |
|||
|
|||
/* Build project name */ |
|||
|
|||
#define CONFIG_TARGET_NAME "ddma_spim" |
|||
/* end of Build project name */ |
|||
/* end of Board Configuration */ |
|||
|
|||
/* Sdk common configuration */ |
|||
|
|||
/* CONFIG_LOG_VERBOS is not set */ |
|||
/* CONFIG_LOG_DEBUG is not set */ |
|||
/* CONFIG_LOG_INFO is not set */ |
|||
/* CONFIG_LOG_WARN is not set */ |
|||
#define CONFIG_LOG_ERROR |
|||
/* CONFIG_LOG_NONE is not set */ |
|||
#define CONFIG_LOG_EXTRA_INFO |
|||
/* CONFIG_LOG_DISPALY_CORE_NUM is not set */ |
|||
/* CONFIG_BOOTUP_DEBUG_PRINTS is not set */ |
|||
#define CONFIG_USE_DEFAULT_INTERRUPT_CONFIG |
|||
#define CONFIG_INTERRUPT_ROLE_MASTER |
|||
/* CONFIG_INTERRUPT_ROLE_SLAVE is not set */ |
|||
/* end of Sdk common configuration */ |
|||
|
|||
/* Image information configuration */ |
|||
|
|||
/* CONFIG_IMAGE_INFO is not set */ |
|||
/* end of Image information configuration */ |
|||
|
|||
/* Drivers configuration */ |
|||
|
|||
#define CONFIG_USE_IOMUX |
|||
/* CONFIG_ENABLE_IOCTRL is not set */ |
|||
#define CONFIG_ENABLE_IOPAD |
|||
#define CONFIG_USE_SPI |
|||
#define CONFIG_USE_FSPIM |
|||
/* CONFIG_USE_QSPI is not set */ |
|||
#define CONFIG_USE_SERIAL |
|||
|
|||
/* Usart Configuration */ |
|||
|
|||
#define CONFIG_ENABLE_Pl011_UART |
|||
/* end of Usart Configuration */ |
|||
#define CONFIG_USE_GPIO |
|||
/* CONFIG_ENABLE_FGPIO is not set */ |
|||
/* CONFIG_USE_ETH is not set */ |
|||
/* CONFIG_USE_CAN is not set */ |
|||
/* CONFIG_USE_I2C is not set */ |
|||
/* CONFIG_USE_TIMER is not set */ |
|||
/* CONFIG_USE_MIO is not set */ |
|||
/* CONFIG_USE_SDMMC is not set */ |
|||
/* CONFIG_USE_PCIE is not set */ |
|||
/* CONFIG_USE_WDT is not set */ |
|||
#define CONFIG_USE_DMA |
|||
/* CONFIG_ENABLE_FGDMA is not set */ |
|||
#define CONFIG_ENABLE_FDDMA |
|||
/* CONFIG_USE_NAND is not set */ |
|||
/* CONFIG_USE_RTC is not set */ |
|||
#define CONFIG_USE_SATA |
|||
|
|||
/* FSATA Configuration */ |
|||
|
|||
#define CONFIG_ENABLE_FSATA |
|||
/* end of FSATA Configuration */ |
|||
/* CONFIG_USE_USB is not set */ |
|||
/* CONFIG_USE_ADC is not set */ |
|||
/* CONFIG_USE_PWM is not set */ |
|||
/* CONFIG_USE_IPC is not set */ |
|||
/* CONFIG_USE_MEDIA is not set */ |
|||
/* CONFIG_USE_SCMI_MHU is not set */ |
|||
/* CONFIG_USE_I2S is not set */ |
|||
/* end of Drivers configuration */ |
|||
|
|||
/* Third-party configuration */ |
|||
|
|||
/* CONFIG_USE_LWIP is not set */ |
|||
#define CONFIG_USE_LETTER_SHELL |
|||
|
|||
/* Letter shell configuration */ |
|||
|
|||
#define CONFIG_LS_PL011_UART |
|||
#define CONFIG_DEFAULT_LETTER_SHELL_USE_UART1 |
|||
/* CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set */ |
|||
/* CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set */ |
|||
/* end of Letter shell configuration */ |
|||
/* CONFIG_USE_AMP is not set */ |
|||
/* CONFIG_USE_YMODEM is not set */ |
|||
/* CONFIG_USE_SFUD is not set */ |
|||
/* CONFIG_USE_FATFS_0_1_4 is not set */ |
|||
#define CONFIG_USE_TLSF |
|||
/* CONFIG_USE_SPIFFS is not set */ |
|||
/* CONFIG_USE_LITTLE_FS is not set */ |
|||
/* CONFIG_USE_LVGL is not set */ |
|||
/* CONFIG_USE_FREEMODBUS is not set */ |
|||
/* CONFIG_USE_FSL_SDMMC is not set */ |
|||
/* CONFIG_USE_MICROPYTHON is not set */ |
|||
/* end of Third-party configuration */ |
|||
|
|||
/* Build setup */ |
|||
|
|||
#define CONFIG_CHECK_DEPS |
|||
#define CONFIG_OUTPUT_BINARY |
|||
|
|||
/* Optimization options */ |
|||
|
|||
/* CONFIG_DEBUG_NOOPT is not set */ |
|||
/* CONFIG_DEBUG_CUSTOMOPT is not set */ |
|||
#define CONFIG_DEBUG_FULLOPT |
|||
#define CONFIG_DEBUG_OPT_UNUSED_SECTIONS |
|||
#define CONFIG_DEBUG_LINK_MAP |
|||
/* CONFIG_CCACHE is not set */ |
|||
/* CONFIG_ARCH_COVERAGE is not set */ |
|||
/* CONFIG_LTO_FULL is not set */ |
|||
/* end of Optimization options */ |
|||
|
|||
/* Debug options */ |
|||
|
|||
/* CONFIG_DEBUG_ENABLE_ALL_WARNING is not set */ |
|||
/* CONFIG_WALL_WARNING_ERROR is not set */ |
|||
/* CONFIG_STRICT_PROTOTYPES is not set */ |
|||
/* CONFIG_DEBUG_SYMBOLS is not set */ |
|||
/* CONFIG_FRAME_POINTER is not set */ |
|||
/* CONFIG_OUTPUT_ASM_DIS is not set */ |
|||
/* CONFIG_ENABLE_WSHADOW is not set */ |
|||
/* CONFIG_ENABLE_WUNDEF is not set */ |
|||
#define CONFIG_DOWNGRADE_DIAG_WARNING |
|||
/* end of Debug options */ |
|||
|
|||
/* Lib */ |
|||
|
|||
#define CONFIG_USE_COMPILE_CHAIN |
|||
/* CONFIG_USE_NEWLIB is not set */ |
|||
/* CONFIG_USE_USER_DEFINED is not set */ |
|||
/* end of Lib */ |
|||
/* CONFIG_ENABLE_CXX is not set */ |
|||
|
|||
/* Linker Options */ |
|||
|
|||
#define CONFIG_DEFAULT_LINKER_SCRIPT |
|||
/* CONFIG_USER_DEFINED_LD is not set */ |
|||
#define CONFIG_IMAGE_LOAD_ADDRESS 0x80100000 |
|||
#define CONFIG_IMAGE_MAX_LENGTH 0x1000000 |
|||
#define CONFIG_HEAP_SIZE 1 |
|||
#define CONFIG_SVC_STACK_SIZE 0x1000 |
|||
#define CONFIG_SYS_STACK_SIZE 0x1000 |
|||
#define CONFIG_IRQ_STACK_SIZE 0x1000 |
|||
#define CONFIG_ABORT_STACK_SIZE 0x1000 |
|||
#define CONFIG_FIQ_STACK_SIZE 0x1000 |
|||
#define CONFIG_UNDEF_STACK_SIZE 0x1000 |
|||
/* end of Linker Options */ |
|||
/* end of Build setup */ |
|||
|
|||
#endif |
@ -0,0 +1,73 @@ |
|||
/*
|
|||
* Copyright : (C) 2023 Phytium Information Technology, Inc. |
|||
* All Rights Reserved. |
|||
* |
|||
* This program is OPEN SOURCE software: you can redistribute it and/or modify it |
|||
* under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, |
|||
* either version 1.0 of the License, or (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; |
|||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|||
* See the Phytium Public License for more details. |
|||
* |
|||
* |
|||
* FilePath: cmd_ddma.c |
|||
* Date: 2024-01-25 14:53:41 |
|||
* LastEditTime: 2024-02-01 17:36:17 |
|||
* Description: This file is for ddma example cmd catalogue |
|||
* |
|||
* Modify History: |
|||
* Ver Who Date Changes |
|||
* ----- ------ -------- -------------------------------------- |
|||
* 1.0 liyilun 2024/01/25 first release |
|||
*/ |
|||
|
|||
#include<stdio.h> |
|||
#include <string.h> |
|||
|
|||
#include "sdkconfig.h" |
|||
#ifndef SDK_CONFIG_H__ |
|||
#warning "Please include sdkconfig.h" |
|||
#endif |
|||
|
|||
#ifdef CONFIG_USE_LETTER_SHELL |
|||
#include "shell.h" |
|||
#include "strto.h" |
|||
|
|||
#include <ddma_spim_lookback_example.h> |
|||
|
|||
|
|||
/* usage info function for ddma_spim example */ |
|||
static void FDdmaSpimExampleUsage(void) |
|||
{ |
|||
printf("Usage:\r\n"); |
|||
printf("ddma spim_lookback example\r\n"); |
|||
printf("-- run ddma spim loopback mode example at controller\r\n"); |
|||
|
|||
} |
|||
|
|||
/* entry function for spim example */ |
|||
static int FDdmaSpimExampleEntry(int argc, char *argv[]) |
|||
{ |
|||
int ret = 0; |
|||
|
|||
/* check input args of example, exit if invaild */ |
|||
if (argc < 2) |
|||
{ |
|||
FDdmaSpimExampleUsage(); |
|||
return -1; |
|||
} |
|||
|
|||
/* parser example input args and run example */ |
|||
if (!strcmp(argv[1], "spim_lookback")) |
|||
{ |
|||
ret = FDdmaSpimExample(); |
|||
} |
|||
|
|||
|
|||
return ret; |
|||
} |
|||
|
|||
/* register command for ddma spim example */ |
|||
SHELL_EXPORT_CMD(SHELL_CMD_TYPE(SHELL_TYPE_CMD_MAIN), ddma, FDdmaSpimExampleEntry, ddma example); |
|||
#endif |
@ -0,0 +1,364 @@ |
|||
/*
|
|||
* Copyright : (C) 2024 Phytium Information Technology, Inc. |
|||
* All Rights Reserved. |
|||
* |
|||
* This program is OPEN SOURCE software: you can redistribute it and/or modify it |
|||
* under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, |
|||
* either version 1.0 of the License, or (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; |
|||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|||
* See the Phytium Public License for more details. |
|||
* |
|||
* |
|||
* FilePath: ddma_spim_lookback_example.c |
|||
* Date: 2024-01-25 14:53:41 |
|||
* LastEditTime: 2024-02-04 17:36:17 |
|||
* Description: This file is for ddma spim lookback example function implmentation |
|||
* |
|||
* Modify History: |
|||
* Ver Who Date Changes |
|||
* ----- ------ -------- -------------------------------------- |
|||
* 1.0 liyilun 2024/2/4 first release |
|||
*/ |
|||
|
|||
#include "sdkconfig.h" |
|||
#ifndef SDK_CONFIG_H__ |
|||
#warning "Please include sdkconfig.h" |
|||
#endif |
|||
|
|||
#include "ddma_spim_lookback_example.h" |
|||
|
|||
|
|||
/* FT-defined print form */ |
|||
#define FDDMA_SPIM_DEBUG_TAG "FDDMA_SPIM_EXAMPLE" |
|||
#define FDDMA_SPIM_ERROR(format, ...) FT_DEBUG_PRINT_E(FDDMA_SPIM_DEBUG_TAG, format, ##__VA_ARGS__) |
|||
#define FDDMA_SPIM_WARRN(format, ...) FT_DEBUG_PRINT_W(FDDMA_SPIM_DEBUG_TAG, format, ##__VA_ARGS__) |
|||
#define FDDMA_SPIM_INFO(format, ...) FT_DEBUG_PRINT_I(FDDMA_SPIM_DEBUG_TAG, format, ##__VA_ARGS__) |
|||
#define FDDMA_SPIM_DEBUG(format, ...) FT_DEBUG_PRINT_D(FDDMA_SPIM_DEBUG_TAG, format, ##__VA_ARGS__) |
|||
|
|||
static FSpim spim_instance; |
|||
static FDdma ddma_instance; |
|||
static FDdmaConfig ddma_config; |
|||
static FSpimConfig spim_config; |
|||
static u32 spi_id = FSPIM_TEST_ID; |
|||
static FDdmaChanConfig tx_chan_config; |
|||
static FDdmaChanConfig rx_chan_config; |
|||
|
|||
|
|||
static u32 tx_buff[TRANS_DATA_SIZE] __attribute__((aligned(FDDMA_DDR_ADDR_ALIGMENT))) = {0}; |
|||
static u32 rx_buff[TRANS_DATA_SIZE] __attribute__((aligned(FDDMA_DDR_ADDR_ALIGMENT))) = {0}; |
|||
|
|||
static volatile boolean rx_dma_done = FALSE; |
|||
static volatile boolean tx_dma_done = FALSE; |
|||
|
|||
|
|||
static void FDdmaSpimTxDMADone(void) |
|||
{ |
|||
printf("********tx done********\r\n"); |
|||
tx_dma_done = TRUE; |
|||
return; |
|||
} |
|||
|
|||
static void FDdmaSpimRxDMADone(void) |
|||
{ |
|||
printf("********rx done********\r\n"); |
|||
rx_dma_done = TRUE; |
|||
return; |
|||
} |
|||
|
|||
|
|||
void FSpimOpsDeInit(void) |
|||
{ |
|||
FSpim *spim_p = &spim_instance; |
|||
/*interrupt deinit*/ |
|||
InterruptMask(spim_p->config.irq_num); |
|||
/*spim deinit*/ |
|||
FSpimDeInitialize(spim_p); |
|||
/*deinit iopad*/ |
|||
FIOMuxDeInit(); |
|||
return; |
|||
} |
|||
|
|||
int FSpimOpsInit(u32 spi_id, boolean test_mode, boolean en_dma, boolean bit_16) |
|||
{ |
|||
FSpim *spim_p = &spim_instance; |
|||
FError ret = FSPIM_SUCCESS; |
|||
/*deinit the spi first*/ |
|||
FSpimOpsDeInit(); |
|||
if (spim_p->is_ready == FT_COMPONENT_IS_READY) |
|||
{ |
|||
FDDMA_SPIM_ERROR("Spim init error: spim component is ready."); |
|||
return FSPIM_ERR_BUS_BUSY; |
|||
} |
|||
|
|||
if (spi_id >= FSPI_NUM) |
|||
{ |
|||
FDDMA_SPIM_ERROR("Spim init error: invalid parameter."); |
|||
return FSPIM_ERR_INVAL_PARAM; |
|||
} |
|||
|
|||
spim_config = *FSpimLookupConfig(spi_id); |
|||
spim_config.slave_dev_id = FSPIM_SLAVE_DEV_0; |
|||
spim_config.cpha = FSPIM_CPHA_2_EDGE; |
|||
spim_config.cpol = FSPIM_CPOL_LOW; |
|||
spim_config.n_bytes = bit_16 ? FSPIM_2_BYTE : FSPIM_1_BYTE; |
|||
spim_config.en_test = test_mode; |
|||
spim_config.en_dma = en_dma; |
|||
|
|||
ret = FSpimCfgInitialize(spim_p, &spim_config); |
|||
if(ret != FSPIM_SUCCESS) |
|||
{ |
|||
FDDMA_SPIM_ERROR("Spim init error: spim init configuration failed."); |
|||
} |
|||
|
|||
return ret; |
|||
|
|||
} |
|||
|
|||
FError FDdmaDeinit(void) |
|||
{ |
|||
FError ret; |
|||
InterruptMask(ddma_instance.config.irq_num); |
|||
|
|||
FDdmaStop(&ddma_instance); |
|||
|
|||
ret = FDdmaChanDeactive(&ddma_instance, TX_CHAN_ID); |
|||
ret = FDdmaChanDeconfigure(&ddma_instance, TX_CHAN_ID); |
|||
if (FDDMA_SUCCESS != ret) |
|||
{ |
|||
FDDMA_SPIM_ERROR("TX channel revoke failed: 0x%x", ret); |
|||
return FDDMA_ERR_IS_USED; |
|||
} |
|||
|
|||
ret = FDdmaChanDeactive(&ddma_instance, RX_CHAN_ID); |
|||
ret = FDdmaChanDeconfigure(&ddma_instance, RX_CHAN_ID); |
|||
if (FDDMA_SUCCESS != ret) |
|||
{ |
|||
FDDMA_SPIM_ERROR("RX channel revoke failed: 0x%x", ret); |
|||
return FDDMA_ERR_IS_USED; |
|||
} |
|||
|
|||
FDdmaDeInitialize(&ddma_instance); |
|||
|
|||
return FT_SUCCESS; |
|||
} |
|||
|
|||
static FError FDdmaSpimDeinit(void) |
|||
{ |
|||
FError ret=FT_SUCCESS; |
|||
FSpimOpsDeInit(); |
|||
|
|||
ret = FDdmaDeinit(); |
|||
if(FDDMA_SUCCESS != ret) |
|||
{ |
|||
FDDMA_SPIM_ERROR("Deinit ddma-%d failed, err: 0x%x", DDMA_CONTROLLER_ID, ret); |
|||
return ERR_GENERAL; |
|||
} |
|||
return ret; |
|||
|
|||
} |
|||
|
|||
FError FDdmaInit(void) |
|||
{ |
|||
FError ret; |
|||
FSpim *spim_p = &spim_instance; |
|||
ddma_config = *FDdmaLookupConfig(DDMA_CONTROLLER_ID); |
|||
ddma_config.irq_prority = IRQ_PRIORITY_VALUE_0; |
|||
ret = FDdmaCfgInitialize(&ddma_instance, &ddma_config); |
|||
if(FDDMA_SUCCESS != ret) |
|||
{ |
|||
FDDMA_SPIM_ERROR("Ddma init error: Init ddma-%d configuration failed.", DDMA_CONTROLLER_ID); |
|||
return ret; |
|||
} |
|||
|
|||
tx_chan_config.slave_id = TX_SLAVE_ID; |
|||
tx_chan_config.ddr_addr = (uintptr)tx_buff; |
|||
tx_chan_config.dev_addr = spim_p->config.base_addr + FSPIM_DR_OFFSET; |
|||
tx_chan_config.req_mode = FDDMA_CHAN_REQ_TX; |
|||
tx_chan_config.timeout = 0xffff; |
|||
tx_chan_config.trans_len = TRANS_DATA_SIZE*4; |
|||
|
|||
printf("tx channel: %d, slave id: %d, ddr: 0x%x, dev: 0x%x, req mode: %s, trans len: %d \r\n", |
|||
TX_CHAN_ID, |
|||
tx_chan_config.slave_id, |
|||
tx_chan_config.ddr_addr, |
|||
tx_chan_config.dev_addr, |
|||
(FDDMA_CHAN_REQ_TX == tx_chan_config.req_mode) ? "mem => dev" : "dev => mem", |
|||
tx_chan_config.trans_len); |
|||
|
|||
ret = FDdmaChanConfigure(&ddma_instance, TX_CHAN_ID, &tx_chan_config); |
|||
if (FDDMA_SUCCESS != ret) |
|||
{ |
|||
FDDMA_SPIM_ERROR("Ddma init error: tx channel allocate failed: 0x%x.", ret); |
|||
return ret; |
|||
} |
|||
|
|||
rx_chan_config.slave_id =RX_SLAVE_ID; |
|||
rx_chan_config.ddr_addr = (uintptr)rx_buff; |
|||
rx_chan_config.dev_addr = spim_p->config.base_addr + FSPIM_DR_OFFSET; |
|||
rx_chan_config.req_mode = FDDMA_CHAN_REQ_RX; |
|||
rx_chan_config.timeout = 0xffff; |
|||
rx_chan_config.trans_len = TRANS_DATA_SIZE*4; |
|||
|
|||
ret = FDdmaChanConfigure(&ddma_instance, RX_CHAN_ID, &rx_chan_config); |
|||
if (FDDMA_SUCCESS != ret) |
|||
{ |
|||
FDDMA_SPIM_ERROR("Ddma init error: rx channel allocate failed: 0x%x.", ret); |
|||
return ret; |
|||
} |
|||
|
|||
tx_dma_done = FALSE; |
|||
rx_dma_done = FALSE; |
|||
|
|||
|
|||
FDdmaRegisterChanEvtHandler(&ddma_instance, TX_CHAN_ID, FDDMA_CHAN_EVT_REQ_DONE, (void *)FDdmaSpimTxDMADone, NULL); |
|||
FDdmaRegisterChanEvtHandler(&ddma_instance, RX_CHAN_ID, FDDMA_CHAN_EVT_REQ_DONE, (void *)FDdmaSpimRxDMADone, NULL); |
|||
|
|||
u32 cpu_id = 0; |
|||
GetCpuId(&cpu_id); |
|||
InterruptSetTargetCpus(ddma_instance.config.irq_num, cpu_id); |
|||
InterruptSetPriority(ddma_instance.config.irq_num, ddma_instance.config.irq_prority); |
|||
InterruptInstall(ddma_instance.config.irq_num, FDdmaIrqHandler, &ddma_instance, NULL); /* register intr callback */ |
|||
InterruptUmask(ddma_instance.config.irq_num); /* enable ddma0 irq */ |
|||
|
|||
printf("DDMA interrupt setup done! \r\n"); |
|||
return FT_SUCCESS; |
|||
} |
|||
static FError FDdmaSpimInit(void) |
|||
{ |
|||
FError ret; |
|||
FSpim *spim_p = &spim_instance; |
|||
|
|||
/* init and set spi */ |
|||
ret = FSpimOpsInit(spi_id, SPIM_TEST_MODE_ENABLE, FSPIM_DMA_ENABLE, FSPIM_BIT_16_ENABLE); |
|||
if(ret != FT_SUCCESS) |
|||
{ |
|||
FDDMA_SPIM_ERROR("Spim init error, error code %d",ret); |
|||
return ERR_GENERAL; |
|||
} |
|||
|
|||
/* init and set ddma */ |
|||
ret = FDdmaInit(); |
|||
if(ret != FT_SUCCESS) |
|||
{ |
|||
FDDMA_SPIM_ERROR("Ddma init error, error code %d",ret); |
|||
return ERR_GENERAL; |
|||
} |
|||
return FT_SUCCESS; |
|||
} |
|||
|
|||
FError FDdmaTest(void) |
|||
{ |
|||
FError ret = FT_SUCCESS; |
|||
int timeout = 10000; |
|||
if (FDdmaIsChanRunning(ddma_instance.config.base_addr, TX_CHAN_ID) || |
|||
FDdmaIsChanRunning(ddma_instance.config.base_addr, RX_CHAN_ID)) |
|||
{ |
|||
FDDMA_SPIM_ERROR("RX or TX chan is already running!"); |
|||
return FDDMA_ERR_IS_USED; |
|||
} |
|||
/* enable tx channel and ready for use */ |
|||
FDdmaChanActive(&ddma_instance, TX_CHAN_ID); |
|||
/* enable rx channel and ready for use */ |
|||
FDdmaChanActive(&ddma_instance, RX_CHAN_ID); |
|||
|
|||
FDdmaStart(&ddma_instance); |
|||
|
|||
//FSpimCsOnOff(&spim_instance, TRUE);
|
|||
|
|||
printf("\nStart transfer and receive data.\n"); |
|||
ret = FSpimTransferDMA(&spim_instance, TX_ON, RX_ON); |
|||
if(ret != FDDMA_SPIM_OK) |
|||
{ |
|||
FDDMA_SPIM_ERROR("transfer failed, test abort"); |
|||
return FDDMA_SPIM_TEST_ABORT; |
|||
} |
|||
|
|||
|
|||
/* wait in interrupt mode until tx and rx all finished or timeout */ |
|||
while (FALSE == tx_dma_done) |
|||
{ |
|||
if (--timeout <= 0) |
|||
{ |
|||
break; |
|||
} |
|||
|
|||
fsleep_millisec(1); |
|||
} |
|||
if (0 >= timeout) |
|||
{ |
|||
FDDMA_SPIM_ERROR("Wait DDMA TX end timeout %d!", timeout); |
|||
FDdmaDumpRegisters(ddma_instance.config.base_addr); |
|||
FDdmaDumpChanRegisters(ddma_instance.config.base_addr, TX_CHAN_ID); |
|||
FDdmaDumpChanRegisters(ddma_instance.config.base_addr, RX_CHAN_ID); |
|||
return FDDMA_ERR_WAIT_TIMEOUT; |
|||
} |
|||
|
|||
//FSpimCsOnOff(&spim_instance, FALSE);
|
|||
|
|||
while (FALSE == rx_dma_done) |
|||
{ |
|||
fsleep_millisec(1); |
|||
} |
|||
|
|||
return FT_SUCCESS; |
|||
} |
|||
|
|||
int FDdmaSpimExample(void) |
|||
{ |
|||
FError ret=0; |
|||
u32 loop; |
|||
/* spi and ddma hardware init */ |
|||
ret = FDdmaSpimInit(); |
|||
if(ret != FT_SUCCESS) |
|||
{ |
|||
FDDMA_SPIM_ERROR("Hardware init failed."); |
|||
}else |
|||
{ |
|||
/* fill tx data */ |
|||
for(loop = 0; loop < TRANS_DATA_SIZE; loop++) |
|||
{ |
|||
tx_buff[loop] = loop + 10; |
|||
rx_buff[loop] = 0; |
|||
} |
|||
printf("\nTx data:\n"); |
|||
for (loop = 0; loop < TRANS_DATA_SIZE; loop++) { |
|||
printf("%d\t", tx_buff[loop]); |
|||
} |
|||
|
|||
/* start transfer data... */ |
|||
ret = FDdmaTest(); |
|||
|
|||
if(ret != FT_SUCCESS) |
|||
{ |
|||
FDDMA_SPIM_ERROR("Ddma test failed."); |
|||
} |
|||
else |
|||
{ |
|||
for (loop = 0; loop < TRANS_DATA_SIZE; loop++) { |
|||
if (tx_buff[loop] != rx_buff[loop]) { |
|||
printf("\n%s@%d:Ddma spim_lookback example [failure].\r\n\r\n",__func__,__LINE__); |
|||
return 1; |
|||
} |
|||
} |
|||
printf("Rx data:\n"); |
|||
for (loop = 0; loop < TRANS_DATA_SIZE; loop++) { |
|||
|
|||
f_printk("%d\t", rx_buff[loop]); |
|||
//u32 value =rx_buff[loop];
|
|||
|
|||
} |
|||
printf("\n%s@%d:Ddma spim_lookback example [success].\r\n\r\n",__func__,__LINE__); |
|||
|
|||
} |
|||
} |
|||
ret = FDdmaSpimDeinit(); |
|||
if(ret != FT_SUCCESS) |
|||
{ |
|||
printf("\n%s@%d:Ddma spim_lookback example [failure].\r\n\r\n",__func__,__LINE__); |
|||
return 1; |
|||
} |
|||
return 0; |
|||
|
|||
} |
Loading…
Reference in new issue