diff --git a/bsp/stm32f429-apollo/.config b/bsp/stm32f429-apollo/.config index 4ba8230dd..6e19a928f 100644 --- a/bsp/stm32f429-apollo/.config +++ b/bsp/stm32f429-apollo/.config @@ -72,7 +72,26 @@ CONFIG_FINSH_DEFAULT_PASSWORD="rtthread" # # Device virtual file system # -# CONFIG_RT_USING_DFS is not set +CONFIG_RT_USING_DFS=y +# CONFIG_DFS_USING_WORKDIR is not set +CONFIG_DFS_FILESYSTEMS_MAX=4 +CONFIG_DFS_FD_MAX=16 +CONFIG_RT_USING_DFS_ELMFAT=y +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_MAX_LFN=255 +CONFIG_RT_DFS_ELM_DRIVES=2 +CONFIG_RT_DFS_ELM_MAX_SECTOR_SIZE=4096 +# CONFIG_RT_DFS_ELM_USE_ERASE is not set +CONFIG_RT_DFS_ELM_REENTRANT=y +CONFIG_RT_USING_DFS_DEVFS=y +# CONFIG_RT_USING_DFS_NET is not set +# CONFIG_RT_USING_DFS_NFS is not set # # Device Drivers @@ -88,9 +107,12 @@ CONFIG_RT_USING_I2C_BITOPS=y CONFIG_RT_USING_MTD_NAND=y CONFIG_RT_MTD_NAND_DEBUG=y CONFIG_RT_USING_RTC=y -# CONFIG_RT_USING_SDIO is not set +CONFIG_RT_USING_SDIO=y CONFIG_RT_USING_SPI=y -# CONFIG_RT_USING_SFUD 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_DEBUG=y # CONFIG_RT_USING_W25QXX is not set # CONFIG_RT_USING_GD is not set # CONFIG_RT_USING_ENC28J60 is not set diff --git a/bsp/stm32f429-apollo/drivers/drv_nand.h b/bsp/stm32f429-apollo/drivers/drv_nand.h index 8fba15ed9..b55755ec3 100644 --- a/bsp/stm32f429-apollo/drivers/drv_nand.h +++ b/bsp/stm32f429-apollo/drivers/drv_nand.h @@ -108,7 +108,7 @@ uint8_t NAND_ModeSet(uint8_t mode); uint32_t NAND_ReadID(void); uint8_t NAND_ReadStatus(void); uint8_t NAND_WaitForReady(void); -static rt_uint8_t nand_reset(void); +//static rt_uint8_t nand_reset(void); uint8_t NAND_WaitRB(__IO uint8_t rb); void NAND_Delay(volatile rt_uint32_t i); uint8_t NAND_ReadPage(uint32_t PageNum,uint16_t ColNum,uint8_t *pBuffer,uint16_t NumByteToRead); diff --git a/bsp/stm32f429-apollo/drivers/drv_sdio_sd.c b/bsp/stm32f429-apollo/drivers/drv_sdio_sd.c index e1716be0d..e0ae1793d 100644 --- a/bsp/stm32f429-apollo/drivers/drv_sdio_sd.c +++ b/bsp/stm32f429-apollo/drivers/drv_sdio_sd.c @@ -10,7 +10,7 @@ DMA_HandleTypeDef SDTxDMAHandler,SDRxDMAHandler; //SD //SD卡初始化 //返回值:0 初始化正确;其他值,初始化错误 -rt_uint8_t SD_Init(void) + rt_uint8_t SD_Init(void) { rt_uint8_t SD_Error; diff --git a/bsp/stm32f429-apollo/rtconfig.h b/bsp/stm32f429-apollo/rtconfig.h index 8da6d0a1f..f8b3a5a6c 100644 --- a/bsp/stm32f429-apollo/rtconfig.h +++ b/bsp/stm32f429-apollo/rtconfig.h @@ -65,7 +65,26 @@ /* Device virtual file system */ -/* RT_USING_DFS is not set */ +#define RT_USING_DFS +/* DFS_USING_WORKDIR is not set */ +#define DFS_FILESYSTEMS_MAX 4 +#define DFS_FD_MAX 16 +#define RT_USING_DFS_ELMFAT +#define RT_DFS_ELM_CODE_PAGE 437 +#define RT_DFS_ELM_WORD_ACCESS +/* RT_DFS_ELM_USE_LFN_0 is not set */ +/* RT_DFS_ELM_USE_LFN_1 is not set */ +/* RT_DFS_ELM_USE_LFN_2 is not set */ +#define RT_DFS_ELM_USE_LFN_3 +#define RT_DFS_ELM_USE_LFN 3 +#define RT_DFS_ELM_MAX_LFN 255 +#define RT_DFS_ELM_DRIVES 2 +#define RT_DFS_ELM_MAX_SECTOR_SIZE 4096 +/* RT_DFS_ELM_USE_ERASE is not set */ +#define RT_DFS_ELM_REENTRANT +#define RT_USING_DFS_DEVFS +/* RT_USING_DFS_NET is not set */ +/* RT_USING_DFS_NFS is not set */ /* Device Drivers */ @@ -80,9 +99,12 @@ #define RT_USING_MTD_NAND #define RT_MTD_NAND_DEBUG #define RT_USING_RTC -/* RT_USING_SDIO is not set */ +#define RT_USING_SDIO #define RT_USING_SPI -/* RT_USING_SFUD is not set */ +#define RT_USING_SFUD +#define RT_SFUD_USING_SFDP +#define RT_SFUD_USING_FLASH_INFO_TABLE +#define RT_SFUD_DEBUG /* RT_USING_W25QXX is not set */ /* RT_USING_GD is not set */ /* RT_USING_ENC28J60 is not set */ diff --git a/bsp/stm32f429-apollo/template.uvoptx b/bsp/stm32f429-apollo/template.uvoptx index 513cf8178..ad7ef80f6 100644 --- a/bsp/stm32f429-apollo/template.uvoptx +++ b/bsp/stm32f429-apollo/template.uvoptx @@ -28,7 +28,7 @@ 12000000 - 0 + 1 1 0 1 @@ -77,7 +77,7 @@ 0 1 - 0 + 18 0 diff --git a/bsp/stm32f429-apollo/template.uvprojx b/bsp/stm32f429-apollo/template.uvprojx index 1d23fba5e..885574f66 100644 --- a/bsp/stm32f429-apollo/template.uvprojx +++ b/bsp/stm32f429-apollo/template.uvprojx @@ -256,17 +256,17 @@ 0x0 - 0 + 1 0x0 0x0 - 0 + 1 0x0 0x0 - 0 + 1 0x0 0x0 @@ -276,7 +276,7 @@ 0x100000 - 0 + 1 0x0 0x0 @@ -322,7 +322,7 @@ 2 0 0 - 0 + 1 0 1 1