diff --git a/bsp/stm32/stm32f407-micu/.config b/bsp/stm32/stm32f407-micu/.config index 7b686306bd8..6d1ec538d44 100644 --- a/bsp/stm32/stm32f407-micu/.config +++ b/bsp/stm32/stm32f407-micu/.config @@ -206,6 +206,7 @@ CONFIG_FINSH_THREAD_STACK_SIZE=4096 CONFIG_FINSH_USING_HISTORY=y CONFIG_FINSH_HISTORY_LINES=5 # CONFIG_FINSH_USING_WORD_OPERATION is not set +# CONFIG_FINSH_USING_FUNC_EXT is not set CONFIG_FINSH_USING_SYMTAB=y CONFIG_FINSH_CMD_SIZE=80 CONFIG_MSH_USING_BUILT_IN_COMMANDS=y @@ -218,7 +219,47 @@ CONFIG_FINSH_USING_OPTION_COMPLETION=y # # DFS: device virtual file system # -# CONFIG_RT_USING_DFS is not set +CONFIG_RT_USING_DFS=y +CONFIG_DFS_USING_POSIX=y +CONFIG_DFS_USING_WORKDIR=y +# CONFIG_RT_USING_DFS_MNTTABLE is not set +CONFIG_DFS_FD_MAX=16 +CONFIG_RT_USING_DFS_V1=y +# CONFIG_RT_USING_DFS_V2 is not set +CONFIG_DFS_FILESYSTEMS_MAX=4 +CONFIG_DFS_FILESYSTEM_TYPES_MAX=4 +CONFIG_RT_USING_DFS_ELMFAT=y + +# +# elm-chan's FatFs, Generic FAT Filesystem Module +# +CONFIG_RT_DFS_ELM_CODE_PAGE=437 +CONFIG_RT_DFS_ELM_WORD_ACCESS=y +# CONFIG_RT_DFS_ELM_USE_LFN_0 is not set +# CONFIG_RT_DFS_ELM_USE_LFN_1 is not set +# CONFIG_RT_DFS_ELM_USE_LFN_2 is not set +CONFIG_RT_DFS_ELM_USE_LFN_3=y +CONFIG_RT_DFS_ELM_USE_LFN=3 +CONFIG_RT_DFS_ELM_LFN_UNICODE_0=y +# CONFIG_RT_DFS_ELM_LFN_UNICODE_1 is not set +# CONFIG_RT_DFS_ELM_LFN_UNICODE_2 is not set +# CONFIG_RT_DFS_ELM_LFN_UNICODE_3 is not set +CONFIG_RT_DFS_ELM_LFN_UNICODE=0 +CONFIG_RT_DFS_ELM_MAX_LFN=255 +CONFIG_RT_DFS_ELM_DRIVES=2 +CONFIG_RT_DFS_ELM_MAX_SECTOR_SIZE=512 +# CONFIG_RT_DFS_ELM_USE_ERASE is not set +CONFIG_RT_DFS_ELM_REENTRANT=y +CONFIG_RT_DFS_ELM_MUTEX_TIMEOUT=3000 +# CONFIG_RT_DFS_ELM_USE_EXFAT is not set +# end of elm-chan's FatFs, Generic FAT Filesystem Module + +CONFIG_RT_USING_DFS_DEVFS=y +# CONFIG_RT_USING_DFS_ROMFS is not set +# CONFIG_RT_USING_DFS_CROMFS is not set +# CONFIG_RT_USING_DFS_RAMFS is not set +# CONFIG_RT_USING_DFS_TMPFS is not set +# CONFIG_RT_USING_DFS_MQUEUE is not set # end of DFS: device virtual file system # CONFIG_RT_USING_FAL is not set @@ -255,7 +296,19 @@ CONFIG_RT_SERIAL_RB_BUFSZ=64 # CONFIG_RT_USING_PM is not set # CONFIG_RT_USING_RTC is not set # CONFIG_RT_USING_SDIO is not set -# CONFIG_RT_USING_SPI is not set +CONFIG_RT_USING_SPI=y +CONFIG_RT_USING_SPI_ISR=y +# CONFIG_RT_USING_SOFT_SPI is not set +# CONFIG_RT_USING_QSPI is not set +# CONFIG_RT_USING_SPI_MSD is not set +CONFIG_RT_USING_SFUD=y +CONFIG_RT_SFUD_USING_SFDP=y +CONFIG_RT_SFUD_USING_FLASH_INFO_TABLE=y +# CONFIG_RT_SFUD_USING_QSPI is not set +CONFIG_RT_SFUD_SPI_MAX_HZ=50000000 +# CONFIG_RT_DEBUG_SFUD is not set +# CONFIG_RT_USING_ENC28J60 is not set +# CONFIG_RT_USING_SPI_WIFI is not set # CONFIG_RT_USING_WDT is not set # CONFIG_RT_USING_AUDIO is not set # CONFIG_RT_USING_SENSOR is not set @@ -358,8 +411,6 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0 # CONFIG_RT_USING_RT_LINK is not set # end of Utilities -# CONFIG_RT_USING_VBUS is not set - # # Using USB legacy version # @@ -1437,6 +1488,9 @@ CONFIG_SOC_STM32F407VE=y # # Onboard Peripheral Drivers # +CONFIG_BSP_USING_VIRTUAL_USART=y +# CONFIG_BSP_USING_ON_BOARD_FLASH is not set +# end of Onboard Peripheral Drivers # # On-chip Peripheral Drivers @@ -1446,6 +1500,7 @@ CONFIG_BSP_USING_UART=y CONFIG_BSP_STM32_UART_V1_TX_TIMEOUT=2000 CONFIG_BSP_USING_UART1=y # CONFIG_BSP_UART1_RX_USING_DMA is not set +# CONFIG_BSP_USING_SPI is not set # CONFIG_BSP_USING_RNG is not set # CONFIG_BSP_USING_UDID is not set # end of On-chip Peripheral Drivers diff --git a/bsp/stm32/stm32f407-micu/board/CubeMX_Config/.mxproject b/bsp/stm32/stm32f407-micu/board/CubeMX_Config/.mxproject index 500b2209c11..8166e9c4db0 100644 --- a/bsp/stm32/stm32f407-micu/board/CubeMX_Config/.mxproject +++ b/bsp/stm32/stm32f407-micu/board/CubeMX_Config/.mxproject @@ -1,3 +1,11 @@ +[PreviousLibFiles] +LibFiles=Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_i2c.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_i2c.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_i2c_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_bus.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_rcc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_system.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_utils.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ramfunc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_gpio.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_dma.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_dmamux.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_pwr.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_cortex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_cortex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal.h;Drivers\STM32F4xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_def.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_exti.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_exti.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_sdmmc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_sd.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_mmc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_spi.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_spi.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_uart.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_usart.h;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_i2c.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_i2c_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ramfunc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_gpio.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_cortex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_exti.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_ll_sdmmc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_sd.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_mmc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_spi.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_uart.c;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_i2c.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_i2c.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_i2c_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_bus.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_rcc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_system.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_utils.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ramfunc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_gpio.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_dma.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_dmamux.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_pwr.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_cortex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_cortex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal.h;Drivers\STM32F4xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_def.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_exti.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_exti.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_sdmmc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_sd.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_mmc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_spi.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_spi.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_uart.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_usart.h;Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f407xx.h;Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f4xx.h;Drivers\CMSIS\Device\ST\STM32F4xx\Include\system_stm32f4xx.h;Drivers\CMSIS\Device\ST\STM32F4xx\Include\system_stm32f4xx.h;Drivers\CMSIS\Device\ST\STM32F4xx\Source\Templates\system_stm32f4xx.c;Drivers\CMSIS\Include\cachel1_armv7.h;Drivers\CMSIS\Include\cmsis_armcc.h;Drivers\CMSIS\Include\cmsis_armclang.h;Drivers\CMSIS\Include\cmsis_armclang_ltm.h;Drivers\CMSIS\Include\cmsis_compiler.h;Drivers\CMSIS\Include\cmsis_gcc.h;Drivers\CMSIS\Include\cmsis_iccarm.h;Drivers\CMSIS\Include\cmsis_version.h;Drivers\CMSIS\Include\core_armv81mml.h;Drivers\CMSIS\Include\core_armv8mbl.h;Drivers\CMSIS\Include\core_armv8mml.h;Drivers\CMSIS\Include\core_cm0.h;Drivers\CMSIS\Include\core_cm0plus.h;Drivers\CMSIS\Include\core_cm1.h;Drivers\CMSIS\Include\core_cm23.h;Drivers\CMSIS\Include\core_cm3.h;Drivers\CMSIS\Include\core_cm33.h;Drivers\CMSIS\Include\core_cm35p.h;Drivers\CMSIS\Include\core_cm4.h;Drivers\CMSIS\Include\core_cm55.h;Drivers\CMSIS\Include\core_cm7.h;Drivers\CMSIS\Include\core_cm85.h;Drivers\CMSIS\Include\core_sc000.h;Drivers\CMSIS\Include\core_sc300.h;Drivers\CMSIS\Include\core_starmc1.h;Drivers\CMSIS\Include\mpu_armv7.h;Drivers\CMSIS\Include\mpu_armv8.h;Drivers\CMSIS\Include\pac_armv81.h;Drivers\CMSIS\Include\pmu_armv8.h;Drivers\CMSIS\Include\tz_context.h; + +[PreviousUsedKeilFiles] +SourceFiles=..\Core\Src\main.c;..\Core\Src\stm32f4xx_it.c;..\Core\Src\stm32f4xx_hal_msp.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_i2c.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_i2c_ex.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc_ex.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ex.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ramfunc.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_gpio.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma_ex.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr_ex.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_cortex.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_exti.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_ll_sdmmc.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_sd.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_mmc.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_spi.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_uart.c;..\Drivers\CMSIS\Device\ST\STM32F4xx\Source\Templates\system_stm32f4xx.c;..\Core\Src\system_stm32f4xx.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_i2c.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_i2c_ex.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc_ex.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ex.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ramfunc.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_gpio.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma_ex.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr_ex.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_cortex.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_exti.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_ll_sdmmc.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_sd.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_mmc.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_spi.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_uart.c;..\Drivers\CMSIS\Device\ST\STM32F4xx\Source\Templates\system_stm32f4xx.c;..\Core\Src\system_stm32f4xx.c;;; +HeaderPath=..\Drivers\STM32F4xx_HAL_Driver\Inc;..\Drivers\STM32F4xx_HAL_Driver\Inc\Legacy;..\Drivers\CMSIS\Device\ST\STM32F4xx\Include;..\Drivers\CMSIS\Include;..\Core\Inc; +CDefines=USE_HAL_DRIVER;STM32F407xx;USE_HAL_DRIVER;USE_HAL_DRIVER; + [PreviousGenFiles] AdvancedFolderStructure=true HeaderFileListSize=3 @@ -15,11 +23,3 @@ SourceFolderListSize=1 SourcePath#0=..\Core\Src SourceFiles=; -[PreviousLibFiles] -LibFiles=Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_uart.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_usart.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_bus.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_rcc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_system.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_utils.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ramfunc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_gpio.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_dma.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_dmamux.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_pwr.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_cortex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_cortex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal.h;Drivers\STM32F4xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_def.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_exti.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_exti.h;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_uart.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ramfunc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_gpio.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_cortex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_exti.c;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_uart.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_usart.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_bus.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_rcc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_system.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_utils.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ramfunc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_gpio.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_dma.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_dmamux.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_pwr.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_cortex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_cortex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal.h;Drivers\STM32F4xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_def.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_exti.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_exti.h;Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f407xx.h;Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f4xx.h;Drivers\CMSIS\Device\ST\STM32F4xx\Include\system_stm32f4xx.h;Drivers\CMSIS\Device\ST\STM32F4xx\Include\system_stm32f4xx.h;Drivers\CMSIS\Device\ST\STM32F4xx\Source\Templates\system_stm32f4xx.c;Drivers\CMSIS\Include\cachel1_armv7.h;Drivers\CMSIS\Include\cmsis_armcc.h;Drivers\CMSIS\Include\cmsis_armclang.h;Drivers\CMSIS\Include\cmsis_armclang_ltm.h;Drivers\CMSIS\Include\cmsis_compiler.h;Drivers\CMSIS\Include\cmsis_gcc.h;Drivers\CMSIS\Include\cmsis_iccarm.h;Drivers\CMSIS\Include\cmsis_version.h;Drivers\CMSIS\Include\core_armv81mml.h;Drivers\CMSIS\Include\core_armv8mbl.h;Drivers\CMSIS\Include\core_armv8mml.h;Drivers\CMSIS\Include\core_cm0.h;Drivers\CMSIS\Include\core_cm0plus.h;Drivers\CMSIS\Include\core_cm1.h;Drivers\CMSIS\Include\core_cm23.h;Drivers\CMSIS\Include\core_cm3.h;Drivers\CMSIS\Include\core_cm33.h;Drivers\CMSIS\Include\core_cm35p.h;Drivers\CMSIS\Include\core_cm4.h;Drivers\CMSIS\Include\core_cm55.h;Drivers\CMSIS\Include\core_cm7.h;Drivers\CMSIS\Include\core_cm85.h;Drivers\CMSIS\Include\core_sc000.h;Drivers\CMSIS\Include\core_sc300.h;Drivers\CMSIS\Include\core_starmc1.h;Drivers\CMSIS\Include\mpu_armv7.h;Drivers\CMSIS\Include\mpu_armv8.h;Drivers\CMSIS\Include\pac_armv81.h;Drivers\CMSIS\Include\pmu_armv8.h;Drivers\CMSIS\Include\tz_context.h; - -[PreviousUsedKeilFiles] -SourceFiles=..\Core\Src\main.c;..\Core\Src\stm32f4xx_it.c;..\Core\Src\stm32f4xx_hal_msp.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_uart.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc_ex.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ex.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ramfunc.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_gpio.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma_ex.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr_ex.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_cortex.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_exti.c;..\Drivers\CMSIS\Device\ST\STM32F4xx\Source\Templates\system_stm32f4xx.c;..\Core\Src\system_stm32f4xx.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_uart.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc_ex.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ex.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ramfunc.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_gpio.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma_ex.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr_ex.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_cortex.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal.c;..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_exti.c;..\Drivers\CMSIS\Device\ST\STM32F4xx\Source\Templates\system_stm32f4xx.c;..\Core\Src\system_stm32f4xx.c;;; -HeaderPath=..\Drivers\STM32F4xx_HAL_Driver\Inc;..\Drivers\STM32F4xx_HAL_Driver\Inc\Legacy;..\Drivers\CMSIS\Device\ST\STM32F4xx\Include;..\Drivers\CMSIS\Include;..\Core\Inc; -CDefines=USE_HAL_DRIVER;STM32F407xx;USE_HAL_DRIVER;USE_HAL_DRIVER; - diff --git a/bsp/stm32/stm32f407-micu/board/CubeMX_Config/CubeMX_Config.ioc b/bsp/stm32/stm32f407-micu/board/CubeMX_Config/CubeMX_Config.ioc index 8443389ca79..ff0384dd5d9 100644 --- a/bsp/stm32/stm32f407-micu/board/CubeMX_Config/CubeMX_Config.ioc +++ b/bsp/stm32/stm32f407-micu/board/CubeMX_Config/CubeMX_Config.ioc @@ -7,23 +7,38 @@ GPIO.groupedBy=Group By Peripherals KeepUserPlacement=false Mcu.CPN=STM32F407VET6 Mcu.Family=STM32F4 -Mcu.IP0=NVIC -Mcu.IP1=RCC -Mcu.IP2=SYS -Mcu.IP3=USART1 -Mcu.IPNb=4 +Mcu.IP0=I2C1 +Mcu.IP1=NVIC +Mcu.IP2=RCC +Mcu.IP3=SDIO +Mcu.IP4=SPI1 +Mcu.IP5=SYS +Mcu.IP6=USART1 +Mcu.IPNb=7 Mcu.Name=STM32F407V(E-G)Tx Mcu.Package=LQFP100 Mcu.Pin0=PC14-OSC32_IN Mcu.Pin1=PC15-OSC32_OUT +Mcu.Pin10=PA9 +Mcu.Pin11=PA10 +Mcu.Pin12=PA13 +Mcu.Pin13=PA14 +Mcu.Pin14=PC10 +Mcu.Pin15=PC11 +Mcu.Pin16=PC12 +Mcu.Pin17=PD2 +Mcu.Pin18=PB6 +Mcu.Pin19=PB7 Mcu.Pin2=PH0-OSC_IN +Mcu.Pin20=VP_SYS_VS_Systick Mcu.Pin3=PH1-OSC_OUT -Mcu.Pin4=PA9 -Mcu.Pin5=PA10 -Mcu.Pin6=PA13 -Mcu.Pin7=PA14 -Mcu.Pin8=VP_SYS_VS_Systick -Mcu.PinsNb=9 +Mcu.Pin4=PA4 +Mcu.Pin5=PA5 +Mcu.Pin6=PA6 +Mcu.Pin7=PA7 +Mcu.Pin8=PC8 +Mcu.Pin9=PC9 +Mcu.PinsNb=21 Mcu.ThirdPartyNb=0 Mcu.UserConstants= Mcu.UserName=STM32F407VETx @@ -46,12 +61,38 @@ PA13.Mode=Serial_Wire PA13.Signal=SYS_JTMS-SWDIO PA14.Mode=Serial_Wire PA14.Signal=SYS_JTCK-SWCLK +PA4.GPIOParameters=GPIO_Label +PA4.GPIO_Label=SPI1_CS +PA4.Locked=true +PA4.Signal=GPIO_Output +PA5.Mode=Full_Duplex_Master +PA5.Signal=SPI1_SCK +PA6.Mode=Full_Duplex_Master +PA6.Signal=SPI1_MISO +PA7.Mode=Full_Duplex_Master +PA7.Signal=SPI1_MOSI PA9.Mode=Asynchronous PA9.Signal=USART1_TX +PB6.Mode=I2C +PB6.Signal=I2C1_SCL +PB7.Mode=I2C +PB7.Signal=I2C1_SDA +PC10.Mode=SD_4_bits_Wide_bus +PC10.Signal=SDIO_D2 +PC11.Mode=SD_4_bits_Wide_bus +PC11.Signal=SDIO_D3 +PC12.Mode=SD_4_bits_Wide_bus +PC12.Signal=SDIO_CK PC14-OSC32_IN.Mode=LSE-External-Oscillator PC14-OSC32_IN.Signal=RCC_OSC32_IN PC15-OSC32_OUT.Mode=LSE-External-Oscillator PC15-OSC32_OUT.Signal=RCC_OSC32_OUT +PC8.Mode=SD_4_bits_Wide_bus +PC8.Signal=SDIO_D0 +PC9.Mode=SD_4_bits_Wide_bus +PC9.Signal=SDIO_D1 +PD2.Mode=SD_4_bits_Wide_bus +PD2.Signal=SDIO_CMD PH0-OSC_IN.Mode=HSE-External-Oscillator PH0-OSC_IN.Signal=RCC_OSC_IN PH1-OSC_OUT.Mode=HSE-External-Oscillator @@ -88,8 +129,8 @@ ProjectManager.ToolChainLocation= ProjectManager.UAScriptAfterPath= ProjectManager.UAScriptBeforePath= ProjectManager.UnderRoot=false -ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_USART1_UART_Init-USART1-false-HAL-true -RCC.48MHZClocksFreq_Value=84000000 +ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_USART1_UART_Init-USART1-false-HAL-true,4-MX_SPI1_Init-SPI1-false-HAL-true,5-MX_SDIO_SD_Init-SDIO-false-HAL-true +RCC.48MHZClocksFreq_Value=48000000 RCC.AHBFreq_Value=168000000 RCC.APB1CLKDivider=RCC_HCLK_DIV4 RCC.APB1Freq_Value=42000000 @@ -105,13 +146,14 @@ RCC.HCLKFreq_Value=168000000 RCC.HSE_VALUE=8000000 RCC.HSI_VALUE=16000000 RCC.I2SClocksFreq_Value=192000000 -RCC.IPParameters=48MHZClocksFreq_Value,AHBFreq_Value,APB1CLKDivider,APB1Freq_Value,APB1TimFreq_Value,APB2CLKDivider,APB2Freq_Value,APB2TimFreq_Value,CortexFreq_Value,EthernetFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI_VALUE,I2SClocksFreq_Value,LSI_VALUE,MCO2PinFreq_Value,PLLCLKFreq_Value,PLLM,PLLN,PLLQCLKFreq_Value,RTCFreq_Value,RTCHSEDivFreq_Value,SYSCLKFreq_VALUE,SYSCLKSource,VCOI2SOutputFreq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,VcooutputI2S +RCC.IPParameters=48MHZClocksFreq_Value,AHBFreq_Value,APB1CLKDivider,APB1Freq_Value,APB1TimFreq_Value,APB2CLKDivider,APB2Freq_Value,APB2TimFreq_Value,CortexFreq_Value,EthernetFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI_VALUE,I2SClocksFreq_Value,LSI_VALUE,MCO2PinFreq_Value,PLLCLKFreq_Value,PLLM,PLLN,PLLQ,PLLQCLKFreq_Value,RTCFreq_Value,RTCHSEDivFreq_Value,SYSCLKFreq_VALUE,SYSCLKSource,VCOI2SOutputFreq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,VcooutputI2S RCC.LSI_VALUE=32000 RCC.MCO2PinFreq_Value=168000000 RCC.PLLCLKFreq_Value=168000000 RCC.PLLM=8 RCC.PLLN=168 -RCC.PLLQCLKFreq_Value=84000000 +RCC.PLLQ=7 +RCC.PLLQCLKFreq_Value=48000000 RCC.RTCFreq_Value=32000 RCC.RTCHSEDivFreq_Value=4000000 RCC.SYSCLKFreq_VALUE=168000000 @@ -120,6 +162,11 @@ RCC.VCOI2SOutputFreq_Value=384000000 RCC.VCOInputFreq_Value=2000000 RCC.VCOOutputFreq_Value=336000000 RCC.VcooutputI2S=192000000 +SPI1.CalculateBaudRate=42.0 MBits/s +SPI1.Direction=SPI_DIRECTION_2LINES +SPI1.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate +SPI1.Mode=SPI_MODE_MASTER +SPI1.VirtualType=VM_MASTER USART1.IPParameters=VirtualMode USART1.VirtualMode=VM_ASYNC VP_SYS_VS_Systick.Mode=SysTick diff --git a/bsp/stm32/stm32f407-micu/board/CubeMX_Config/Inc/main.h b/bsp/stm32/stm32f407-micu/board/CubeMX_Config/Inc/main.h index 9e6ffde782c..89966ab59b4 100644 --- a/bsp/stm32/stm32f407-micu/board/CubeMX_Config/Inc/main.h +++ b/bsp/stm32/stm32f407-micu/board/CubeMX_Config/Inc/main.h @@ -57,6 +57,8 @@ void Error_Handler(void); /* USER CODE END EFP */ /* Private defines -----------------------------------------------------------*/ +#define SPI1_CS_Pin GPIO_PIN_4 +#define SPI1_CS_GPIO_Port GPIOA /* USER CODE BEGIN Private defines */ diff --git a/bsp/stm32/stm32f407-micu/board/CubeMX_Config/Inc/stm32f4xx_hal_conf.h b/bsp/stm32/stm32f407-micu/board/CubeMX_Config/Inc/stm32f4xx_hal_conf.h index cc2b19510bb..c7a458a8acb 100644 --- a/bsp/stm32/stm32f407-micu/board/CubeMX_Config/Inc/stm32f4xx_hal_conf.h +++ b/bsp/stm32/stm32f407-micu/board/CubeMX_Config/Inc/stm32f4xx_hal_conf.h @@ -53,16 +53,16 @@ extern "C" { /* #define HAL_SRAM_MODULE_ENABLED */ /* #define HAL_SDRAM_MODULE_ENABLED */ /* #define HAL_HASH_MODULE_ENABLED */ -/* #define HAL_I2C_MODULE_ENABLED */ +#define HAL_I2C_MODULE_ENABLED /* #define HAL_I2S_MODULE_ENABLED */ /* #define HAL_IWDG_MODULE_ENABLED */ /* #define HAL_LTDC_MODULE_ENABLED */ /* #define HAL_RNG_MODULE_ENABLED */ /* #define HAL_RTC_MODULE_ENABLED */ /* #define HAL_SAI_MODULE_ENABLED */ -/* #define HAL_SD_MODULE_ENABLED */ +#define HAL_SD_MODULE_ENABLED /* #define HAL_MMC_MODULE_ENABLED */ -/* #define HAL_SPI_MODULE_ENABLED */ +#define HAL_SPI_MODULE_ENABLED /* #define HAL_TIM_MODULE_ENABLED */ #define HAL_UART_MODULE_ENABLED /* #define HAL_USART_MODULE_ENABLED */ diff --git a/bsp/stm32/stm32f407-micu/board/CubeMX_Config/Src/main.c b/bsp/stm32/stm32f407-micu/board/CubeMX_Config/Src/main.c index 2b79858c7ef..97f9400b2c9 100644 --- a/bsp/stm32/stm32f407-micu/board/CubeMX_Config/Src/main.c +++ b/bsp/stm32/stm32f407-micu/board/CubeMX_Config/Src/main.c @@ -40,6 +40,12 @@ /* USER CODE END PM */ /* Private variables ---------------------------------------------------------*/ +I2C_HandleTypeDef hi2c1; + +SD_HandleTypeDef hsd; + +SPI_HandleTypeDef hspi1; + UART_HandleTypeDef huart1; /* USER CODE BEGIN PV */ @@ -50,6 +56,9 @@ UART_HandleTypeDef huart1; void SystemClock_Config(void); static void MX_GPIO_Init(void); static void MX_USART1_UART_Init(void); +static void MX_SPI1_Init(void); +static void MX_SDIO_SD_Init(void); +static void MX_I2C1_Init(void); /* USER CODE BEGIN PFP */ /* USER CODE END PFP */ @@ -89,6 +98,9 @@ int main(void) /* Initialize all configured peripherals */ MX_GPIO_Init(); MX_USART1_UART_Init(); + MX_SPI1_Init(); + MX_SDIO_SD_Init(); + MX_I2C1_Init(); /* USER CODE BEGIN 2 */ /* USER CODE END 2 */ @@ -129,7 +141,7 @@ void SystemClock_Config(void) RCC_OscInitStruct.PLL.PLLM = 8; RCC_OscInitStruct.PLL.PLLN = 168; RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2; - RCC_OscInitStruct.PLL.PLLQ = 4; + RCC_OscInitStruct.PLL.PLLQ = 7; if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) { Error_Handler(); @@ -150,6 +162,114 @@ void SystemClock_Config(void) } } +/** + * @brief I2C1 Initialization Function + * @param None + * @retval None + */ +static void MX_I2C1_Init(void) +{ + + /* USER CODE BEGIN I2C1_Init 0 */ + + /* USER CODE END I2C1_Init 0 */ + + /* USER CODE BEGIN I2C1_Init 1 */ + + /* USER CODE END I2C1_Init 1 */ + hi2c1.Instance = I2C1; + hi2c1.Init.ClockSpeed = 100000; + hi2c1.Init.DutyCycle = I2C_DUTYCYCLE_2; + hi2c1.Init.OwnAddress1 = 0; + hi2c1.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT; + hi2c1.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE; + hi2c1.Init.OwnAddress2 = 0; + hi2c1.Init.GeneralCallMode = I2C_GENERALCALL_DISABLE; + hi2c1.Init.NoStretchMode = I2C_NOSTRETCH_DISABLE; + if (HAL_I2C_Init(&hi2c1) != HAL_OK) + { + Error_Handler(); + } + /* USER CODE BEGIN I2C1_Init 2 */ + + /* USER CODE END I2C1_Init 2 */ + +} + +/** + * @brief SDIO Initialization Function + * @param None + * @retval None + */ +static void MX_SDIO_SD_Init(void) +{ + + /* USER CODE BEGIN SDIO_Init 0 */ + + /* USER CODE END SDIO_Init 0 */ + + /* USER CODE BEGIN SDIO_Init 1 */ + + /* USER CODE END SDIO_Init 1 */ + hsd.Instance = SDIO; + hsd.Init.ClockEdge = SDIO_CLOCK_EDGE_RISING; + hsd.Init.ClockBypass = SDIO_CLOCK_BYPASS_DISABLE; + hsd.Init.ClockPowerSave = SDIO_CLOCK_POWER_SAVE_DISABLE; + hsd.Init.BusWide = SDIO_BUS_WIDE_1B; + hsd.Init.HardwareFlowControl = SDIO_HARDWARE_FLOW_CONTROL_DISABLE; + hsd.Init.ClockDiv = 0; + if (HAL_SD_Init(&hsd) != HAL_OK) + { + Error_Handler(); + } + if (HAL_SD_ConfigWideBusOperation(&hsd, SDIO_BUS_WIDE_4B) != HAL_OK) + { + Error_Handler(); + } + /* USER CODE BEGIN SDIO_Init 2 */ + + /* USER CODE END SDIO_Init 2 */ + +} + +/** + * @brief SPI1 Initialization Function + * @param None + * @retval None + */ +static void MX_SPI1_Init(void) +{ + + /* USER CODE BEGIN SPI1_Init 0 */ + + /* USER CODE END SPI1_Init 0 */ + + /* USER CODE BEGIN SPI1_Init 1 */ + + /* USER CODE END SPI1_Init 1 */ + /* SPI1 parameter configuration*/ + hspi1.Instance = SPI1; + hspi1.Init.Mode = SPI_MODE_MASTER; + hspi1.Init.Direction = SPI_DIRECTION_2LINES; + hspi1.Init.DataSize = SPI_DATASIZE_8BIT; + hspi1.Init.CLKPolarity = SPI_POLARITY_LOW; + hspi1.Init.CLKPhase = SPI_PHASE_1EDGE; + hspi1.Init.NSS = SPI_NSS_SOFT; + hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2; + hspi1.Init.FirstBit = SPI_FIRSTBIT_MSB; + hspi1.Init.TIMode = SPI_TIMODE_DISABLE; + hspi1.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE; + hspi1.Init.CRCPolynomial = 10; + if (HAL_SPI_Init(&hspi1) != HAL_OK) + { + Error_Handler(); + } + /* USER CODE BEGIN SPI1_Init 2 */ + + /* USER CODE END SPI1_Init 2 */ + +} + /** * @brief USART1 Initialization Function * @param None @@ -190,6 +310,7 @@ static void MX_USART1_UART_Init(void) */ static void MX_GPIO_Init(void) { + GPIO_InitTypeDef GPIO_InitStruct = {0}; /* USER CODE BEGIN MX_GPIO_Init_1 */ /* USER CODE END MX_GPIO_Init_1 */ @@ -198,6 +319,18 @@ static void MX_GPIO_Init(void) __HAL_RCC_GPIOC_CLK_ENABLE(); __HAL_RCC_GPIOH_CLK_ENABLE(); __HAL_RCC_GPIOA_CLK_ENABLE(); + __HAL_RCC_GPIOD_CLK_ENABLE(); + __HAL_RCC_GPIOB_CLK_ENABLE(); + + /*Configure GPIO pin Output Level */ + HAL_GPIO_WritePin(SPI1_CS_GPIO_Port, SPI1_CS_Pin, GPIO_PIN_RESET); + + /*Configure GPIO pin : SPI1_CS_Pin */ + GPIO_InitStruct.Pin = SPI1_CS_Pin; + GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + HAL_GPIO_Init(SPI1_CS_GPIO_Port, &GPIO_InitStruct); /* USER CODE BEGIN MX_GPIO_Init_2 */ diff --git a/bsp/stm32/stm32f407-micu/board/CubeMX_Config/Src/stm32f4xx_hal_msp.c b/bsp/stm32/stm32f407-micu/board/CubeMX_Config/Src/stm32f4xx_hal_msp.c index 414f41716b6..00a559acdea 100644 --- a/bsp/stm32/stm32f407-micu/board/CubeMX_Config/Src/stm32f4xx_hal_msp.c +++ b/bsp/stm32/stm32f407-micu/board/CubeMX_Config/Src/stm32f4xx_hal_msp.c @@ -21,7 +21,7 @@ /* Includes ------------------------------------------------------------------*/ #include "main.h" /* USER CODE BEGIN Includes */ -#include + /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ @@ -77,6 +77,228 @@ void HAL_MspInit(void) /* USER CODE END MspInit 1 */ } +/** + * @brief I2C MSP Initialization + * This function configures the hardware resources used in this example + * @param hi2c: I2C handle pointer + * @retval None + */ +void HAL_I2C_MspInit(I2C_HandleTypeDef* hi2c) +{ + GPIO_InitTypeDef GPIO_InitStruct = {0}; + if (hi2c->Instance == I2C1) + { + /* USER CODE BEGIN I2C1_MspInit 0 */ + + /* USER CODE END I2C1_MspInit 0 */ + + __HAL_RCC_GPIOB_CLK_ENABLE(); + /**I2C1 GPIO Configuration + PB6 ------> I2C1_SCL + PB7 ------> I2C1_SDA + */ + GPIO_InitStruct.Pin = GPIO_PIN_6 | GPIO_PIN_7; + GPIO_InitStruct.Mode = GPIO_MODE_AF_OD; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + GPIO_InitStruct.Alternate = GPIO_AF4_I2C1; + HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); + + /* Peripheral clock enable */ + __HAL_RCC_I2C1_CLK_ENABLE(); + /* USER CODE BEGIN I2C1_MspInit 1 */ + + /* USER CODE END I2C1_MspInit 1 */ + + } + +} + +/** + * @brief I2C MSP De-Initialization + * This function freeze the hardware resources used in this example + * @param hi2c: I2C handle pointer + * @retval None + */ +void HAL_I2C_MspDeInit(I2C_HandleTypeDef* hi2c) +{ + if (hi2c->Instance == I2C1) + { + /* USER CODE BEGIN I2C1_MspDeInit 0 */ + + /* USER CODE END I2C1_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_I2C1_CLK_DISABLE(); + + /**I2C1 GPIO Configuration + PB6 ------> I2C1_SCL + PB7 ------> I2C1_SDA + */ + HAL_GPIO_DeInit(GPIOB, GPIO_PIN_6); + + HAL_GPIO_DeInit(GPIOB, GPIO_PIN_7); + + /* USER CODE BEGIN I2C1_MspDeInit 1 */ + + /* USER CODE END I2C1_MspDeInit 1 */ + } + +} + +/** + * @brief SD MSP Initialization + * This function configures the hardware resources used in this example + * @param hsd: SD handle pointer + * @retval None + */ +void HAL_SD_MspInit(SD_HandleTypeDef* hsd) +{ + GPIO_InitTypeDef GPIO_InitStruct = {0}; + if (hsd->Instance == SDIO) + { + /* USER CODE BEGIN SDIO_MspInit 0 */ + + /* USER CODE END SDIO_MspInit 0 */ + /* Peripheral clock enable */ + __HAL_RCC_SDIO_CLK_ENABLE(); + + __HAL_RCC_GPIOC_CLK_ENABLE(); + __HAL_RCC_GPIOD_CLK_ENABLE(); + /**SDIO GPIO Configuration + PC8 ------> SDIO_D0 + PC9 ------> SDIO_D1 + PC10 ------> SDIO_D2 + PC11 ------> SDIO_D3 + PC12 ------> SDIO_CK + PD2 ------> SDIO_CMD + */ + GPIO_InitStruct.Pin = GPIO_PIN_8 | GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_11 + | GPIO_PIN_12; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + GPIO_InitStruct.Alternate = GPIO_AF12_SDIO; + HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); + + GPIO_InitStruct.Pin = GPIO_PIN_2; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + GPIO_InitStruct.Alternate = GPIO_AF12_SDIO; + HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); + + /* USER CODE BEGIN SDIO_MspInit 1 */ + + /* USER CODE END SDIO_MspInit 1 */ + + } + +} + +/** + * @brief SD MSP De-Initialization + * This function freeze the hardware resources used in this example + * @param hsd: SD handle pointer + * @retval None + */ +void HAL_SD_MspDeInit(SD_HandleTypeDef* hsd) +{ + if (hsd->Instance == SDIO) + { + /* USER CODE BEGIN SDIO_MspDeInit 0 */ + + /* USER CODE END SDIO_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_SDIO_CLK_DISABLE(); + + /**SDIO GPIO Configuration + PC8 ------> SDIO_D0 + PC9 ------> SDIO_D1 + PC10 ------> SDIO_D2 + PC11 ------> SDIO_D3 + PC12 ------> SDIO_CK + PD2 ------> SDIO_CMD + */ + HAL_GPIO_DeInit(GPIOC, GPIO_PIN_8 | GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_11 + | GPIO_PIN_12); + + HAL_GPIO_DeInit(GPIOD, GPIO_PIN_2); + + /* USER CODE BEGIN SDIO_MspDeInit 1 */ + + /* USER CODE END SDIO_MspDeInit 1 */ + } + +} + +/** + * @brief SPI MSP Initialization + * This function configures the hardware resources used in this example + * @param hspi: SPI handle pointer + * @retval None + */ +void HAL_SPI_MspInit(SPI_HandleTypeDef* hspi) +{ + GPIO_InitTypeDef GPIO_InitStruct = {0}; + if (hspi->Instance == SPI1) + { + /* USER CODE BEGIN SPI1_MspInit 0 */ + + /* USER CODE END SPI1_MspInit 0 */ + /* Peripheral clock enable */ + __HAL_RCC_SPI1_CLK_ENABLE(); + + __HAL_RCC_GPIOA_CLK_ENABLE(); + /**SPI1 GPIO Configuration + PA5 ------> SPI1_SCK + PA6 ------> SPI1_MISO + PA7 ------> SPI1_MOSI + */ + GPIO_InitStruct.Pin = GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + GPIO_InitStruct.Alternate = GPIO_AF5_SPI1; + HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); + + /* USER CODE BEGIN SPI1_MspInit 1 */ + + /* USER CODE END SPI1_MspInit 1 */ + + } + +} + +/** + * @brief SPI MSP De-Initialization + * This function freeze the hardware resources used in this example + * @param hspi: SPI handle pointer + * @retval None + */ +void HAL_SPI_MspDeInit(SPI_HandleTypeDef* hspi) +{ + if (hspi->Instance == SPI1) + { + /* USER CODE BEGIN SPI1_MspDeInit 0 */ + + /* USER CODE END SPI1_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_SPI1_CLK_DISABLE(); + + /**SPI1 GPIO Configuration + PA5 ------> SPI1_SCK + PA6 ------> SPI1_MISO + PA7 ------> SPI1_MOSI + */ + HAL_GPIO_DeInit(GPIOA, GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7); + + /* USER CODE BEGIN SPI1_MspDeInit 1 */ + + /* USER CODE END SPI1_MspDeInit 1 */ + } + +} + /** * @brief UART MSP Initialization * This function configures the hardware resources used in this example diff --git a/bsp/stm32/stm32f407-micu/board/Kconfig b/bsp/stm32/stm32f407-micu/board/Kconfig index 4868ef934ae..5f82bb32a69 100644 --- a/bsp/stm32/stm32f407-micu/board/Kconfig +++ b/bsp/stm32/stm32f407-micu/board/Kconfig @@ -8,7 +8,20 @@ config SOC_STM32F407VE default y menu "Onboard Peripheral Drivers" - + config BSP_USING_VIRTUAL_USART + bool "Enable DAPLink USB-to-USART1 virtual port" + select BSP_USING_UART + select BSP_USING_UART1 + default y + config BSP_USING_ON_BOARD_FLASH + bool "Enable Onboard SPI Flash" + select BSP_USING_SPI + select BSP_USING_SPI1 + select BSP_SPI1_TX_USING_DMA + select BSP_SPI1_RX_USING_DMA + select RT_USING_DFS + select RT_USING_SFUD + default n endmenu menu "On-chip Peripheral Drivers" @@ -37,7 +50,41 @@ menu "On-chip Peripheral Drivers" depends on BSP_USING_UART1 && RT_SERIAL_USING_DMA default n endif + menuconfig BSP_USING_SPI + bool "Enable SPI BUS" + default n + select RT_USING_SPI + if BSP_USING_SPI + config BSP_USING_SPI1 + bool "Enable SPI1 BUS" + default n + + config BSP_SPI1_TX_USING_DMA + bool "Enable SPI1 TX DMA" + depends on BSP_USING_SPI1 + default n + + config BSP_SPI1_RX_USING_DMA + bool "Enable SPI1 RX DMA" + depends on BSP_USING_SPI1 + select BSP_SPI1_TX_USING_DMA + default n + + config BSP_USING_SPI2 + bool "Enable SPI2 BUS" + default n + + config BSP_SPI2_TX_USING_DMA + bool "Enable SPI2 TX DMA" + depends on BSP_USING_SPI2 + default n + config BSP_SPI2_RX_USING_DMA + bool "Enable SPI2 RX DMA" + depends on BSP_USING_SPI2 + select BSP_SPI2_TX_USING_DMA + default n + endif source "$(BSP_DIR)/../libraries/HAL_Drivers/drivers/Kconfig" endmenu diff --git a/bsp/stm32/stm32f407-micu/board/ports/SConscript b/bsp/stm32/stm32f407-micu/board/ports/SConscript new file mode 100644 index 00000000000..278584e2977 --- /dev/null +++ b/bsp/stm32/stm32f407-micu/board/ports/SConscript @@ -0,0 +1,22 @@ +import os +from building import * + +objs = [] +cwd = GetCurrentDir() + +# add general drivers +src = [] +path = [cwd] + + +if GetDepend(['BSP_USING_ON_BOARD_FLASH']): + src += Glob('spi_flash_init.c') +CPPDEFINES = ['STM32F407xx'] +group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) + +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + +Return('group') diff --git a/bsp/stm32/stm32f407-micu/board/ports/spi_flash_init.c b/bsp/stm32/stm32f407-micu/board/ports/spi_flash_init.c new file mode 100644 index 00000000000..d32756630ba --- /dev/null +++ b/bsp/stm32/stm32f407-micu/board/ports/spi_flash_init.c @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2018-11-27 SummerGift add spi flash port file + */ + +#include +#include "dev_spi_flash.h" +#include "dev_spi_flash_sfud.h" +#include +#include + +#if defined(BSP_USING_ON_BOARD_FLASH) + +static int rt_hw_spi_flash_init(void) +{ + __HAL_RCC_GPIOA_CLK_ENABLE(); + rt_hw_spi_device_attach("spi1", "spi10", GET_PIN(A, 4)); + + if (RT_NULL == rt_sfud_flash_probe("ZD25WQ32", "spi10")) + { + return -RT_ERROR; + } + + return RT_EOK; +} +INIT_COMPONENT_EXPORT(rt_hw_spi_flash_init); +#endif + diff --git a/bsp/stm32/stm32f407-micu/project.uvoptx b/bsp/stm32/stm32f407-micu/project.uvoptx index 8caf44f06a7..39d3c12841d 100644 --- a/bsp/stm32/stm32f407-micu/project.uvoptx +++ b/bsp/stm32/stm32f407-micu/project.uvoptx @@ -73,7 +73,7 @@ 0 - 0 + 1 0 1 @@ -188,7 +188,7 @@ Applications - 0 + 1 0 0 0 @@ -207,7 +207,7 @@ - Compiler + CPU 0 0 0 @@ -219,8 +219,8 @@ 0 0 0 - ..\..\..\components\libc\compilers\armlibc\syscall_mem.c - syscall_mem.c + ..\..\..\libcpu\arm\common\atomic_arm.c + atomic_arm.c 0 0 @@ -231,8 +231,8 @@ 0 0 0 - ..\..\..\components\libc\compilers\armlibc\syscalls.c - syscalls.c + ..\..\..\libcpu\arm\common\div0.c + div0.c 0 0 @@ -243,20 +243,20 @@ 0 0 0 - ..\..\..\components\libc\compilers\common\cctype.c - cctype.c + ..\..\..\libcpu\arm\common\showmem.c + showmem.c 0 0 2 5 - 1 + 2 0 0 0 - ..\..\..\components\libc\compilers\common\cstdlib.c - cstdlib.c + ..\..\..\libcpu\arm\cortex-m4\context_rvds.S + context_rvds.S 0 0 @@ -267,55 +267,55 @@ 0 0 0 - ..\..\..\components\libc\compilers\common\cstring.c - cstring.c + ..\..\..\libcpu\arm\cortex-m4\cpuport.c + cpuport.c 0 0 + + + + DeviceDrivers + 0 + 0 + 0 + 0 - 2 + 3 7 1 0 0 0 - ..\..\..\components\libc\compilers\common\ctime.c - ctime.c + ..\..\..\components\drivers\core\device.c + device.c 0 0 - 2 + 3 8 1 0 0 0 - ..\..\..\components\libc\compilers\common\cunistd.c - cunistd.c + ..\..\..\components\drivers\hwcrypto\hw_rng.c + hw_rng.c 0 0 - 2 + 3 9 1 0 0 0 - ..\..\..\components\libc\compilers\common\cwchar.c - cwchar.c + ..\..\..\components\drivers\hwcrypto\hwcrypto.c + hwcrypto.c 0 0 - - - - DeviceDrivers - 0 - 0 - 0 - 0 3 10 @@ -323,8 +323,8 @@ 0 0 0 - ..\..\..\components\drivers\core\device.c - device.c + ..\..\..\components\drivers\ipc\completion_comm.c + completion_comm.c 0 0 @@ -335,8 +335,8 @@ 0 0 0 - ..\..\..\components\drivers\hwcrypto\hw_rng.c - hw_rng.c + ..\..\..\components\drivers\ipc\completion_up.c + completion_up.c 0 0 @@ -347,8 +347,8 @@ 0 0 0 - ..\..\..\components\drivers\hwcrypto\hwcrypto.c - hwcrypto.c + ..\..\..\components\drivers\ipc\condvar.c + condvar.c 0 0 @@ -359,8 +359,8 @@ 0 0 0 - ..\..\..\components\drivers\ipc\completion_comm.c - completion_comm.c + ..\..\..\components\drivers\ipc\dataqueue.c + dataqueue.c 0 0 @@ -371,8 +371,8 @@ 0 0 0 - ..\..\..\components\drivers\ipc\completion_up.c - completion_up.c + ..\..\..\components\drivers\ipc\pipe.c + pipe.c 0 0 @@ -383,8 +383,8 @@ 0 0 0 - ..\..\..\components\drivers\ipc\condvar.c - condvar.c + ..\..\..\components\drivers\ipc\ringblk_buf.c + ringblk_buf.c 0 0 @@ -395,8 +395,8 @@ 0 0 0 - ..\..\..\components\drivers\ipc\dataqueue.c - dataqueue.c + ..\..\..\components\drivers\ipc\ringbuffer.c + ringbuffer.c 0 0 @@ -407,8 +407,8 @@ 0 0 0 - ..\..\..\components\drivers\ipc\pipe.c - pipe.c + ..\..\..\components\drivers\ipc\waitqueue.c + waitqueue.c 0 0 @@ -419,8 +419,8 @@ 0 0 0 - ..\..\..\components\drivers\ipc\ringblk_buf.c - ringblk_buf.c + ..\..\..\components\drivers\ipc\workqueue.c + workqueue.c 0 0 @@ -431,8 +431,8 @@ 0 0 0 - ..\..\..\components\drivers\ipc\ringbuffer.c - ringbuffer.c + ..\..\..\components\drivers\pin\dev_pin.c + dev_pin.c 0 0 @@ -443,8 +443,8 @@ 0 0 0 - ..\..\..\components\drivers\ipc\waitqueue.c - waitqueue.c + ..\..\..\components\drivers\serial\dev_serial.c + dev_serial.c 0 0 @@ -455,8 +455,8 @@ 0 0 0 - ..\..\..\components\drivers\ipc\workqueue.c - workqueue.c + ..\..\..\components\drivers\spi\dev_spi.c + dev_spi.c 0 0 @@ -467,8 +467,8 @@ 0 0 0 - ..\..\..\components\drivers\pin\dev_pin.c - dev_pin.c + ..\..\..\components\drivers\spi\dev_spi_core.c + dev_spi_core.c 0 0 @@ -479,43 +479,43 @@ 0 0 0 - ..\..\..\components\drivers\serial\dev_serial.c - dev_serial.c + ..\..\..\components\drivers\spi\dev_spi_flash_sfud.c + dev_spi_flash_sfud.c 0 0 - - - - Drivers - 0 - 0 - 0 - 0 - 4 + 3 24 1 0 0 0 - ..\libraries\HAL_Drivers\drivers\drv_crypto.c - drv_crypto.c + ..\..\..\components\drivers\spi\sfud\src\sfud.c + sfud.c 0 0 - 4 + 3 25 1 0 0 0 - ..\libraries\HAL_Drivers\drivers\drv_gpio.c - drv_gpio.c + ..\..\..\components\drivers\spi\sfud\src\sfud_sfdp.c + sfud_sfdp.c 0 0 + + + + Drivers + 0 + 0 + 0 + 0 4 26 @@ -523,8 +523,8 @@ 0 0 0 - ..\libraries\HAL_Drivers\drivers\drv_usart.c - drv_usart.c + ..\libraries\HAL_Drivers\drivers\drv_crypto.c + drv_crypto.c 0 0 @@ -535,8 +535,8 @@ 0 0 0 - ..\libraries\HAL_Drivers\drv_common.c - drv_common.c + ..\libraries\HAL_Drivers\drivers\drv_gpio.c + drv_gpio.c 0 0 @@ -547,8 +547,8 @@ 0 0 0 - board\CubeMX_Config\Src\stm32f4xx_hal_msp.c - stm32f4xx_hal_msp.c + ..\libraries\HAL_Drivers\drivers\drv_spi.c + drv_spi.c 0 0 @@ -559,55 +559,55 @@ 0 0 0 - board\board.c - board.c + ..\libraries\HAL_Drivers\drivers\drv_usart.c + drv_usart.c 0 0 - - - - Finsh - 0 - 0 - 0 - 0 - 5 + 4 30 1 0 0 0 - ..\..\..\components\finsh\msh.c - msh.c + ..\libraries\HAL_Drivers\drv_common.c + drv_common.c 0 0 - 5 + 4 31 1 0 0 0 - ..\..\..\components\finsh\msh_parse.c - msh_parse.c + board\CubeMX_Config\Src\stm32f4xx_hal_msp.c + stm32f4xx_hal_msp.c 0 0 - 5 + 4 32 1 0 0 0 - ..\..\..\components\finsh\shell.c - shell.c + board\board.c + board.c 0 0 + + + + Filesystem + 0 + 0 + 0 + 0 5 33 @@ -615,103 +615,103 @@ 0 0 0 - ..\..\..\components\finsh\cmd.c - cmd.c + ..\..\..\components\dfs\dfs_v1\filesystems\devfs\devfs.c + devfs.c 0 0 - - - - Kernel - 0 - 0 - 0 - 0 - 6 + 5 34 1 0 0 0 - ..\..\..\src\clock.c - clock.c + ..\..\..\components\dfs\dfs_v1\filesystems\elmfat\dfs_elm.c + dfs_elm.c 0 0 - 6 + 5 35 1 0 0 0 - ..\..\..\src\components.c - components.c + ..\..\..\components\dfs\dfs_v1\filesystems\elmfat\ff.c + ff.c 0 0 - 6 + 5 36 1 0 0 0 - ..\..\..\src\cpu_up.c - cpu_up.c + ..\..\..\components\dfs\dfs_v1\filesystems\elmfat\ffunicode.c + ffunicode.c 0 0 - 6 + 5 37 1 0 0 0 - ..\..\..\src\defunct.c - defunct.c + ..\..\..\components\dfs\dfs_v1\src\dfs.c + dfs.c 0 0 - 6 + 5 38 1 0 0 0 - ..\..\..\src\idle.c - idle.c + ..\..\..\components\dfs\dfs_v1\src\dfs_file.c + dfs_file.c 0 0 - 6 + 5 39 1 0 0 0 - ..\..\..\src\ipc.c - ipc.c + ..\..\..\components\dfs\dfs_v1\src\dfs_fs.c + dfs_fs.c 0 0 - 6 + 5 40 1 0 0 0 - ..\..\..\src\irq.c - irq.c + ..\..\..\components\dfs\dfs_v1\src\dfs_posix.c + dfs_posix.c 0 0 + + + + Finsh + 0 + 0 + 0 + 0 6 41 @@ -719,8 +719,8 @@ 0 0 0 - ..\..\..\src\kservice.c - kservice.c + ..\..\..\components\finsh\cmd.c + cmd.c 0 0 @@ -731,8 +731,8 @@ 0 0 0 - ..\..\..\src\mem.c - mem.c + ..\..\..\components\finsh\msh_file.c + msh_file.c 0 0 @@ -743,8 +743,8 @@ 0 0 0 - ..\..\..\src\mempool.c - mempool.c + ..\..\..\components\finsh\shell.c + shell.c 0 0 @@ -755,8 +755,8 @@ 0 0 0 - ..\..\..\src\object.c - object.c + ..\..\..\components\finsh\msh.c + msh.c 0 0 @@ -767,55 +767,55 @@ 0 0 0 - ..\..\..\src\scheduler_comm.c - scheduler_comm.c + ..\..\..\components\finsh\msh_parse.c + msh_parse.c 0 0 + + + + Kernel + 0 + 0 + 0 + 0 - 6 + 7 46 1 0 0 0 - ..\..\..\src\scheduler_up.c - scheduler_up.c + ..\..\..\src\clock.c + clock.c 0 0 - 6 + 7 47 1 0 0 0 - ..\..\..\src\thread.c - thread.c + ..\..\..\src\components.c + components.c 0 0 - 6 + 7 48 1 0 0 0 - ..\..\..\src\timer.c - timer.c + ..\..\..\src\cpu_up.c + cpu_up.c 0 0 - - - - klibc - 0 - 0 - 0 - 0 7 49 @@ -823,8 +823,8 @@ 0 0 0 - ..\..\..\src\klibc\rt_vsnprintf_tiny.c - rt_vsnprintf_tiny.c + ..\..\..\src\defunct.c + defunct.c 0 0 @@ -835,8 +835,8 @@ 0 0 0 - ..\..\..\src\klibc\kstdio.c - kstdio.c + ..\..\..\src\idle.c + idle.c 0 0 @@ -847,8 +847,8 @@ 0 0 0 - ..\..\..\src\klibc\kerrno.c - kerrno.c + ..\..\..\src\ipc.c + ipc.c 0 0 @@ -859,8 +859,8 @@ 0 0 0 - ..\..\..\src\klibc\kstring.c - kstring.c + ..\..\..\src\irq.c + irq.c 0 0 @@ -871,76 +871,256 @@ 0 0 0 - ..\..\..\src\klibc\rt_vsscanf.c - rt_vsscanf.c + ..\..\..\src\kservice.c + kservice.c + 0 + 0 + + + 7 + 54 + 1 + 0 + 0 + 0 + ..\..\..\src\mem.c + mem.c + 0 + 0 + + + 7 + 55 + 1 + 0 + 0 + 0 + ..\..\..\src\mempool.c + mempool.c + 0 + 0 + + + 7 + 56 + 1 + 0 + 0 + 0 + ..\..\..\src\object.c + object.c + 0 + 0 + + + 7 + 57 + 1 + 0 + 0 + 0 + ..\..\..\src\scheduler_comm.c + scheduler_comm.c + 0 + 0 + + + 7 + 58 + 1 + 0 + 0 + 0 + ..\..\..\src\scheduler_up.c + scheduler_up.c + 0 + 0 + + + 7 + 59 + 1 + 0 + 0 + 0 + ..\..\..\src\thread.c + thread.c + 0 + 0 + + + 7 + 60 + 1 + 0 + 0 + 0 + ..\..\..\src\timer.c + timer.c 0 0 - libcpu + Libc 0 0 0 0 8 - 54 + 61 1 0 0 0 - ..\..\..\libcpu\arm\common\atomic_arm.c - atomic_arm.c + ..\..\..\components\libc\compilers\armlibc\syscall_mem.c + syscall_mem.c 0 0 8 - 55 + 62 1 0 0 0 - ..\..\..\libcpu\arm\common\div0.c - div0.c + ..\..\..\components\libc\compilers\armlibc\syscalls.c + syscalls.c 0 0 8 - 56 + 63 1 0 0 0 - ..\..\..\libcpu\arm\common\showmem.c - showmem.c + ..\..\..\components\libc\compilers\common\cctype.c + cctype.c 0 0 8 - 57 - 2 + 64 + 1 0 0 0 - ..\..\..\libcpu\arm\cortex-m4\context_rvds.S - context_rvds.S + ..\..\..\components\libc\compilers\common\cstdlib.c + cstdlib.c 0 0 8 - 58 + 65 1 0 0 0 - ..\..\..\libcpu\arm\cortex-m4\cpuport.c - cpuport.c + ..\..\..\components\libc\compilers\common\cstring.c + cstring.c + 0 + 0 + + + 8 + 66 + 1 + 0 + 0 + 0 + ..\..\..\components\libc\compilers\common\ctime.c + ctime.c + 0 + 0 + + + 8 + 67 + 1 + 0 + 0 + 0 + ..\..\..\components\libc\compilers\common\cunistd.c + cunistd.c + 0 + 0 + + + 8 + 68 + 1 + 0 + 0 + 0 + ..\..\..\components\libc\compilers\common\cwchar.c + cwchar.c + 0 + 0 + + + 8 + 69 + 1 + 0 + 0 + 0 + ..\..\..\src\klibc\kerrno.c + kerrno.c + 0 + 0 + + + 8 + 70 + 1 + 0 + 0 + 0 + ..\..\..\src\klibc\kstdio.c + kstdio.c + 0 + 0 + + + 8 + 71 + 1 + 0 + 0 + 0 + ..\..\..\src\klibc\kstring.c + kstring.c + 0 + 0 + + + 8 + 72 + 1 + 0 + 0 + 0 + ..\..\..\src\klibc\rt_vsnprintf_tiny.c + rt_vsnprintf_tiny.c + 0 + 0 + + + 8 + 73 + 1 + 0 + 0 + 0 + ..\..\..\src\klibc\rt_vsscanf.c + rt_vsscanf.c 0 0 @@ -954,7 +1134,7 @@ 0 9 - 59 + 74 2 0 0 @@ -966,7 +1146,7 @@ 9 - 60 + 75 1 0 0 @@ -986,79 +1166,79 @@ 0 10 - 61 + 76 1 0 0 0 - packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_usart.c - stm32f4xx_hal_usart.c + packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_pwr_ex.c + stm32f4xx_hal_pwr_ex.c 0 0 10 - 62 + 77 1 0 0 0 - packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_crc.c - stm32f4xx_hal_crc.c + packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_spi.c + stm32f4xx_hal_spi.c 0 0 10 - 63 + 78 1 0 0 0 - packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_gpio.c - stm32f4xx_hal_gpio.c + packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_rng.c + stm32f4xx_hal_rng.c 0 0 10 - 64 + 79 1 0 0 0 - packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_cryp.c - stm32f4xx_hal_cryp.c + packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_cortex.c + stm32f4xx_hal_cortex.c 0 0 10 - 65 + 80 1 0 0 0 - packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_cec.c - stm32f4xx_hal_cec.c + packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_cryp.c + stm32f4xx_hal_cryp.c 0 0 10 - 66 + 81 1 0 0 0 - packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_cortex.c - stm32f4xx_hal_cortex.c + packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_cryp_ex.c + stm32f4xx_hal_cryp_ex.c 0 0 10 - 67 + 82 1 0 0 @@ -1070,55 +1250,67 @@ 10 - 68 + 83 1 0 0 0 - packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_rng.c - stm32f4xx_hal_rng.c + packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_rcc.c + stm32f4xx_hal_rcc.c 0 0 10 - 69 + 84 1 0 0 0 - packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_pwr_ex.c - stm32f4xx_hal_pwr_ex.c + packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_gpio.c + stm32f4xx_hal_gpio.c 0 0 10 - 70 + 85 1 0 0 0 - packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_rcc_ex.c - stm32f4xx_hal_rcc_ex.c + packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_dma.c + stm32f4xx_hal_dma.c 0 0 10 - 71 + 86 1 0 0 0 - packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_rcc.c - stm32f4xx_hal_rcc.c + packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_cec.c + stm32f4xx_hal_cec.c 0 0 10 - 72 + 87 + 1 + 0 + 0 + 0 + packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_crc.c + stm32f4xx_hal_crc.c + 0 + 0 + + + 10 + 88 1 0 0 @@ -1130,49 +1322,61 @@ 10 - 73 + 89 1 0 0 0 - packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_dma.c - stm32f4xx_hal_dma.c + packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_usart.c + stm32f4xx_hal_usart.c 0 0 10 - 74 + 90 1 0 0 0 - packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_cryp_ex.c - stm32f4xx_hal_cryp_ex.c + packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal.c + stm32f4xx_hal.c 0 0 10 - 75 + 91 1 0 0 0 - packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_dma_ex.c - stm32f4xx_hal_dma_ex.c + packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_rcc_ex.c + stm32f4xx_hal_rcc_ex.c 0 0 10 - 76 + 92 1 0 0 0 - packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal.c - stm32f4xx_hal.c + packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_qspi.c + stm32f4xx_hal_qspi.c + 0 + 0 + + + 10 + 93 + 1 + 0 + 0 + 0 + packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_dma_ex.c + stm32f4xx_hal_dma_ex.c 0 0 diff --git a/bsp/stm32/stm32f407-micu/project.uvprojx b/bsp/stm32/stm32f407-micu/project.uvprojx index 53ee540eeaf..fc95f933700 100644 --- a/bsp/stm32/stm32f407-micu/project.uvprojx +++ b/bsp/stm32/stm32f407-micu/project.uvprojx @@ -339,9 +339,9 @@ 0 - RT_USING_ARMLIBC, USE_HAL_DRIVER, RT_USING_LIBC, __RTTHREAD__, STM32F407xx, __CLK_TCK=RT_TICK_PER_SECOND, __STDC_LIMIT_MACROS + USE_HAL_DRIVER, RT_USING_LIBC, __CLK_TCK=RT_TICK_PER_SECOND, RT_USING_ARMLIBC, __RTTHREAD__, __STDC_LIMIT_MACROS, STM32F407xx - ..\..\..\components\libc\posix\io\epoll;..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\include;..\..\..\components\libc\posix\io\eventfd;..\..\..\components\libc\compilers\common\extension;applications;.;packages\CMSIS-Core-latest\Include;..\..\..\components\drivers\include;..\..\..\components\net\utest;..\..\..\components\drivers\include;..\..\..\components\drivers\smp_call;packages\stm32f4_hal_driver-latest\Inc;..\..\..\components\libc\posix\ipc;board;..\..\..\components\finsh;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\hwcrypto;..\..\..\libcpu\arm\common;..\libraries\HAL_Drivers\drivers;packages\stm32f4_hal_driver-latest\Inc\Legacy;packages\stm32f4_cmsis_driver-latest\Include;..\libraries\HAL_Drivers;..\..\..\components\libc\posix\io\poll;..\..\..\components\libc\compilers\common\include;board\CubeMX_Config\Inc;..\..\..\components\drivers\include;..\..\..\libcpu\arm\cortex-m4;..\libraries\HAL_Drivers\drivers\config;..\..\..\components\drivers\phy + ..\..\..\components\drivers\spi\sfud\inc;..\..\..\components\drivers\hwcrypto;..\..\..\components\drivers\include;board\CubeMX_Config\Inc;..\..\..\components\drivers\include;..\..\..\components\net\utest;..\..\..\libcpu\arm\common;..\..\..\components\drivers\include;packages\stm32f4_cmsis_driver-latest\Include;board;..\libraries\HAL_Drivers\drivers;..\libraries\HAL_Drivers;..\..\..\components\libc\posix\io\epoll;..\..\..\libcpu\arm\cortex-m4;board\ports;..\..\..\components\libc\posix\io\eventfd;applications;..\..\..\include;..\..\..\components\drivers\include;..\..\..\components\dfs\dfs_v1\include;..\..\..\components\finsh;..\..\..\components\drivers\smp_call;..\..\..\components\drivers\include;packages\stm32f4_hal_driver-latest\Inc;..\..\..\components\libc\compilers\common\include;..\..\..\components\dfs\dfs_v1\filesystems\elmfat;..\..\..\components\libc\compilers\common\extension;packages\CMSIS-Core-latest\Include;..\..\..\components\drivers\include;..\libraries\HAL_Drivers\drivers\config;packages\stm32f4_hal_driver-latest\Inc\Legacy;..\..\..\components\drivers\phy;..\..\..\components\dfs\dfs_v1\filesystems\devfs;..\..\..\components\libc\posix\ipc;..\..\..\components\libc\posix\io\poll;.;..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\components\drivers\spi @@ -393,57 +393,770 @@ - Compiler + CPU - syscall_mem.c + atomic_arm.c 1 - ..\..\..\components\libc\compilers\armlibc\syscall_mem.c + ..\..\..\libcpu\arm\common\atomic_arm.c - syscalls.c + div0.c 1 - ..\..\..\components\libc\compilers\armlibc\syscalls.c + ..\..\..\libcpu\arm\common\div0.c - cctype.c + showmem.c 1 - ..\..\..\components\libc\compilers\common\cctype.c + ..\..\..\libcpu\arm\common\showmem.c - cstdlib.c + context_rvds.S + 2 + ..\..\..\libcpu\arm\cortex-m4\context_rvds.S + + + cpuport.c 1 - ..\..\..\components\libc\compilers\common\cstdlib.c + ..\..\..\libcpu\arm\cortex-m4\cpuport.c + + + + DeviceDrivers + - cstring.c + device.c 1 - ..\..\..\components\libc\compilers\common\cstring.c + ..\..\..\components\drivers\core\device.c + + + 2 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 1 + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 0 + 0 + 2 + 2 + 2 + 2 + 2 + + --c99 + __RT_IPC_SOURCE__ + + + + + + - ctime.c + hw_rng.c 1 - ..\..\..\components\libc\compilers\common\ctime.c + ..\..\..\components\drivers\hwcrypto\hw_rng.c + + + 2 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 1 + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 0 + 0 + 2 + 2 + 2 + 2 + 2 + + --c99 + __RT_IPC_SOURCE__ + + + + + + - cunistd.c + hwcrypto.c 1 - ..\..\..\components\libc\compilers\common\cunistd.c + ..\..\..\components\drivers\hwcrypto\hwcrypto.c + + + 2 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 1 + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 0 + 0 + 2 + 2 + 2 + 2 + 2 + + --c99 + __RT_IPC_SOURCE__ + + + + + + - cwchar.c + completion_comm.c 1 - ..\..\..\components\libc\compilers\common\cwchar.c + ..\..\..\components\drivers\ipc\completion_comm.c + + + 2 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 1 + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 0 + 0 + 2 + 2 + 2 + 2 + 2 + + --c99 + __RT_IPC_SOURCE__ + + + + + + - - - - DeviceDrivers - - device.c + completion_up.c 1 - ..\..\..\components\drivers\core\device.c + ..\..\..\components\drivers\ipc\completion_up.c + + + 2 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 1 + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 0 + 0 + 2 + 2 + 2 + 2 + 2 + + --c99 + __RT_IPC_SOURCE__ + + + + + + + + + condvar.c + 1 + ..\..\..\components\drivers\ipc\condvar.c + + + 2 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 1 + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 0 + 0 + 2 + 2 + 2 + 2 + 2 + + --c99 + __RT_IPC_SOURCE__ + + + + + + + + + dataqueue.c + 1 + ..\..\..\components\drivers\ipc\dataqueue.c + + + 2 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 1 + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 0 + 0 + 2 + 2 + 2 + 2 + 2 + + --c99 + __RT_IPC_SOURCE__ + + + + + + + + + pipe.c + 1 + ..\..\..\components\drivers\ipc\pipe.c + + + 2 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 1 + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 0 + 0 + 2 + 2 + 2 + 2 + 2 + + --c99 + __RT_IPC_SOURCE__ + + + + + + + + + ringblk_buf.c + 1 + ..\..\..\components\drivers\ipc\ringblk_buf.c + + + 2 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 1 + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 0 + 0 + 2 + 2 + 2 + 2 + 2 + + --c99 + __RT_IPC_SOURCE__ + + + + + + + + + ringbuffer.c + 1 + ..\..\..\components\drivers\ipc\ringbuffer.c + + + 2 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 1 + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 0 + 0 + 2 + 2 + 2 + 2 + 2 + + --c99 + __RT_IPC_SOURCE__ + + + + + + + + + waitqueue.c + 1 + ..\..\..\components\drivers\ipc\waitqueue.c + + + 2 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 1 + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 0 + 0 + 2 + 2 + 2 + 2 + 2 + + --c99 + __RT_IPC_SOURCE__ + + + + + + + + + workqueue.c + 1 + ..\..\..\components\drivers\ipc\workqueue.c + + + 2 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 1 + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 0 + 0 + 2 + 2 + 2 + 2 + 2 + + --c99 + __RT_IPC_SOURCE__ + + + + + + + + + dev_pin.c + 1 + ..\..\..\components\drivers\pin\dev_pin.c + + + 2 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 1 + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 0 + 0 + 2 + 2 + 2 + 2 + 2 + + --c99 + __RT_IPC_SOURCE__ + + + + + + + + + dev_serial.c + 1 + ..\..\..\components\drivers\serial\dev_serial.c 2 @@ -487,7 +1200,7 @@ 2 2 - + --c99 __RT_IPC_SOURCE__ @@ -497,9 +1210,9 @@ - hw_rng.c + dev_spi.c 1 - ..\..\..\components\drivers\hwcrypto\hw_rng.c + ..\..\..\components\drivers\spi\dev_spi.c 2 @@ -543,7 +1256,7 @@ 2 2 - + --c99 __RT_IPC_SOURCE__ @@ -553,9 +1266,9 @@ - hwcrypto.c + dev_spi_core.c 1 - ..\..\..\components\drivers\hwcrypto\hwcrypto.c + ..\..\..\components\drivers\spi\dev_spi_core.c 2 @@ -599,7 +1312,7 @@ 2 2 - + --c99 __RT_IPC_SOURCE__ @@ -609,9 +1322,9 @@ - completion_comm.c + dev_spi_flash_sfud.c 1 - ..\..\..\components\drivers\ipc\completion_comm.c + ..\..\..\components\drivers\spi\dev_spi_flash_sfud.c 2 @@ -655,7 +1368,7 @@ 2 2 - + --c99 __RT_IPC_SOURCE__ @@ -665,9 +1378,9 @@ - completion_up.c + sfud.c 1 - ..\..\..\components\drivers\ipc\completion_up.c + ..\..\..\components\drivers\spi\sfud\src\sfud.c 2 @@ -711,7 +1424,7 @@ 2 2 - + --c99 __RT_IPC_SOURCE__ @@ -721,9 +1434,9 @@ - condvar.c + sfud_sfdp.c 1 - ..\..\..\components\drivers\ipc\condvar.c + ..\..\..\components\drivers\spi\sfud\src\sfud_sfdp.c 2 @@ -767,7 +1480,7 @@ 2 2 - + --c99 __RT_IPC_SOURCE__ @@ -776,10 +1489,55 @@ + + + + Drivers + - dataqueue.c + drv_crypto.c 1 - ..\..\..\components\drivers\ipc\dataqueue.c + ..\libraries\HAL_Drivers\drivers\drv_crypto.c + + + drv_gpio.c + 1 + ..\libraries\HAL_Drivers\drivers\drv_gpio.c + + + drv_spi.c + 1 + ..\libraries\HAL_Drivers\drivers\drv_spi.c + + + drv_usart.c + 1 + ..\libraries\HAL_Drivers\drivers\drv_usart.c + + + drv_common.c + 1 + ..\libraries\HAL_Drivers\drv_common.c + + + stm32f4xx_hal_msp.c + 1 + board\CubeMX_Config\Src\stm32f4xx_hal_msp.c + + + board.c + 1 + board\board.c + + + + + Filesystem + + + devfs.c + 1 + ..\..\..\components\dfs\dfs_v1\filesystems\devfs\devfs.c 2 @@ -823,8 +1581,8 @@ 2 2 - - __RT_IPC_SOURCE__ + --c99 + @@ -833,9 +1591,9 @@ - pipe.c + dfs_elm.c 1 - ..\..\..\components\drivers\ipc\pipe.c + ..\..\..\components\dfs\dfs_v1\filesystems\elmfat\dfs_elm.c 2 @@ -879,8 +1637,8 @@ 2 2 - - __RT_IPC_SOURCE__ + --c99 + @@ -889,9 +1647,9 @@ - ringblk_buf.c + ff.c 1 - ..\..\..\components\drivers\ipc\ringblk_buf.c + ..\..\..\components\dfs\dfs_v1\filesystems\elmfat\ff.c 2 @@ -935,8 +1693,8 @@ 2 2 - - __RT_IPC_SOURCE__ + --c99 + @@ -945,9 +1703,9 @@ - ringbuffer.c + ffunicode.c 1 - ..\..\..\components\drivers\ipc\ringbuffer.c + ..\..\..\components\dfs\dfs_v1\filesystems\elmfat\ffunicode.c 2 @@ -991,8 +1749,8 @@ 2 2 - - __RT_IPC_SOURCE__ + --c99 + @@ -1001,9 +1759,9 @@ - waitqueue.c + dfs.c 1 - ..\..\..\components\drivers\ipc\waitqueue.c + ..\..\..\components\dfs\dfs_v1\src\dfs.c 2 @@ -1047,8 +1805,8 @@ 2 2 - - __RT_IPC_SOURCE__ + --c99 + @@ -1057,9 +1815,9 @@ - workqueue.c + dfs_file.c 1 - ..\..\..\components\drivers\ipc\workqueue.c + ..\..\..\components\dfs\dfs_v1\src\dfs_file.c 2 @@ -1103,8 +1861,8 @@ 2 2 - - __RT_IPC_SOURCE__ + --c99 + @@ -1113,9 +1871,9 @@ - dev_pin.c + dfs_fs.c 1 - ..\..\..\components\drivers\pin\dev_pin.c + ..\..\..\components\dfs\dfs_v1\src\dfs_fs.c 2 @@ -1159,8 +1917,8 @@ 2 2 - - __RT_IPC_SOURCE__ + --c99 + @@ -1169,9 +1927,9 @@ - dev_serial.c + dfs_posix.c 1 - ..\..\..\components\drivers\serial\dev_serial.c + ..\..\..\components\dfs\dfs_v1\src\dfs_posix.c 2 @@ -1215,8 +1973,8 @@ 2 2 - - __RT_IPC_SOURCE__ + --c99 + @@ -1227,43 +1985,23 @@ - Drivers + Finsh - drv_crypto.c - 1 - ..\libraries\HAL_Drivers\drivers\drv_crypto.c - - - drv_gpio.c - 1 - ..\libraries\HAL_Drivers\drivers\drv_gpio.c - - - drv_usart.c - 1 - ..\libraries\HAL_Drivers\drivers\drv_usart.c - - - drv_common.c + cmd.c 1 - ..\libraries\HAL_Drivers\drv_common.c + ..\..\..\components\finsh\cmd.c - stm32f4xx_hal_msp.c + msh_file.c 1 - board\CubeMX_Config\Src\stm32f4xx_hal_msp.c + ..\..\..\components\finsh\msh_file.c - board.c + shell.c 1 - board\board.c + ..\..\..\components\finsh\shell.c - - - - Finsh - msh.c 1 @@ -1274,16 +2012,6 @@ 1 ..\..\..\components\finsh\msh_parse.c - - shell.c - 1 - ..\..\..\components\finsh\shell.c - - - cmd.c - 1 - ..\..\..\components\finsh\cmd.c - @@ -2132,62 +2860,72 @@ - klibc + Libc - rt_vsnprintf_tiny.c + syscall_mem.c 1 - ..\..\..\src\klibc\rt_vsnprintf_tiny.c + ..\..\..\components\libc\compilers\armlibc\syscall_mem.c - kstdio.c + syscalls.c 1 - ..\..\..\src\klibc\kstdio.c + ..\..\..\components\libc\compilers\armlibc\syscalls.c - kerrno.c + cctype.c 1 - ..\..\..\src\klibc\kerrno.c + ..\..\..\components\libc\compilers\common\cctype.c - kstring.c + cstdlib.c 1 - ..\..\..\src\klibc\kstring.c + ..\..\..\components\libc\compilers\common\cstdlib.c - rt_vsscanf.c + cstring.c 1 - ..\..\..\src\klibc\rt_vsscanf.c + ..\..\..\components\libc\compilers\common\cstring.c - - - - libcpu - - atomic_arm.c + ctime.c 1 - ..\..\..\libcpu\arm\common\atomic_arm.c + ..\..\..\components\libc\compilers\common\ctime.c - div0.c + cunistd.c 1 - ..\..\..\libcpu\arm\common\div0.c + ..\..\..\components\libc\compilers\common\cunistd.c - showmem.c + cwchar.c 1 - ..\..\..\libcpu\arm\common\showmem.c + ..\..\..\components\libc\compilers\common\cwchar.c - context_rvds.S - 2 - ..\..\..\libcpu\arm\cortex-m4\context_rvds.S + kerrno.c + 1 + ..\..\..\src\klibc\kerrno.c - cpuport.c + kstdio.c 1 - ..\..\..\libcpu\arm\cortex-m4\cpuport.c + ..\..\..\src\klibc\kstdio.c + + + kstring.c + 1 + ..\..\..\src\klibc\kstring.c + + + rt_vsnprintf_tiny.c + 1 + ..\..\..\src\klibc\rt_vsnprintf_tiny.c + + + rt_vsscanf.c + 1 + ..\..\..\src\klibc\rt_vsscanf.c @@ -2210,34 +2948,34 @@ STM32F4-HAL - stm32f4xx_hal_usart.c + stm32f4xx_hal_pwr_ex.c 1 - packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_usart.c + packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_pwr_ex.c - stm32f4xx_hal_crc.c + stm32f4xx_hal_spi.c 1 - packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_crc.c + packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_spi.c - stm32f4xx_hal_gpio.c + stm32f4xx_hal_rng.c 1 - packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_gpio.c + packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_rng.c - stm32f4xx_hal_cryp.c + stm32f4xx_hal_cortex.c 1 - packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_cryp.c + packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_cortex.c - stm32f4xx_hal_cec.c + stm32f4xx_hal_cryp.c 1 - packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_cec.c + packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_cryp.c - stm32f4xx_hal_cortex.c + stm32f4xx_hal_cryp_ex.c 1 - packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_cortex.c + packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_cryp_ex.c stm32f4xx_hal_pwr.c @@ -2245,24 +2983,29 @@ packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_pwr.c - stm32f4xx_hal_rng.c + stm32f4xx_hal_rcc.c 1 - packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_rng.c + packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_rcc.c - stm32f4xx_hal_pwr_ex.c + stm32f4xx_hal_gpio.c 1 - packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_pwr_ex.c + packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_gpio.c - stm32f4xx_hal_rcc_ex.c + stm32f4xx_hal_dma.c 1 - packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_rcc_ex.c + packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_dma.c - stm32f4xx_hal_rcc.c + stm32f4xx_hal_cec.c 1 - packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_rcc.c + packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_cec.c + + + stm32f4xx_hal_crc.c + 1 + packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_crc.c stm32f4xx_hal_uart.c @@ -2270,24 +3013,29 @@ packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_uart.c - stm32f4xx_hal_dma.c + stm32f4xx_hal_usart.c 1 - packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_dma.c + packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_usart.c - stm32f4xx_hal_cryp_ex.c + stm32f4xx_hal.c 1 - packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_cryp_ex.c + packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal.c - stm32f4xx_hal_dma_ex.c + stm32f4xx_hal_rcc_ex.c 1 - packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_dma_ex.c + packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_rcc_ex.c - stm32f4xx_hal.c + stm32f4xx_hal_qspi.c 1 - packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal.c + packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_qspi.c + + + stm32f4xx_hal_dma_ex.c + 1 + packages\stm32f4_hal_driver-latest\Src\stm32f4xx_hal_dma_ex.c diff --git a/bsp/stm32/stm32f407-micu/rtconfig.h b/bsp/stm32/stm32f407-micu/rtconfig.h index ea79e321862..14c995386d2 100644 --- a/bsp/stm32/stm32f407-micu/rtconfig.h +++ b/bsp/stm32/stm32f407-micu/rtconfig.h @@ -134,6 +134,30 @@ /* DFS: device virtual file system */ +#define RT_USING_DFS +#define DFS_USING_POSIX +#define DFS_USING_WORKDIR +#define DFS_FD_MAX 16 +#define RT_USING_DFS_V1 +#define DFS_FILESYSTEMS_MAX 4 +#define DFS_FILESYSTEM_TYPES_MAX 4 +#define RT_USING_DFS_ELMFAT + +/* elm-chan's FatFs, Generic FAT Filesystem Module */ + +#define RT_DFS_ELM_CODE_PAGE 437 +#define RT_DFS_ELM_WORD_ACCESS +#define RT_DFS_ELM_USE_LFN_3 +#define RT_DFS_ELM_USE_LFN 3 +#define RT_DFS_ELM_LFN_UNICODE_0 +#define RT_DFS_ELM_LFN_UNICODE 0 +#define RT_DFS_ELM_MAX_LFN 255 +#define RT_DFS_ELM_DRIVES 2 +#define RT_DFS_ELM_MAX_SECTOR_SIZE 512 +#define RT_DFS_ELM_REENTRANT +#define RT_DFS_ELM_MUTEX_TIMEOUT 3000 +/* end of elm-chan's FatFs, Generic FAT Filesystem Module */ +#define RT_USING_DFS_DEVFS /* end of DFS: device virtual file system */ /* Device Drivers */ @@ -144,8 +168,14 @@ #define RT_USING_SERIAL_V1 #define RT_SERIAL_USING_DMA #define RT_SERIAL_RB_BUFSZ 64 +#define RT_USING_SPI +#define RT_USING_SPI_ISR +#define RT_USING_SFUD +#define RT_SFUD_USING_SFDP +#define RT_SFUD_USING_FLASH_INFO_TABLE +#define RT_SFUD_SPI_MAX_HZ 50000000 #define RT_USING_HWCRYPTO -#define RT_HWCRYPTO_DEFAULT_NAME "hwcrypto" +#define RT_HWCRYPTO_DEFAULT_NAME "hwcryto" #define RT_HWCRYPTO_IV_MAX_SIZE 16 #define RT_HWCRYPTO_KEYBIT_MAX_SIZE 256 #define RT_HWCRYPTO_USING_RNG @@ -417,6 +447,9 @@ /* Onboard Peripheral Drivers */ +#define BSP_USING_VIRTUAL_USART +/* end of Onboard Peripheral Drivers */ + /* On-chip Peripheral Drivers */ #define BSP_USING_GPIO