diff --git a/docs/ChangeLog.md b/docs/ChangeLog.md index e4ff99c9b342a588164fb0c902e237a0770be685..81bd5f9198a5c23e7fa4a50de80416308a2ce41f 100644 --- a/docs/ChangeLog.md +++ b/docs/ChangeLog.md @@ -1,3 +1,23 @@ +# Phytium Standalone SDK 2024-07-10 ChangeLog + +Change Log since 2024-07-10 + +## example + +- modify qspi indirect example, fix length problem in function FQspiFlashPortReadData + +# Phytium Standalone SDK 2024-07-10 ChangeLog + +Change Log since 2024-06-18 + +## third-party + +- update fsl_sdmmc by standalone + +## example + +- init emmc by hs200 mode + # Phytium Standalone SDK 2024-06-18 ChangeLog Change Log since 2024-06-18 diff --git a/example/peripheral/adc/Kconfig b/example/peripheral/adc/Kconfig deleted file mode 100644 index dafb622e966117a0c995fc6c28de5d9727eb123b..0000000000000000000000000000000000000000 --- a/example/peripheral/adc/Kconfig +++ /dev/null @@ -1,7 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see tools/kconfiglib/kconfig-language.txt. -# - - -source "$(SDK_DIR)/../freertos.kconfig" diff --git a/example/peripheral/adc/README.md b/example/peripheral/adc/README.md deleted file mode 100644 index 0824663e3357c584b99eb61fa622983a64a7d4bb..0000000000000000000000000000000000000000 --- a/example/peripheral/adc/README.md +++ /dev/null @@ -1,117 +0,0 @@ -# adc base on freertos - -## 1. 例程介绍 - -本例程示范了freertos环境下的adc的使用,包括adc的初始化、adc周期读取操作; -程序启动后,创建adc初始化任务,设置adc时钟分频、转换模式等; -创建adc定时读取任务FFreeRTOSAdcReadTask,用于定时读取adc转换结果; -创建单次模式的软件定时器,回调函数为删除FFreeRTOSAdcReadTask,去初始化adc,删除软件定时器; -使用C板进行测试,选择ADC0作为采样点,也就是adc0控制器的通道0,对应板上J154的引脚5; - -目前E2000_demo开发板引出了的IO不支持,所以此例程的代码仅供参考!!! - -## 2. 如何使用例程 - -本例程需要用到 - -- Phytium开发板(E2000D) -- [Phytium FreeRTOS SDK](https://gitee.com/phytium_embedded/phytium-free-rtos-sdk) -- [Phytium standalone SDK](https://gitee.com/phytium_embedded/phytium-standalone-sdk) - -### 2.1 硬件配置方法 - -本例程支持的硬件平台包括 - -- E2000D - -对应的配置项是, - -- CONFIG_TARGET_E2000D - -### 2.2 SDK配置方法 - -本例程需要, - -- 使能Shell -- 使能Adc - -对应的配置项是, - -- CONFIG_USE_LETTER_SHELL -- CONFIG_USE_ADC -- CONFIG_FREERTOS_USE_ADC - -本例子已经提供好具体的编译指令,以下进行介绍: -- make 将目录下的工程进行编译 -- make clean 将目录下的工程进行清理 -- make image 将目录下的工程进行编译,并将生成的elf 复制到目标地址 -- make list_kconfig 当前工程支持哪些配置文件 -- make load_kconfig LOAD_CONFIG_NAME= 将预设配置加载至工程中 -- make menuconfig 配置目录下的参数变量 -- make backup_kconfig 将目录下的sdkconfig 备份到./configs下 - -具体使用方法为: -- 在当前目录下 -- 执行以上指令 - -### 2.3 构建和下载 - -#### 2.3.1 构建过程 - -- 在host侧完成配置 - 配置成e2000d -- 选择目标平台 - -``` -make load_e2000d_aarch32 -``` - -- 选择例程需要的配置 - -``` -make menuconfig -``` - -- 编译清除 - -``` -make clean -``` - -- 将编译出的镜像放置到tftp目录下 - -``` -make image -``` - -#### 2.3.2 下载过程 - -- host侧设置重启host侧tftp服务器 - -``` -sudo service tftpd-hpa restart -``` - -- 开发板侧使用bootelf命令跳转 - -``` -setenv ipaddr 192.168.4.20 -setenv serverip 192.168.4.50 -setenv gatewayip 192.168.4.1 -tftpboot 0x90100000 freertos.elf -bootelf -p 0x90100000 -``` - -### 2.4 输出与实验现象 - -- 系统进入后,创建adc初始化任务,创建定时读取任务,并创建单次模式软件定时器 - -![create](./figs/create.png) - -- 定时器时间到,触发单次模式软件定时器的回调函数,去初始化adc,删除占空比变化任务,删除软件定时器 - -![delete](./figs/delete.png) - -## 3. 如何解决问题 - -## 4. 修改历史记录 diff --git a/example/peripheral/adc/configs/e2000d_aarch32_demo_adc.config b/example/peripheral/adc/configs/e2000d_aarch32_demo_adc.config deleted file mode 100644 index 745f75d7e81b9500387eac3f1ecde47812a63382..0000000000000000000000000000000000000000 --- a/example/peripheral/adc/configs/e2000d_aarch32_demo_adc.config +++ /dev/null @@ -1,372 +0,0 @@ -CONFIG_USE_FREERTOS=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_AARCH64_L1_TO_AARCH32=y -# end of Arm architecture configuration - -CONFIG_MMU_PAGE_SIZE=0x1000 -CONFIG_FMMU_NUM_L2_TABLES=256 -# 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_TARGET_PD2308 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_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="adc" -# end of Build project name -# end of Board Configuration - -# -# Sdk common configuration -# -CONFIG_ELOG_LINE_BUF_SIZE=0x100 -# CONFIG_LOG_VERBOS is not set -# CONFIG_LOG_DEBUG is not set -CONFIG_LOG_INFO=y -# CONFIG_LOG_WARN is not set -# CONFIG_LOG_ERROR is not set -# CONFIG_LOG_NONE is not set -# CONFIG_LOG_EXTRA_INFO is not set -# 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 is not set -# CONFIG_USE_QSPI is not set -CONFIG_USE_SERIAL=y - -# -# Usart Configuration -# -CONFIG_ENABLE_Pl011_UART=y -# end of Usart Configuration - -# CONFIG_USE_GPIO 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 is not set -# CONFIG_USE_NAND is not set -# CONFIG_USE_RTC is not set -# CONFIG_USE_SATA is not set -# CONFIG_USE_USB is not set -CONFIG_USE_ADC=y - -# -# ADC Configuration -# -CONFIG_USE_FADC=y -# end of ADC Configuration - -# 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 -# CONFIG_USE_I3C is not set -# end of Drivers 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=0x2000000 -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 - -# -# Component Configuration -# - -# -# Freertos Uart Drivers -# -CONFIG_FREERTOS_USE_UART=y -# end of Freertos Uart Drivers - -# -# Freertos Pwm Drivers -# -# CONFIG_FREERTOS_USE_PWM is not set -# end of Freertos Pwm Drivers - -# -# Freertos Qspi Drivers -# -# CONFIG_FREERTOS_USE_QSPI is not set -# end of Freertos Qspi Drivers - -# -# Freertos Wdt Drivers -# -# CONFIG_FREERTOS_USE_WDT is not set -# end of Freertos Wdt Drivers - -# -# Freertos Eth Drivers -# -# CONFIG_FREERTOS_USE_XMAC is not set -# CONFIG_FREERTOS_USE_GMAC is not set -# end of Freertos Eth Drivers - -# -# Freertos Spim Drivers -# -# CONFIG_FREERTOS_USE_FSPIM is not set -# end of Freertos Spim Drivers - -# -# Freertos DMA Drivers -# -# CONFIG_FREERTOS_USE_FDDMA is not set -# CONFIG_FREERTOS_USE_FGDMA is not set -# end of Freertos DMA Drivers - -# -# Freertos Adc Drivers -# -CONFIG_FREERTOS_USE_ADC=y -# end of Freertos Adc Drivers - -# -# Freertos Can Drivers -# -# CONFIG_FREERTOS_USE_CAN is not set -# end of Freertos Can Drivers - -# -# Freertos I2c Drivers -# -# CONFIG_FREERTOS_USE_I2C is not set -# end of Freertos I2c Drivers - -# -# Freertos Mio Drivers -# -# CONFIG_FREERTOS_USE_MIO is not set -# end of Freertos Mio Drivers - -# -# Freertos Timer Drivers -# -# CONFIG_FREERTOS_USE_TIMER is not set -# end of Freertos Timer Drivers - -# -# Freertos Media Drivers -# -# CONFIG_FREERTOS_USE_MEDIA is not set -# end of Freertos Media Drivers - -# -# Freertos I2s Drivers -# -# CONFIG_FREERTOS_USE_I2S is not set -# end of Freertos I2s Drivers -# end of Component 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_BACKTRACE=y -# CONFIG_USE_FATFS_0_1_4 is not set -# CONFIG_USE_TLSF is not set -# 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_CHERRY_USB is not set -# CONFIG_USE_FSL_SDMMC is not set -# CONFIG_USE_FSL_WIFI is not set -# end of Third-party configuration - -# -# FreeRTOS Kernel Configuration -# -CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y -CONFIG_FREERTOS_HZ=1000 -CONFIG_FREERTOS_MAX_PRIORITIES=32 -CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 -CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 -CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 -CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 -CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 -CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 -CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 -CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 -CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 -CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y -CONFIG_FREERTOS_USE_TRACE_FACILITY=y -CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y -# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set -CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 -CONFIG_FREERTOS_TASK_FPU_SUPPORT=1 -# CONFIG_FREERTOS_USE_POSIX is not set -# end of FreeRTOS Kernel Configuration diff --git a/example/peripheral/adc/configs/e2000d_aarch64_demo_adc.config b/example/peripheral/adc/configs/e2000d_aarch64_demo_adc.config deleted file mode 100644 index 08c35c94c48b3b043dc3f6c3c1751d2df5503cc9..0000000000000000000000000000000000000000 --- a/example/peripheral/adc/configs/e2000d_aarch64_demo_adc.config +++ /dev/null @@ -1,361 +0,0 @@ -CONFIG_USE_FREERTOS=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_BOOT_WITH_FLUSH_CACHE is not set -# CONFIG_MMU_DEBUG_PRINTS is not set -# end of Arm architecture configuration - -CONFIG_MMU_PAGE_SIZE=0x1000 -CONFIG_MAX_XLAT_TABLES=256 -# 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_TARGET_PD2308 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_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="adc" -# end of Build project name -# end of Board Configuration - -# -# Sdk common configuration -# -CONFIG_ELOG_LINE_BUF_SIZE=0x100 -# CONFIG_LOG_VERBOS is not set -# CONFIG_LOG_DEBUG is not set -CONFIG_LOG_INFO=y -# CONFIG_LOG_WARN is not set -# CONFIG_LOG_ERROR is not set -# CONFIG_LOG_NONE is not set -# CONFIG_LOG_EXTRA_INFO is not set -# 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 is not set -# CONFIG_USE_QSPI is not set -CONFIG_USE_SERIAL=y - -# -# Usart Configuration -# -CONFIG_ENABLE_Pl011_UART=y -# end of Usart Configuration - -# CONFIG_USE_GPIO 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 is not set -# CONFIG_USE_NAND is not set -# CONFIG_USE_RTC is not set -# CONFIG_USE_SATA is not set -# CONFIG_USE_USB is not set -CONFIG_USE_ADC=y - -# -# ADC Configuration -# -CONFIG_USE_FADC=y -# end of ADC Configuration - -# 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 -# CONFIG_USE_I3C is not set -# end of Drivers 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=0x2000000 -CONFIG_HEAP_SIZE=1 -CONFIG_STACK_SIZE=0x400 -# end of Linker Options -# end of Build setup - -# -# Component Configuration -# - -# -# Freertos Uart Drivers -# -CONFIG_FREERTOS_USE_UART=y -# end of Freertos Uart Drivers - -# -# Freertos Pwm Drivers -# -# CONFIG_FREERTOS_USE_PWM is not set -# end of Freertos Pwm Drivers - -# -# Freertos Qspi Drivers -# -# CONFIG_FREERTOS_USE_QSPI is not set -# end of Freertos Qspi Drivers - -# -# Freertos Wdt Drivers -# -# CONFIG_FREERTOS_USE_WDT is not set -# end of Freertos Wdt Drivers - -# -# Freertos Eth Drivers -# -# CONFIG_FREERTOS_USE_XMAC is not set -# CONFIG_FREERTOS_USE_GMAC is not set -# end of Freertos Eth Drivers - -# -# Freertos Spim Drivers -# -# CONFIG_FREERTOS_USE_FSPIM is not set -# end of Freertos Spim Drivers - -# -# Freertos DMA Drivers -# -# CONFIG_FREERTOS_USE_FDDMA is not set -# CONFIG_FREERTOS_USE_FGDMA is not set -# end of Freertos DMA Drivers - -# -# Freertos Adc Drivers -# -CONFIG_FREERTOS_USE_ADC=y -# end of Freertos Adc Drivers - -# -# Freertos Can Drivers -# -# CONFIG_FREERTOS_USE_CAN is not set -# end of Freertos Can Drivers - -# -# Freertos I2c Drivers -# -# CONFIG_FREERTOS_USE_I2C is not set -# end of Freertos I2c Drivers - -# -# Freertos Mio Drivers -# -# CONFIG_FREERTOS_USE_MIO is not set -# end of Freertos Mio Drivers - -# -# Freertos Timer Drivers -# -# CONFIG_FREERTOS_USE_TIMER is not set -# end of Freertos Timer Drivers - -# -# Freertos Media Drivers -# -# CONFIG_FREERTOS_USE_MEDIA is not set -# end of Freertos Media Drivers - -# -# Freertos I2s Drivers -# -# CONFIG_FREERTOS_USE_I2S is not set -# end of Freertos I2s Drivers -# end of Component 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_BACKTRACE=y -# CONFIG_USE_FATFS_0_1_4 is not set -# CONFIG_USE_TLSF is not set -# 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_CHERRY_USB is not set -# CONFIG_USE_FSL_SDMMC is not set -# CONFIG_USE_FSL_WIFI is not set -# end of Third-party configuration - -# -# FreeRTOS Kernel Configuration -# -CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y -CONFIG_FREERTOS_HZ=1000 -CONFIG_FREERTOS_MAX_PRIORITIES=32 -CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 -CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 -CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 -CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 -CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 -CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 -CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 -CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 -CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 -CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y -CONFIG_FREERTOS_USE_TRACE_FACILITY=y -CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y -# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set -CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 -CONFIG_FREERTOS_TASK_FPU_SUPPORT=1 -# CONFIG_FREERTOS_USE_POSIX is not set -# end of FreeRTOS Kernel Configuration diff --git a/example/peripheral/adc/figs/create.png b/example/peripheral/adc/figs/create.png deleted file mode 100644 index c56a4d3485e446b5d02ca919c4bfc2b8ca151364..0000000000000000000000000000000000000000 Binary files a/example/peripheral/adc/figs/create.png and /dev/null differ diff --git a/example/peripheral/adc/figs/delete.png b/example/peripheral/adc/figs/delete.png deleted file mode 100644 index 2ed0454679124050188159e6bb0a0c294de741b0..0000000000000000000000000000000000000000 Binary files a/example/peripheral/adc/figs/delete.png and /dev/null differ diff --git a/example/peripheral/adc/inc/adc_example.h b/example/peripheral/adc/inc/adc_example.h deleted file mode 100644 index 2bd61f423cd8ac79aee6c5a7ca000a75be96446b..0000000000000000000000000000000000000000 --- a/example/peripheral/adc/inc/adc_example.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright : (C) 2022 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: adc_example.h - * Date: 2022-08-25 16:22:40 - * LastEditTime: 2022-08-26 15:40:40 - * Description: This file is for task create function define - * - * Modify History: - * Ver Who Date Changes - * ----- ------ -------- -------------------------------------- - * 1.0 wangxiaodong 2022/08/31 first commit - */ - - -#ifndef ADC_EXAMPLE_H -#define ADC_EXAMPLE_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* adc test */ -BaseType_t FFreeRTOSAdcCreate(u32 id); - -#ifdef __cplusplus -} -#endif - -#endif // ! \ No newline at end of file diff --git a/example/peripheral/adc/main.c b/example/peripheral/adc/main.c deleted file mode 100644 index e7371c5b6e207ccd73d5ee1c14f3d62b168cdab2..0000000000000000000000000000000000000000 --- a/example/peripheral/adc/main.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright : (C) 2022 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: 2022-06-17 08:17:59 - * LastEditTime: 2022-06-17 08:17:59 - * Description: This file is for adc example that running ADC task、shell task and open scheduler - * - * Modify History: - * Ver Who Date Changes - * ----- ------ -------- -------------------------------------- - * 1.0 wangxiaodong 2022/08/31 first commit - */ - -#include "shell.h" -#include "shell_port.h" -#include -#include "adc_example.h" - -int main(void) -{ - BaseType_t ret; - - /* test adc 0 */ - ret = FFreeRTOSAdcCreate(0); - if (ret != pdPASS) - { - goto FAIL_EXIT; - } - - ret = LSUserShellTask() ; - if (ret != pdPASS) - { - goto FAIL_EXIT; - } - - vTaskStartScheduler(); /* 启动任务,开启调度 */ - while (1); /* 正常不会执行到这里 */ - -FAIL_EXIT: - printf("failed 0x%x. \r\n", ret); - return 0; -} diff --git a/example/peripheral/adc/makefile b/example/peripheral/adc/makefile deleted file mode 100644 index 92052c5942e04b8e61860dc5c8bbbefca925ff93..0000000000000000000000000000000000000000 --- a/example/peripheral/adc/makefile +++ /dev/null @@ -1,32 +0,0 @@ - -PROJECT_DIR = $(CURDIR) -FREERTOS_SDK_DIR = $(CURDIR)/../../.. - - -# # 设置启动镜像名 -BOOT_IMG_NAME ?= freertos - -USER_CSRC := main.c -USER_CSRC += $(wildcard src/*.c) -USER_CSRC += $(wildcard ../common/*.c) - -USER_ASRC := -USER_CXXSRC := - -USER_INCLUDE := $(PROJECT_DIR) \ - $(PROJECT_DIR)/inc \ - - -include $(FREERTOS_SDK_DIR)/tools/makeall.mk - -USR_BOOT_DIR ?= /mnt/d/tftpboot - - -image: - $(MAKE) clean - $(MAKE) all -j - @cp ./$(IMAGE_OUT_NAME).elf $(USR_BOOT_DIR)/freertos.elf -ifdef CONFIG_OUTPUT_BINARY - @cp ./$(IMAGE_OUT_NAME).bin $(USR_BOOT_DIR)/freertos.bin -endif - @ls $(USR_BOOT_DIR)/$(BOOT_IMG_NAME).* -l \ No newline at end of file diff --git a/example/peripheral/adc/sdkconfig b/example/peripheral/adc/sdkconfig deleted file mode 100644 index 08c35c94c48b3b043dc3f6c3c1751d2df5503cc9..0000000000000000000000000000000000000000 --- a/example/peripheral/adc/sdkconfig +++ /dev/null @@ -1,361 +0,0 @@ -CONFIG_USE_FREERTOS=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_BOOT_WITH_FLUSH_CACHE is not set -# CONFIG_MMU_DEBUG_PRINTS is not set -# end of Arm architecture configuration - -CONFIG_MMU_PAGE_SIZE=0x1000 -CONFIG_MAX_XLAT_TABLES=256 -# 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_TARGET_PD2308 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_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="adc" -# end of Build project name -# end of Board Configuration - -# -# Sdk common configuration -# -CONFIG_ELOG_LINE_BUF_SIZE=0x100 -# CONFIG_LOG_VERBOS is not set -# CONFIG_LOG_DEBUG is not set -CONFIG_LOG_INFO=y -# CONFIG_LOG_WARN is not set -# CONFIG_LOG_ERROR is not set -# CONFIG_LOG_NONE is not set -# CONFIG_LOG_EXTRA_INFO is not set -# 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 is not set -# CONFIG_USE_QSPI is not set -CONFIG_USE_SERIAL=y - -# -# Usart Configuration -# -CONFIG_ENABLE_Pl011_UART=y -# end of Usart Configuration - -# CONFIG_USE_GPIO 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 is not set -# CONFIG_USE_NAND is not set -# CONFIG_USE_RTC is not set -# CONFIG_USE_SATA is not set -# CONFIG_USE_USB is not set -CONFIG_USE_ADC=y - -# -# ADC Configuration -# -CONFIG_USE_FADC=y -# end of ADC Configuration - -# 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 -# CONFIG_USE_I3C is not set -# end of Drivers 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=0x2000000 -CONFIG_HEAP_SIZE=1 -CONFIG_STACK_SIZE=0x400 -# end of Linker Options -# end of Build setup - -# -# Component Configuration -# - -# -# Freertos Uart Drivers -# -CONFIG_FREERTOS_USE_UART=y -# end of Freertos Uart Drivers - -# -# Freertos Pwm Drivers -# -# CONFIG_FREERTOS_USE_PWM is not set -# end of Freertos Pwm Drivers - -# -# Freertos Qspi Drivers -# -# CONFIG_FREERTOS_USE_QSPI is not set -# end of Freertos Qspi Drivers - -# -# Freertos Wdt Drivers -# -# CONFIG_FREERTOS_USE_WDT is not set -# end of Freertos Wdt Drivers - -# -# Freertos Eth Drivers -# -# CONFIG_FREERTOS_USE_XMAC is not set -# CONFIG_FREERTOS_USE_GMAC is not set -# end of Freertos Eth Drivers - -# -# Freertos Spim Drivers -# -# CONFIG_FREERTOS_USE_FSPIM is not set -# end of Freertos Spim Drivers - -# -# Freertos DMA Drivers -# -# CONFIG_FREERTOS_USE_FDDMA is not set -# CONFIG_FREERTOS_USE_FGDMA is not set -# end of Freertos DMA Drivers - -# -# Freertos Adc Drivers -# -CONFIG_FREERTOS_USE_ADC=y -# end of Freertos Adc Drivers - -# -# Freertos Can Drivers -# -# CONFIG_FREERTOS_USE_CAN is not set -# end of Freertos Can Drivers - -# -# Freertos I2c Drivers -# -# CONFIG_FREERTOS_USE_I2C is not set -# end of Freertos I2c Drivers - -# -# Freertos Mio Drivers -# -# CONFIG_FREERTOS_USE_MIO is not set -# end of Freertos Mio Drivers - -# -# Freertos Timer Drivers -# -# CONFIG_FREERTOS_USE_TIMER is not set -# end of Freertos Timer Drivers - -# -# Freertos Media Drivers -# -# CONFIG_FREERTOS_USE_MEDIA is not set -# end of Freertos Media Drivers - -# -# Freertos I2s Drivers -# -# CONFIG_FREERTOS_USE_I2S is not set -# end of Freertos I2s Drivers -# end of Component 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_BACKTRACE=y -# CONFIG_USE_FATFS_0_1_4 is not set -# CONFIG_USE_TLSF is not set -# 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_CHERRY_USB is not set -# CONFIG_USE_FSL_SDMMC is not set -# CONFIG_USE_FSL_WIFI is not set -# end of Third-party configuration - -# -# FreeRTOS Kernel Configuration -# -CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y -CONFIG_FREERTOS_HZ=1000 -CONFIG_FREERTOS_MAX_PRIORITIES=32 -CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES=13 -CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES=11 -CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 -CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE=1024 -CONFIG_FREERTOS_MAX_TASK_NAME_LEN=32 -CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 -CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 -CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 -CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 -CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y -CONFIG_FREERTOS_USE_TRACE_FACILITY=y -CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y -# CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set -CONFIG_FREERTOS_TOTAL_HEAP_SIZE=10240 -CONFIG_FREERTOS_TASK_FPU_SUPPORT=1 -# CONFIG_FREERTOS_USE_POSIX is not set -# end of FreeRTOS Kernel Configuration diff --git a/example/peripheral/adc/sdkconfig.h b/example/peripheral/adc/sdkconfig.h deleted file mode 100644 index 3cb9cffad8af5689a644319765845ff935dbce28..0000000000000000000000000000000000000000 --- a/example/peripheral/adc/sdkconfig.h +++ /dev/null @@ -1,323 +0,0 @@ -#ifndef SDK_CONFIG_H__ -#define SDK_CONFIG_H__ - -#define CONFIG_USE_FREERTOS - -/* Arch configuration */ - -#define CONFIG_TARGET_ARMv8 -#define CONFIG_ARCH_NAME "armv8" - -/* Arm architecture configuration */ - -#define CONFIG_ARCH_ARMV8_AARCH64 -/* CONFIG_ARCH_ARMV8_AARCH32 is not set */ - -/* Compiler configuration */ - -#define CONFIG_ARM_GCC_SELECT -/* CONFIG_ARM_CLANG_SELECT is not set */ -#define CONFIG_TOOLCHAIN_NAME "gcc" -#define CONFIG_TARGET_ARMV8_AARCH64 -#define CONFIG_ARCH_EXECUTION_STATE "aarch64" -#define CONFIG_ARM_NEON -#define CONFIG_ARM_CRC -#define CONFIG_ARM_CRYPTO -#define CONFIG_ARM_FLOAT_POINT -/* CONFIG_GCC_CODE_MODEL_TINY is not set */ -#define CONFIG_GCC_CODE_MODEL_SMALL -/* CONFIG_GCC_CODE_MODEL_LARGE is not set */ -/* end of Compiler configuration */ -/* CONFIG_BOOT_WITH_FLUSH_CACHE is not set */ -/* CONFIG_MMU_DEBUG_PRINTS is not set */ -/* end of Arm architecture configuration */ -#define CONFIG_MMU_PAGE_SIZE 0x1000 -#define CONFIG_MAX_XLAT_TABLES 256 -/* 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 */ -/* CONFIG_TARGET_PD2308 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 -#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 "adc" -/* end of Build project name */ -/* end of Board Configuration */ - -/* Sdk common configuration */ - -#define CONFIG_ELOG_LINE_BUF_SIZE 0x100 -/* CONFIG_LOG_VERBOS is not set */ -/* CONFIG_LOG_DEBUG is not set */ -#define CONFIG_LOG_INFO -/* CONFIG_LOG_WARN is not set */ -/* CONFIG_LOG_ERROR is not set */ -/* CONFIG_LOG_NONE is not set */ -/* CONFIG_LOG_EXTRA_INFO is not set */ -/* 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 -/* CONFIG_USE_SPI is not set */ -/* CONFIG_USE_QSPI is not set */ -#define CONFIG_USE_SERIAL - -/* Usart Configuration */ - -#define CONFIG_ENABLE_Pl011_UART -/* end of Usart Configuration */ -/* CONFIG_USE_GPIO 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 is not set */ -/* CONFIG_USE_NAND is not set */ -/* CONFIG_USE_RTC is not set */ -/* CONFIG_USE_SATA is not set */ -/* CONFIG_USE_USB is not set */ -#define CONFIG_USE_ADC - -/* ADC Configuration */ - -#define CONFIG_USE_FADC -/* end of ADC Configuration */ -/* 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 */ -/* CONFIG_USE_I3C is not set */ -/* end of Drivers 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 0x2000000 -#define CONFIG_HEAP_SIZE 1 -#define CONFIG_STACK_SIZE 0x400 -/* end of Linker Options */ -/* end of Build setup */ - -/* Component Configuration */ - -/* Freertos Uart Drivers */ - -#define CONFIG_FREERTOS_USE_UART -/* end of Freertos Uart Drivers */ - -/* Freertos Pwm Drivers */ - -/* CONFIG_FREERTOS_USE_PWM is not set */ -/* end of Freertos Pwm Drivers */ - -/* Freertos Qspi Drivers */ - -/* CONFIG_FREERTOS_USE_QSPI is not set */ -/* end of Freertos Qspi Drivers */ - -/* Freertos Wdt Drivers */ - -/* CONFIG_FREERTOS_USE_WDT is not set */ -/* end of Freertos Wdt Drivers */ - -/* Freertos Eth Drivers */ - -/* CONFIG_FREERTOS_USE_XMAC is not set */ -/* CONFIG_FREERTOS_USE_GMAC is not set */ -/* end of Freertos Eth Drivers */ - -/* Freertos Spim Drivers */ - -/* CONFIG_FREERTOS_USE_FSPIM is not set */ -/* end of Freertos Spim Drivers */ - -/* Freertos DMA Drivers */ - -/* CONFIG_FREERTOS_USE_FDDMA is not set */ -/* CONFIG_FREERTOS_USE_FGDMA is not set */ -/* end of Freertos DMA Drivers */ - -/* Freertos Adc Drivers */ - -#define CONFIG_FREERTOS_USE_ADC -/* end of Freertos Adc Drivers */ - -/* Freertos Can Drivers */ - -/* CONFIG_FREERTOS_USE_CAN is not set */ -/* end of Freertos Can Drivers */ - -/* Freertos I2c Drivers */ - -/* CONFIG_FREERTOS_USE_I2C is not set */ -/* end of Freertos I2c Drivers */ - -/* Freertos Mio Drivers */ - -/* CONFIG_FREERTOS_USE_MIO is not set */ -/* end of Freertos Mio Drivers */ - -/* Freertos Timer Drivers */ - -/* CONFIG_FREERTOS_USE_TIMER is not set */ -/* end of Freertos Timer Drivers */ - -/* Freertos Media Drivers */ - -/* CONFIG_FREERTOS_USE_MEDIA is not set */ -/* end of Freertos Media Drivers */ - -/* Freertos I2s Drivers */ - -/* CONFIG_FREERTOS_USE_I2S is not set */ -/* end of Freertos I2s Drivers */ -/* end of Component 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 */ -#define CONFIG_USE_BACKTRACE -/* CONFIG_USE_FATFS_0_1_4 is not set */ -/* CONFIG_USE_TLSF is not set */ -/* 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_CHERRY_USB is not set */ -/* CONFIG_USE_FSL_SDMMC is not set */ -/* CONFIG_USE_FSL_WIFI is not set */ -/* end of Third-party configuration */ - -/* FreeRTOS Kernel Configuration */ - -#define CONFIG_FREERTOS_OPTIMIZED_SCHEDULER -#define CONFIG_FREERTOS_HZ 1000 -#define CONFIG_FREERTOS_MAX_PRIORITIES 32 -#define CONFIG_FREERTOS_KERNEL_INTERRUPT_PRIORITIES 13 -#define CONFIG_FREERTOS_MAX_API_CALL_INTERRUPT_PRIORITIES 11 -#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 -#define CONFIG_FREERTOS_MINIMAL_TASK_STACKSIZE 1024 -#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 32 -#define CONFIG_FREERTOS_TIMER_TASK_PRIORITY 1 -#define CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH 2048 -#define CONFIG_FREERTOS_TIMER_QUEUE_LENGTH 10 -#define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0 -#define CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS -#define CONFIG_FREERTOS_USE_TRACE_FACILITY -#define CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS -/* CONFIG_FREERTOS_USE_TICKLESS_IDLE is not set */ -#define CONFIG_FREERTOS_TOTAL_HEAP_SIZE 10240 -#define CONFIG_FREERTOS_TASK_FPU_SUPPORT 1 -/* CONFIG_FREERTOS_USE_POSIX is not set */ -/* end of FreeRTOS Kernel Configuration */ - -#endif diff --git a/example/peripheral/adc/src/adc_example.c b/example/peripheral/adc/src/adc_example.c deleted file mode 100644 index ce1e2fefd7f3c3548f9f3b6e0e81c38fc37c0c9b..0000000000000000000000000000000000000000 --- a/example/peripheral/adc/src/adc_example.c +++ /dev/null @@ -1,267 +0,0 @@ -/* - * Copyright : (C) 2022 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: adc_example.c - * Date: 2022-07-11 11:32:48 - * LastEditTime: 2022-07-11 11:32:48 - * Description: This file is for ADC task implementations - * - * Modify History: - * Ver Who Date Changes - * ----- ------ -------- -------------------------------------- - * 1.0 wangxiaodong 2022/08/31 first commit - */ -#include -#include "FreeRTOSConfig.h" -#include "FreeRTOS.h" -#include "task.h" -#include "timers.h" -#include "fadc.h" -#include "fadc_os.h" -#include "fcpu_info.h" -#include "fio_mux.h" -#include "fassert.h" - -/* The periods assigned to the one-shot timers. */ -#define ONE_SHOT_TIMER_PERIOD ( pdMS_TO_TICKS( 60000UL )) - -/* adc read period */ -#define ADC_READ_PERIOD ( pdMS_TO_TICKS( 2000UL )) - -/* adc channel use, 0/1 */ -#define ADC_CHANNEL_USE FADC_CHANNEL_0 - -/* TESTC board, ADC_VREF = 1.25V */ -#define REF_VOL 1.25 - -/* test task number */ -#define TEST_TASK_NUM 1 - -static xSemaphoreHandle xCountingSemaphore; - -static xTaskHandle read_handle; -static TimerHandle_t xOneShotTimer; - -static FFreeRTOSAdc *os_adc_ctrl_p; - -static void FFreeRTOSAdcDelete(FFreeRTOSAdc *os_adc_p); - -static void FFreeRTOSAdcIntrSet(FFreeRTOSAdc *os_adc_p) -{ - u32 cpu_id; - GetCpuId(&cpu_id); - - FAdcCtrl *instance_p = &os_adc_p->adc_ctrl; - InterruptSetTargetCpus(instance_p->config.irq_num, cpu_id); - InterruptSetPriority(instance_p->config.irq_num, instance_p->config.irq_prority); - InterruptInstall(instance_p->config.irq_num, FAdcIntrHandler, instance_p, "adc"); - InterruptUmask(instance_p->config.irq_num); -} - -static void FFreeRTOSAdcInitTask(void *pvParameters) -{ - /* The adc_id to use is passed in via the parameter. - Cast this to a adc_id pointer. */ - u32 adc_id = (u32)(uintptr)pvParameters; - - FError ret = FADC_SUCCESS; - /*init iomux*/ - FIOMuxInit(); - /* set channel 0 and 1 iopad*/ -#if defined(CONFIG_TARGET_E2000) - FIOPadSetAdcMux(adc_id, ADC_CHANNEL_USE); -#endif - - /* init adc controller */ - os_adc_ctrl_p = FFreeRTOSAdcInit(adc_id); - if (os_adc_ctrl_p == NULL) - { - printf("FFreeRTOSAdcInit failed!!!\n"); - goto adc_init_exit; - } - - /* init adc interrupt handler */ - FFreeRTOSAdcIntrSet(os_adc_ctrl_p); - - /* adc config */ - FFreeRTOSAdcConfig adc_config; - memset(&adc_config, 0, sizeof(adc_config)); - - adc_config.channel = ADC_CHANNEL_USE; - - /* adc controller configuration*/ - adc_config.convert_config.convert_mode = FADC_SINGLE_CONVERT; - adc_config.convert_config.channel_mode = FADC_MULTI_CHANNEL; - adc_config.convert_config.convert_interval = 10; - adc_config.convert_config.clk_div = 8; - - /* adc channel threshold configuration*/ - adc_config.threshold_config.high_threshold = 1000; - adc_config.threshold_config.low_threshold = 0; - - /* adc channel interrupt configuration*/ - adc_config.event_type = FADC_INTR_EVENT_COVFIN; - - ret = FFreeRTOSAdcSet(os_adc_ctrl_p, &adc_config); - if (FADC_SUCCESS != ret) - { - printf("FFreeRTOSAdcSet failed !!!\n"); - goto adc_init_exit; - } - - printf("FFreeRTOSAdcInitTask execute success !!!\r\n"); - - for (int i = 0; i < TEST_TASK_NUM; i++) - { - xSemaphoreGive(xCountingSemaphore); - } - -adc_init_exit: - vTaskDelete(NULL); -} - -static void FFreeRTOSAdcReadTask(void *pvParameters) -{ - xSemaphoreTake(xCountingSemaphore, portMAX_DELAY); - - FError ret = FADC_SUCCESS; - float val = 0.0; - u16 adc_val = 0; - u16 count = 0; - - /* As per most tasks, this task is implemented in an infinite loop. */ - for (;;) - { - ret = FFreeRTOSAdcRead(os_adc_ctrl_p, ADC_CHANNEL_USE, &adc_val); - if (ret == FADC_SUCCESS) - { - val = (float)adc_val; - val = val * REF_VOL / 1024; /* 2^10 */ - printf("adc read success, count=%d, reg_value=%d, value=%f.\r\n", count, adc_val, val); - } - else - { - printf("adc read failed.\r\n"); - } - count++; - - vTaskDelay(ADC_READ_PERIOD); - } -} - -static void prvOneShotTimerCallback(TimerHandle_t xTimer) -{ - /* Output a string to show the time at which the callback was executed. */ - printf("One-shot timer callback executing, will delete FFreeRTOSAdcReadTask.\r\n"); - - FFreeRTOSAdcDelete(os_adc_ctrl_p); -} - -/* create adc test, id is adc module number */ -BaseType_t FFreeRTOSAdcCreate(u32 id) -{ - FASSERT(id < FADC_NUM); - BaseType_t xReturn = pdPASS;/* 定义一个创建信息返回值,默认为 pdPASS */ - BaseType_t timer_started = pdPASS; - - xCountingSemaphore = xSemaphoreCreateCounting(TEST_TASK_NUM, 0); - if (xCountingSemaphore == NULL) - { - printf("FFreeRTOSAdcCreate xCountingSemaphore create failed.\r\n"); - return pdFAIL; - } - /* enter critical region */ - taskENTER_CRITICAL(); - /* adc init task */ - xReturn = xTaskCreate((TaskFunction_t)FFreeRTOSAdcInitTask, /* 任务入口函数 */ - (const char *)"FFreeRTOSAdcInitTask",/* 任务名字 */ - (uint16_t)1024, /* 任务栈大小 */ - (void *)(uintptr)id,/* 任务入口函数参数 */ - (UBaseType_t)1, /* 任务的优先级 */ - NULL); /* 任务控制 */ - - /* 读adc任务 */ - xReturn = xTaskCreate((TaskFunction_t)FFreeRTOSAdcReadTask, /* 任务入口函数 */ - (const char *)"FFreeRTOSAdcReadTask",/* 任务名字 */ - (uint16_t)1024, /* 任务栈大小 */ - NULL,/* 任务入口函数参数 */ - (UBaseType_t)configMAX_PRIORITIES - 1, /* 任务的优先级 */ - (TaskHandle_t *)&read_handle); /* 任务控制 */ - - /* Create the one shot software timer, storing the handle to the created - software timer in xOneShotTimer. */ - xOneShotTimer = xTimerCreate("OneShot Software Timer", /* Text name for the software timer - not used by FreeRTOS. */ - ONE_SHOT_TIMER_PERIOD, /* The software timer's period in ticks. */ - pdFALSE, /* Setting uxAutoRealod to pdFALSE creates a one-shot software timer. */ - 0, /* This example use the timer id. */ - prvOneShotTimerCallback); /* The callback function to be used by the software timer being created. */ - - /* Check the timers were created. */ - if (xOneShotTimer != NULL) - { - /* Start the software timers, using a block time of 0 (no block time). - The scheduler has not been started yet so any block time specified here - would be ignored anyway. */ - timer_started = xTimerStart(xOneShotTimer, 0); - - /* The implementation of xTimerStart() uses the timer command queue, and - xTimerStart() will fail if the timer command queue gets full. The timer - service task does not get created until the scheduler is started, so all - commands sent to the command queue will stay in the queue until after - the scheduler has been started. Check both calls to xTimerStart() - passed. */ - if (timer_started != pdPASS) - { - vPrintf("CreateSoftwareTimerTasks xTimerStart failed. \r\n"); - } - } - else - { - vPrintf("CreateSoftwareTimerTasks xTimerCreate failed. \r\n"); - } - - /* exit critical region */ - taskEXIT_CRITICAL(); - - return xReturn; -} - -static void FFreeRTOSAdcDelete(FFreeRTOSAdc *os_adc_p) -{ - BaseType_t xReturn = pdPASS; - - /* deinit adc controller */ - FFreeRTOSAdcDeinit(os_adc_p); - FIOMuxDeInit();/*deinit iomux */ - - if (read_handle) - { - vTaskDelete(read_handle); - vPrintf("Delete FFreeRTOSAdcReadTask success.\r\n"); - } - - /* delete count sem */ - vSemaphoreDelete(xCountingSemaphore); - - /* delete timer */ - xReturn = xTimerDelete(xOneShotTimer, 0); - if (xReturn != pdPASS) - { - vPrintf("Delete OneShot Software Timer failed.\r\n"); - } - else - { - vPrintf("Delete OneShot Software Timer success.\r\n"); - } - -} \ No newline at end of file diff --git a/example/peripheral/pwm/inc/pwm_example.h b/example/peripheral/pwm/inc/pwm_example.h index cbbffd3398a636503ee81eb0d184057d65ab090e..2cddea936f3ff4a6fa0ad1208bccacd78d55f3b8 100644 --- a/example/peripheral/pwm/inc/pwm_example.h +++ b/example/peripheral/pwm/inc/pwm_example.h @@ -26,6 +26,7 @@ #ifndef PWM_EXAMPLE_H #define PWM_EXAMPLE_H #include "FreeRTOS.h" +#include "sdkconfig.h" #ifdef __cplusplus extern "C" @@ -33,13 +34,17 @@ extern "C" #endif /************************** Constant Definitions *****************************/ -#if defined(CONFIG_E2000Q_DEMO_BOARD)||defined(CONFIG_E2000D_DEMO_BOARD) +#if defined(CONFIG_FIREFLY_DEMO_BOARD) +#define PWM_TEST_ID FPWM3_ID +#define PWM_TEST_CHANNEL FPWM_CHANNEL_0 +#elif defined(CONFIG_PD2308_DEMO_BOARD) +#define PWM_TEST_ID FPWM0_ID +#define PWM_TEST_CHANNEL FPWM_CHANNEL_0 +#else #define PWM_TEST_ID FPWM2_ID #define PWM_TEST_CHANNEL FPWM_CHANNEL_1 -#elif defined(CONFIG_FIREFLY_DEMO_BOARD) -#define PWM_TEST_ID FPWM4_ID -#define PWM_TEST_CHANNEL FPWM_CHANNEL_0 #endif + /* pwm test */ BaseType_t FFreeRTOSPwmDeadBandTaskCreate(); BaseType_t FFreeRTOSPwmSingleChannelTaskCreate(); diff --git a/example/peripheral/qspi/src/qspi_flash_indirect_example.c b/example/peripheral/qspi/src/qspi_flash_indirect_example.c index e51142d3d57e283c4ff006fb6f0f9374135d8a57..87e5cc6f39641786c89f913e2bcc8f7f801fbb29 100644 --- a/example/peripheral/qspi/src/qspi_flash_indirect_example.c +++ b/example/peripheral/qspi/src/qspi_flash_indirect_example.c @@ -13,14 +13,15 @@ * * FilePath: qspi_flash_indirect_example.c * Date: 2023-11-20 11:32:48 - * LastEditTime: 2023-11-20 11:32:48 + * LastEditTime: 2024-7-10 11:32:48 * Description: This file is an example function implementation for the indirect mode of qspi flash * * Modify History: * Ver   Who         Date          Changes * ----- ------      --------     -------------------------------------- * 1.0 huangjin 2023/11/16 first release - * 1.1 zhangyan 2024/4/18 add no letter shell mode, adapt to auto-test system + * 1.1 zhangyan 2024/4/18 add no letter shell mode, adapt to auto-test system + * 1.2 huangjin 2024/7/10 modify QspiRead function */ #include #include "FreeRTOSConfig.h" @@ -49,9 +50,6 @@ static u8 rd_buf[DAT_LENGTH] = {0}; static u8 wr_buf[DAT_LENGTH] = {0}; -/* test task number */ -#define READ_WRITE_TASK_NUM 3 - enum { QSPI_TEST_SUCCESS = 0, @@ -91,9 +89,14 @@ static FError QspiRead(void) FError ret = FQSPI_SUCCESS; const TickType_t xDelay = pdMS_TO_TICKS(TASK_DELAY_MS); int i = 0; + u32 read_index = 0; /* Read norflash data */ - ret = FQspiFlashPortReadData(&os_qspi_ctrl_p->qspi_ctrl, FQSPI_FLASH_CMD_READ, flash_wr_start, rd_buf, DAT_LENGTH); + while (read_index < DAT_LENGTH) + { + ret = FQspiFlashPortReadData(&os_qspi_ctrl_p->qspi_ctrl, FQSPI_FLASH_CMD_READ, flash_wr_start+read_index, rd_buf+read_index, FQSPI_CMD_PORT_CMD_RW_MAX); + read_index += FQSPI_CMD_PORT_CMD_RW_MAX; + } if (FQSPI_SUCCESS != ret) { FQSPI_ERROR("QspiRead FFreeRTOSQspiTransfer failed, return value: 0x%x\r\n", ret); @@ -141,8 +144,8 @@ static FError QspiWrite(void) /* Write norflash data */ while (array_index < sizeof(wr_buf)) { - u8 data_to_write[4] = {0}; - for (i = 0; i < 4; i++) + u8 data_to_write[FQSPI_CMD_PORT_CMD_RW_MAX] = {0}; + for (i = 0; i < FQSPI_CMD_PORT_CMD_RW_MAX; i++) { if (array_index < sizeof(wr_buf)) { @@ -154,13 +157,13 @@ static FError QspiWrite(void) break; } } - ret = FQspiFlashPortWriteData(&os_qspi_ctrl_p->qspi_ctrl, FQSPI_FLASH_CMD_PP, write_addr, (u8 *)(data_to_write), 4); + ret = FQspiFlashPortWriteData(&os_qspi_ctrl_p->qspi_ctrl, FQSPI_FLASH_CMD_PP, write_addr, (u8 *)(data_to_write), FQSPI_CMD_PORT_CMD_RW_MAX); if (FQSPI_SUCCESS != ret) { FQSPI_ERROR("Failed to erase sectors. return value: 0x%x\r\n", ret); return ret; } - write_addr += 4; + write_addr += FQSPI_CMD_PORT_CMD_RW_MAX; } return ret; diff --git a/example/peripheral/sdif/src/sdif_emmc_read_write.c b/example/peripheral/sdif/src/sdif_emmc_read_write.c index c02363c5cb9a3c94e28b6f22a0d60277158f9aef..2030267032e16d41a6c30646ae465b155cd08254 100644 --- a/example/peripheral/sdif/src/sdif_emmc_read_write.c +++ b/example/peripheral/sdif/src/sdif_emmc_read_write.c @@ -212,7 +212,7 @@ int FFreeRTOSEmmcWriteRead(void) s_inst_config.endianMode = kSDMMCHOST_EndianModeLittle; s_inst_config.maxTransSize = SD_MAX_RW_BLK * SD_BLOCK_SIZE; s_inst_config.defBlockSize = SD_BLOCK_SIZE; - s_inst_config.cardClock = MMC_CLOCK_52MHZ; + s_inst_config.cardClock = FSDIF_CLK_SPEED_100_MHZ; /* 创建主要操作任务 */ xReturn = xTaskCreate((TaskFunction_t)SdifEmmcReadWriteTask, diff --git a/example/storage/fatfs/src/fatfs_examples.c b/example/storage/fatfs/src/fatfs_examples.c index 04d290a3a1e4365518b28f8d4a3a41a89757c2d4..4f758406302ea53f5ba77964444301bf2d230d37 100755 --- a/example/storage/fatfs/src/fatfs_examples.c +++ b/example/storage/fatfs/src/fatfs_examples.c @@ -232,75 +232,6 @@ static FRESULT FatfsBasicTest(void) return fr; } - - /* speed test will test diskio and destory file system */ -static FRESULT FatfsSpeedTest(void) -{ - FRESULT fr = FR_OK; -#ifdef CONFIG_FATFS_RAM_DISK - printf("\r\n========Speed test for RAM Disk=================\r\n"); - fr = ff_speed_bench(mount_points[FFREERTOS_FATFS_RAM_DISK], RAM_WR_SECTOR); - if (FR_OK != fr) - { - FF_ERROR("RAM disk speed test failed, err = %d.", fr); - return fr; - } -#endif - -#ifdef CONFIG_FATFS_SDMMC_FSDIF_TF - printf("\r\n========Speed test for TF Card=================\r\n"); - fr = ff_speed_bench(mount_points[FFREERTOS_FATFS_TF_CARD], WR_SECTOR); - if (FR_OK != fr) - { - FF_ERROR("TF speed test failed, err = %d.", fr); - return fr; - } -#endif - -#ifdef CONFIG_FATFS_SDMMC_FSDIF_EMMC - printf("\r\n========Speed test for eMMC=================\r\n"); - fr = ff_speed_bench(mount_points[FFREERTOS_FATFS_EMMC_CARD], WR_SECTOR); - if (FR_OK != fr) - { - FF_ERROR("SDIO speed test failed, err = %d.", fr); - return fr; - } -#endif - -#ifdef CONFIG_FATFS_USB - printf("\r\n========Speed test for USB Disk=================\r\n"); - fr = ff_speed_bench(mount_points[FFREERTOS_FATFS_USB_DISK], WR_SECTOR); - printf("Speed test for USB end\r\n"); - if (FR_OK != fr) - { - FF_ERROR("USB speed test failed, err = %d.", fr); - return fr; - } - -#endif - -#ifdef CONFIG_FATFS_FSATA - printf("\r\n========Speed test for SATA Disk=================\r\n"); - fr = ff_speed_bench(mount_points[FFREERTOS_FATFS_SATA_DISK], WR_SECTOR); - if (FR_OK != fr) - { - FF_ERROR("SATA speed test failed, err = %d.", fr); - return fr; - } -#endif - -#ifdef CONFIG_FATFS_FSATA_PCIE - printf("\r\n========Speed test for SATA PCIE Disk=================\r\n"); - fr = ff_speed_bench(mount_points[FFREERTOS_FATFS_SATA_PCIE_DISK], WR_SECTOR); - if (FR_OK != fr) - { - FF_ERROR("SATA PCIE speed test failed, err = %d.", fr); - return fr; - } -#endif - return fr; -} - /* cycle test will test diskio and destory file system */ static FRESULT FatfsCycleTest(void) { @@ -385,14 +316,6 @@ void FatfsRunTask(void) } #endif -#ifdef CONFIG_FATFS_SPEED_TEST - fret = FatfsSpeedTest(); - if(FR_OK != fret) - { - goto task_ret; - } -#endif - #ifdef CONFIG_FATFS_CYCLE_TEST fret = FatfsCycleTest(); if(FR_OK != fret) diff --git a/install.py b/install.py index 9fe47b958ccd2d448ef92b53fda0827fd1d2c498..b2fa330a51b11f1e13f79d3ef3c8e32e40adc954 100755 --- a/install.py +++ b/install.py @@ -11,9 +11,9 @@ linux_aarch64 = 1 windows_x64 = 2 # STEP 1: Check environment -if (platform.system() == 'Linux' ) and (platform.processor() == 'x86_64'): +if (platform.system() == 'Linux' ) and (platform.machine() == 'x86_64'): install_platform = linux_x86 -elif (platform.system() == 'Linux' ) and (platform.processor() == 'aarch64'): # Arm64 computer +elif (platform.system() == 'Linux' ) and (platform.machine() == 'aarch64'): # Arm64 computer install_platform = linux_aarch64 elif (platform.system() == 'Windows') and (platform.machine() == 'AMD64'): install_platform = windows_x64 @@ -36,7 +36,7 @@ freertos_sdk_path = install_path print("Standalone SDK at {}".format(freertos_sdk_path)) # Add standalone sdk -standalone_sdk_v="0f31ca6f028af44e999e986157388f655d1f528e" +standalone_sdk_v="3174e23d3c319a5685910febb17ca87237ca7ceb" if (install_platform == windows_x64): standalone_path=freertos_sdk_path + '\\standalone' else: diff --git a/third-party/fsl_sdmmc/osa/fsl_sdmmc_osa.c b/third-party/fsl_sdmmc/osa/fsl_sdmmc_osa.c index bb1e6ba9bfbd1a6fa734ae4f3ffdfd01cee6e918..803089f655ef261e797db0f719b72351978467c0 100644 --- a/third-party/fsl_sdmmc/osa/fsl_sdmmc_osa.c +++ b/third-party/fsl_sdmmc/osa/fsl_sdmmc_osa.c @@ -110,7 +110,7 @@ status_t SDMMC_OSAEventCreate(void *eventHandle) * param event event flags. * retval kStatus_Fail or kStatus_Success. */ -status_t SDMMC_OSAEventWait(void *eventHandle, uint32_t eventType, uint32_t timeoutMilliseconds, uint32_t *event) +status_t SDMMC_OSAEventWait(void *eventHandle, uint32_t eventType, uint32_t timeoutMilliseconds, uint32_t *event, uint32_t flags) { assert(eventHandle != NULL); @@ -128,9 +128,19 @@ status_t SDMMC_OSAEventWait(void *eventHandle, uint32_t eventType, uint32_t time if (KOSA_StatusSuccess == status) { (void)SDMMC_OSAEventGet(eventHandle, eventType, event); - if ((*event & eventType) != 0U) + if (flags & SDMMC_OSA_EVENT_FLAG_AND) { - return kStatus_Success; + if (*event == eventType) + { + return kStatus_Success; + } + } + else + { + if ((*event & eventType) != 0U) + { + return kStatus_Success; + } } } } diff --git a/third-party/fsl_sdmmc/osa/fsl_sdmmc_osa.h b/third-party/fsl_sdmmc/osa/fsl_sdmmc_osa.h index b22bf368be50db478c3baaeaacdb9dc9b16b61a2..b3d85d54464df80342e6239981df6e29ff6a39eb 100644 --- a/third-party/fsl_sdmmc/osa/fsl_sdmmc_osa.h +++ b/third-party/fsl_sdmmc/osa/fsl_sdmmc_osa.h @@ -30,6 +30,9 @@ #define SDMMC_OSA_EVENT_CARD_INSERTED (1UL << 8U) #define SDMMC_OSA_EVENT_CARD_REMOVED (1UL << 9U) +#define SDMMC_OSA_EVENT_FLAG_AND (1UL << 0U) +#define SDMMC_OSA_EVENT_FLAG_OR (1UL << 1U) + /*!@brief enable semphore by default */ #ifndef SDMMC_OSA_POLLING_EVENT_BY_SEMPHORE #define SDMMC_OSA_POLLING_EVENT_BY_SEMPHORE 1 @@ -104,7 +107,7 @@ status_t SDMMC_OSAEventCreate(void *eventHandle); * @param event event flags. * @retval kStatus_Fail or kStatus_Success. */ -status_t SDMMC_OSAEventWait(void *eventHandle, uint32_t eventType, uint32_t timeoutMilliseconds, uint32_t *event); +status_t SDMMC_OSAEventWait(void *eventHandle, uint32_t eventType, uint32_t timeoutMilliseconds, uint32_t *event, uint32_t flags); /*! * @brief set event.