resubmit [BSP][STM32][469-DISCO]Add flash sdram usb drivers
This commit is contained in:
parent
d212787bbb
commit
836ecef614
@ -105,34 +105,7 @@ CONFIG_FINSH_ARG_MAX=10
|
||||
#
|
||||
# Device virtual file system
|
||||
#
|
||||
CONFIG_RT_USING_DFS=y
|
||||
CONFIG_DFS_USING_WORKDIR=y
|
||||
CONFIG_DFS_FILESYSTEMS_MAX=8
|
||||
CONFIG_DFS_FILESYSTEM_TYPES_MAX=8
|
||||
CONFIG_DFS_FD_MAX=64
|
||||
# CONFIG_RT_USING_DFS_MNTTABLE is not set
|
||||
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_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_USING_DFS_DEVFS=y
|
||||
# CONFIG_RT_USING_DFS_ROMFS is not set
|
||||
# CONFIG_RT_USING_DFS_RAMFS is not set
|
||||
# CONFIG_RT_USING_DFS_UFFS is not set
|
||||
# CONFIG_RT_USING_DFS_JFFS2 is not set
|
||||
# CONFIG_RT_USING_DFS is not set
|
||||
|
||||
#
|
||||
# Device Drivers
|
||||
@ -171,22 +144,12 @@ CONFIG_RT_USING_PIN=y
|
||||
#
|
||||
# CONFIG_RT_USING_USB_HOST is not set
|
||||
# CONFIG_RT_USING_USB_DEVICE is not set
|
||||
# CONFIG__RT_USB_DEVICE_NONE is not set
|
||||
# CONFIG__RT_USB_DEVICE_CDC is not set
|
||||
# CONFIG__RT_USB_DEVICE_MSTORAGE is not set
|
||||
# CONFIG__RT_USB_DEVICE_HID is not set
|
||||
# CONFIG__RT_USB_DEVICE_WINUSB is not set
|
||||
|
||||
#
|
||||
# POSIX layer and C standard library
|
||||
#
|
||||
CONFIG_RT_USING_LIBC=y
|
||||
# CONFIG_RT_USING_LIBC is not set
|
||||
# CONFIG_RT_USING_PTHREADS is not set
|
||||
CONFIG_RT_USING_POSIX=y
|
||||
# CONFIG_RT_USING_POSIX_MMAP is not set
|
||||
# CONFIG_RT_USING_POSIX_TERMIOS is not set
|
||||
# CONFIG_RT_USING_POSIX_AIO is not set
|
||||
# CONFIG_RT_USING_MODULE is not set
|
||||
|
||||
#
|
||||
# Network
|
||||
@ -319,19 +282,12 @@ CONFIG_RT_USING_POSIX=y
|
||||
# CONFIG_PKG_USING_LWEXT4 is not set
|
||||
# CONFIG_PKG_USING_PARTITION is not set
|
||||
# CONFIG_PKG_USING_FAL is not set
|
||||
# CONFIG_PKG_USING_FAL_LATEST_VERSION is not set
|
||||
# CONFIG_PKG_USING_FAL_V00300 is not set
|
||||
# CONFIG_PKG_USING_FAL_V00200 is not set
|
||||
# CONFIG_PKG_USING_FAL_V00100 is not set
|
||||
# CONFIG_PKG_USING_SQLITE is not set
|
||||
# CONFIG_PKG_USING_RTI is not set
|
||||
# CONFIG_PKG_USING_LITTLEVGL2RTT is not set
|
||||
# CONFIG_PKG_USING_CMSIS is not set
|
||||
# CONFIG_PKG_USING_DFS_YAFFS is not set
|
||||
# CONFIG_PKG_USING_LITTLEFS is not set
|
||||
# CONFIG_PKG_USING_LITTLEFS_V090 is not set
|
||||
# CONFIG_PKG_USING_LITTLEFS_V170 is not set
|
||||
# CONFIG_PKG_USING_LITTLEFS_LATEST_VERSION is not set
|
||||
# CONFIG_PKG_USING_THREAD_POOL is not set
|
||||
|
||||
#
|
||||
@ -419,7 +375,7 @@ CONFIG_SOC_STM32F469NI=y
|
||||
#
|
||||
# Onboard Peripheral Drivers
|
||||
#
|
||||
CONFIG_BSP_USING_SDRAM=y
|
||||
# CONFIG_BSP_USING_SDRAM is not set
|
||||
# CONFIG_BSP_USING_QSPI_FLASH is not set
|
||||
|
||||
#
|
||||
@ -431,7 +387,7 @@ CONFIG_BSP_USING_UART3=y
|
||||
# CONFIG_BSP_UART3_RX_USING_DMA is not set
|
||||
# CONFIG_BSP_USING_QSPI is not set
|
||||
# CONFIG_BSP_USING_ON_CHIP_FLASH is not set
|
||||
CONFIG_BSP_USING_FMC=y
|
||||
# CONFIG_BSP_USING_FMC is not set
|
||||
# CONFIG_BSP_USING_USBD_FS is not set
|
||||
|
||||
#
|
||||
|
@ -6,10 +6,11 @@ config SOC_STM32F469NI
|
||||
default y
|
||||
|
||||
menu "Onboard Peripheral Drivers"
|
||||
|
||||
config BSP_USING_SDRAM
|
||||
bool "Enable SDRAM"
|
||||
select BSP_USING_FMC
|
||||
default n
|
||||
bool "Enable SDRAM"
|
||||
select BSP_USING_FMC
|
||||
default n
|
||||
config BSP_USING_QSPI_FLASH
|
||||
bool "Enable QSPI FLASH (N25Q128A qspi1)"
|
||||
select BSP_USING_QSPI
|
||||
|
@ -10,10 +10,14 @@ cwd = GetCurrentDir()
|
||||
src = Split('''
|
||||
board.c
|
||||
CubeMX_Config/Src/stm32f4xx_hal_msp.c
|
||||
ports/drv_qspi_flash.c
|
||||
ports/qspi_mnt.c
|
||||
''')
|
||||
|
||||
if GetDepend(['BSP_USING_QSPI_FLASH']):
|
||||
src += Glob('ports/drv_qspi_flash.c')
|
||||
|
||||
if GetDepend(['PKG_USING_FAL']):
|
||||
src += Glob('ports/qspi_mnt.c')
|
||||
|
||||
path = [cwd]
|
||||
path += [cwd + '/CubeMX_Config/Inc']
|
||||
path += [cwd + '/ports']
|
||||
|
@ -42,30 +42,25 @@ extern struct fal_flash_dev nor_flash0;
|
||||
&nor_flash0, \
|
||||
}
|
||||
|
||||
#ifdef FAL_PART_HAS_TABLE_CFG
|
||||
/* partition table */
|
||||
#define FAL_PART_TABLE \
|
||||
{ \
|
||||
#define ONCHIP_FLASH_PART_TABLE \
|
||||
{FAL_PART_MAGIC_WROD, "bootloader", "onchip_flash_16k", 0 , FLASH_SIZE_GRANULARITY_16K , 0}, \
|
||||
{FAL_PART_MAGIC_WROD, "param", "onchip_flash_64k", 0 , FLASH_SIZE_GRANULARITY_64K , 0}, \
|
||||
{FAL_PART_MAGIC_WROD, "app", "onchip_flash_128k", 0 , FLASH_SIZE_GRANULARITY_128K, 0}, \
|
||||
{FAL_PART_MAGIC_WROD, "qspiflash", FAL_USING_NOR_FLASH_DEV_NAME, 0 , (16 * 1024 * 1024), 0}, \
|
||||
}
|
||||
#endif /* FAL_PART_HAS_TABLE_CFG */
|
||||
{FAL_PART_MAGIC_WROD, "app", "onchip_flash_128k", 0 , FLASH_SIZE_GRANULARITY_128K, 0},
|
||||
|
||||
#define QSPI_FLASH_PART_TABLE \
|
||||
{FAL_PART_MAGIC_WROD, "qspiflash", FAL_USING_NOR_FLASH_DEV_NAME, 0 , (16 * 1024 * 1024), 0},
|
||||
|
||||
#elif defined(BSP_USING_QSPI_FLASH)
|
||||
|
||||
#define FAL_FLASH_DEV_TABLE \
|
||||
{ \
|
||||
&nor_flash0, \
|
||||
}
|
||||
|
||||
#ifdef FAL_PART_HAS_TABLE_CFG
|
||||
/* partition table */
|
||||
#define FAL_PART_TABLE \
|
||||
{ \
|
||||
{FAL_PART_MAGIC_WROD, "qspiflash", FAL_USING_NOR_FLASH_DEV_NAME, 0 , (16 * 1024 * 1024), 0}, \
|
||||
}
|
||||
#endif /* FAL_PART_HAS_TABLE_CFG */
|
||||
#define ONCHIP_FLASH_PART_TABLE
|
||||
|
||||
#define QSPI_FLASH_PART_TABLE \
|
||||
{FAL_PART_MAGIC_WROD, "qspiflash", FAL_USING_NOR_FLASH_DEV_NAME, 0 , (16 * 1024 * 1024), 0},
|
||||
|
||||
#elif defined(BSP_USING_ON_CHIP_FLASH)
|
||||
|
||||
@ -76,15 +71,12 @@ extern struct fal_flash_dev nor_flash0;
|
||||
&stm32_onchip_flash_128k, \
|
||||
}
|
||||
|
||||
#ifdef FAL_PART_HAS_TABLE_CFG
|
||||
/* partition table */
|
||||
#define FAL_PART_TABLE \
|
||||
{ \
|
||||
#define ONCHIP_FLASH_PART_TABLE \
|
||||
{FAL_PART_MAGIC_WROD, "bootloader", "onchip_flash_16k", 0 , FLASH_SIZE_GRANULARITY_16K , 0}, \
|
||||
{FAL_PART_MAGIC_WROD, "param", "onchip_flash_64k", 0 , FLASH_SIZE_GRANULARITY_64K , 0}, \
|
||||
{FAL_PART_MAGIC_WROD, "app", "onchip_flash_128k", 0 , FLASH_SIZE_GRANULARITY_128K, 0}, \
|
||||
}
|
||||
#endif /* FAL_PART_HAS_TABLE_CFG */
|
||||
{FAL_PART_MAGIC_WROD, "app", "onchip_flash_128k", 0 , FLASH_SIZE_GRANULARITY_128K, 0},
|
||||
|
||||
#define QSPI_FLASH_PART_TABLE
|
||||
|
||||
#else
|
||||
|
||||
@ -93,4 +85,13 @@ extern struct fal_flash_dev nor_flash0;
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef FAL_PART_HAS_TABLE_CFG
|
||||
/* partition table */
|
||||
#define FAL_PART_TABLE \
|
||||
{ \
|
||||
ONCHIP_FLASH_PART_TABLE \
|
||||
QSPI_FLASH_PART_TABLE \
|
||||
}
|
||||
#endif /* FAL_PART_HAS_TABLE_CFG */
|
||||
|
||||
#endif /* _FAL_CFG_H_ */
|
||||
|
@ -98,33 +98,7 @@
|
||||
|
||||
/* Device virtual file system */
|
||||
|
||||
#define RT_USING_DFS
|
||||
#define DFS_USING_WORKDIR
|
||||
#define DFS_FILESYSTEMS_MAX 8
|
||||
#define DFS_FILESYSTEM_TYPES_MAX 8
|
||||
#define DFS_FD_MAX 64
|
||||
/* RT_USING_DFS_MNTTABLE is not set */
|
||||
#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
|
||||
/* 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 512
|
||||
/* RT_DFS_ELM_USE_ERASE is not set */
|
||||
#define RT_DFS_ELM_REENTRANT
|
||||
#define RT_USING_DFS_DEVFS
|
||||
/* RT_USING_DFS_ROMFS is not set */
|
||||
/* RT_USING_DFS_RAMFS is not set */
|
||||
/* RT_USING_DFS_UFFS is not set */
|
||||
/* RT_USING_DFS_JFFS2 is not set */
|
||||
/* RT_USING_DFS is not set */
|
||||
|
||||
/* Device Drivers */
|
||||
|
||||
@ -160,21 +134,11 @@
|
||||
|
||||
/* RT_USING_USB_HOST is not set */
|
||||
/* RT_USING_USB_DEVICE is not set */
|
||||
/* _RT_USB_DEVICE_NONE is not set */
|
||||
/* _RT_USB_DEVICE_CDC is not set */
|
||||
/* _RT_USB_DEVICE_MSTORAGE is not set */
|
||||
/* _RT_USB_DEVICE_HID is not set */
|
||||
/* _RT_USB_DEVICE_WINUSB is not set */
|
||||
|
||||
/* POSIX layer and C standard library */
|
||||
|
||||
#define RT_USING_LIBC
|
||||
/* RT_USING_LIBC is not set */
|
||||
/* RT_USING_PTHREADS is not set */
|
||||
#define RT_USING_POSIX
|
||||
/* RT_USING_POSIX_MMAP is not set */
|
||||
/* RT_USING_POSIX_TERMIOS is not set */
|
||||
/* RT_USING_POSIX_AIO is not set */
|
||||
/* RT_USING_MODULE is not set */
|
||||
|
||||
/* Network */
|
||||
|
||||
@ -286,19 +250,12 @@
|
||||
/* PKG_USING_LWEXT4 is not set */
|
||||
/* PKG_USING_PARTITION is not set */
|
||||
/* PKG_USING_FAL is not set */
|
||||
/* PKG_USING_FAL_LATEST_VERSION is not set */
|
||||
/* PKG_USING_FAL_V00300 is not set */
|
||||
/* PKG_USING_FAL_V00200 is not set */
|
||||
/* PKG_USING_FAL_V00100 is not set */
|
||||
/* PKG_USING_SQLITE is not set */
|
||||
/* PKG_USING_RTI is not set */
|
||||
/* PKG_USING_LITTLEVGL2RTT is not set */
|
||||
/* PKG_USING_CMSIS is not set */
|
||||
/* PKG_USING_DFS_YAFFS is not set */
|
||||
/* PKG_USING_LITTLEFS is not set */
|
||||
/* PKG_USING_LITTLEFS_V090 is not set */
|
||||
/* PKG_USING_LITTLEFS_V170 is not set */
|
||||
/* PKG_USING_LITTLEFS_LATEST_VERSION is not set */
|
||||
/* PKG_USING_THREAD_POOL is not set */
|
||||
|
||||
/* peripheral libraries and drivers */
|
||||
@ -379,7 +336,7 @@
|
||||
|
||||
/* Onboard Peripheral Drivers */
|
||||
|
||||
#define BSP_USING_SDRAM
|
||||
/* BSP_USING_SDRAM is not set */
|
||||
/* BSP_USING_QSPI_FLASH is not set */
|
||||
|
||||
/* On-chip Peripheral Drivers */
|
||||
@ -390,7 +347,7 @@
|
||||
/* BSP_UART3_RX_USING_DMA is not set */
|
||||
/* BSP_USING_QSPI is not set */
|
||||
/* BSP_USING_ON_CHIP_FLASH is not set */
|
||||
#define BSP_USING_FMC
|
||||
/* BSP_USING_FMC is not set */
|
||||
/* BSP_USING_USBD_FS is not set */
|
||||
|
||||
/* Board extended module Drivers */
|
||||
|
Loading…
x
Reference in New Issue
Block a user