Olimex STM32 P407: USB host support for USB FLASH sticks is now supported in the base nsh configuration.

This commit is contained in:
Gregory Nutt 2017-03-09 13:00:00 -06:00
parent a786e07033
commit d49ea44df2
2 changed files with 57 additions and 6 deletions

View File

@ -155,7 +155,7 @@ OTGFS Host
CONFIG_STM32_SYSCFG - Needed
CONFIG_SCHED_WORKQUEUE - Worker thread support is required
Options:
STM32 Options:
CONFIG_STM32_OTGFS_RXFIFO_SIZE - Size of the RX FIFO in 32-bit words.
Default 128 (512 bytes)
@ -171,11 +171,25 @@ OTGFS Host
CONFIG_STM32_USBHOST_PKTDUMP - Dump all incoming and outgoing USB
packets. Depends on CONFIG_DEBUG_FEATURES.
Olimex STM32 P407 Configuration:
CONFIG_STM32F4DISCO_OLIMEXP407_PRIO - Priority of the USB host watier
thread (default 100).
CONFIG_STM32F4DISCO_OLIMEXP407_STACKSIZE - Stacksize of the USB host
waiter thread (default 1024)
Class Driver Configuration
--------------------------
Individual class drivers have additional configuration requirements. The
USB mass storage class, for example, requires FAT file system support.
CONFIG_USBHOST_MSC=y
CONFIG_FS_FAT=y
CONFIG_FAT_LCNAMES=y
CONFIG_FAT_LFN=y
CONFIG_FAT_MAXFNAME=32
Configurations
==============
@ -321,7 +335,13 @@ must be is one of the following.
NOTES:
1. Kernel Modules / Shared Libraries
1. USB host support for USB FLASH sticks is enbabled. See the notes
above under "OTGFS Host".
STATUS: I have seen this work with some FLASH sticks but not with
others. This probably needs a little TLC to get 100% reliable.
2. Kernel Modules / Shared Libraries
I used this configuration for testing NuttX kernel modules in the
FLAT build with the following configuration additions to the

View File

@ -152,6 +152,9 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y
# CONFIG_ARMV7M_STACKCHECK is not set
# CONFIG_ARMV7M_ITMSYSLOG is not set
# CONFIG_SERIAL_TERMIOS is not set
# CONFIG_USBHOST_BULK_DISABLE is not set
# CONFIG_USBHOST_INT_DISABLE is not set
# CONFIG_USBHOST_ISOC_DISABLE is not set
#
# STM32 Configuration Options
@ -410,7 +413,7 @@ CONFIG_STM32_HAVE_SPI3=y
# CONFIG_STM32_I2C1 is not set
# CONFIG_STM32_I2C2 is not set
# CONFIG_STM32_I2C3 is not set
# CONFIG_STM32_OTGFS is not set
CONFIG_STM32_OTGFS=y
# CONFIG_STM32_OTGHS is not set
CONFIG_STM32_PWR=y
# CONFIG_STM32_RNG is not set
@ -500,6 +503,11 @@ CONFIG_STM32_USART3_SERIALDRIVER=y
#
# USB FS Host Configuration
#
CONFIG_STM32_OTGFS_RXFIFO_SIZE=128
CONFIG_STM32_OTGFS_NPTXFIFO_SIZE=96
CONFIG_STM32_OTGFS_PTXFIFO_SIZE=128
CONFIG_STM32_OTGFS_DESCSIZE=128
# CONFIG_STM32_OTGFS_SOFINTR is not set
#
# USB HS Host Configuration
@ -594,6 +602,8 @@ CONFIG_ARCH_IRQBUTTONS=y
#
# Board-Specific Options
#
CONFIG_STM32F4DISCO_OLIMEXP407_STACKSIZE=1024
CONFIG_STM32F4DISCO_OLIMEXP407_PRIO=100
# CONFIG_BOARD_CRASHDUMP is not set
CONFIG_LIB_BOARDCTL=y
# CONFIG_BOARDCTL_RESET is not set
@ -834,7 +844,17 @@ CONFIG_USART3_2STOP=0
# CONFIG_USART3_DMA is not set
# CONFIG_PSEUDOTERM is not set
# CONFIG_USBDEV is not set
# CONFIG_USBHOST is not set
CONFIG_USBHOST=y
CONFIG_USBHOST_NPREALLOC=4
CONFIG_USBHOST_HAVE_ASYNCH=y
# CONFIG_USBHOST_ASYNCH is not set
# CONFIG_USBHOST_HUB is not set
# CONFIG_USBHOST_COMPOSITE is not set
CONFIG_USBHOST_MSC=y
# CONFIG_USBHOST_CDCACM is not set
# CONFIG_USBHOST_HIDKBD is not set
# CONFIG_USBHOST_HIDMOUSE is not set
# CONFIG_USBHOST_TRACE is not set
# CONFIG_HAVE_USBTRACE is not set
# CONFIG_DRIVERS_WIRELESS is not set
# CONFIG_DRIVERS_CONTACTLESS is not set
@ -877,11 +897,18 @@ CONFIG_SYSLOG_CONSOLE=y
# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set
# CONFIG_PSEUDOFS_SOFTLINKS is not set
CONFIG_FS_READABLE=y
# CONFIG_FS_WRITABLE is not set
CONFIG_FS_WRITABLE=y
# CONFIG_FS_NAMED_SEMAPHORES is not set
CONFIG_FS_MQUEUE_MPATH="/var/mqueue"
# CONFIG_FS_RAMMAP is not set
# CONFIG_FS_FAT is not set
CONFIG_FS_FAT=y
CONFIG_FAT_LCNAMES=y
CONFIG_FAT_LFN=y
CONFIG_FAT_MAXFNAME=32
# CONFIG_FS_FATTIME is not set
# CONFIG_FAT_FORCE_INDIRECT is not set
# CONFIG_FAT_DMAMEMORY is not set
# CONFIG_FAT_DIRECT_RETRY is not set
# CONFIG_FS_NXFFS is not set
# CONFIG_FS_ROMFS is not set
# CONFIG_FS_TMPFS is not set
@ -980,6 +1007,8 @@ CONFIG_ARCH_LOWPUTC=y
#
CONFIG_LIB_RAND_ORDER=1
CONFIG_LIB_HOMEDIR="/"
CONFIG_LIBC_TMPDIR="/tmp"
CONFIG_LIBC_MAX_TMPFILE=32
#
# Program Execution Options
@ -1078,6 +1107,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024
# CONFIG_EXAMPLES_CXXTEST is not set
# CONFIG_EXAMPLES_DHCPD is not set
# CONFIG_EXAMPLES_ELF is not set
# CONFIG_EXAMPLES_FSTEST is not set
# CONFIG_EXAMPLES_FTPC is not set
# CONFIG_EXAMPLES_FTPD is not set
# CONFIG_EXAMPLES_HELLO is not set
@ -1214,6 +1244,7 @@ CONFIG_NSH_DISABLE_LOSMART=y
# CONFIG_NSH_DISABLE_LS is not set
# CONFIG_NSH_DISABLE_MB is not set
# CONFIG_NSH_DISABLE_MKDIR is not set
# CONFIG_NSH_DISABLE_MKFATFS is not set
# CONFIG_NSH_DISABLE_MKRD is not set
# CONFIG_NSH_DISABLE_MH is not set
# CONFIG_NSH_DISABLE_MOUNT is not set