From 55a34548ccc4fc7aa55ad585b007c7d77d8cf937 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 25 Sep 2013 16:54:39 -0600 Subject: Move apps/examples/usbmsc to apps/system/usbmsc --- apps/ChangeLog.txt | 2 +- apps/examples/Kconfig | 1 - apps/examples/Make.defs | 4 - apps/examples/Makefile | 6 +- apps/examples/README.txt | 77 --- apps/examples/usbmsc/.gitignore | 11 - apps/examples/usbmsc/Kconfig | 167 ------ apps/examples/usbmsc/Makefile | 120 ---- apps/examples/usbmsc/usbmsc.h | 180 ------ apps/examples/usbmsc/usbmsc_main.c | 660 --------------------- apps/system/Kconfig | 4 + apps/system/Make.defs | 4 + apps/system/Makefile | 2 +- apps/system/usbmsc/.gitignore | 11 + apps/system/usbmsc/Kconfig | 171 ++++++ apps/system/usbmsc/Makefile | 120 ++++ apps/system/usbmsc/usbmsc.h | 180 ++++++ apps/system/usbmsc/usbmsc_main.c | 660 +++++++++++++++++++++ misc/uClibc++/install.sh | 2 +- nuttx/ChangeLog | 3 +- nuttx/Documentation/README.html | 1 + nuttx/README.txt | 4 +- nuttx/configs/amber/hello/defconfig | 20 +- nuttx/configs/arduino-due/nsh/defconfig | 2 +- nuttx/configs/arduino-due/ostest/defconfig | 2 +- nuttx/configs/cloudctrl/nsh/defconfig | 2 +- nuttx/configs/cloudctrl/src/up_usbmsc.c | 8 +- nuttx/configs/ea3131/README.txt | 2 +- nuttx/configs/ea3131/src/up_usbmsc.c | 12 +- nuttx/configs/ea3131/usbmsc/appconfig | 2 +- nuttx/configs/ea3131/usbmsc/defconfig | 20 +- nuttx/configs/ea3131/usbserial/defconfig | 20 +- nuttx/configs/ea3152/src/up_usbmsc.c | 12 +- nuttx/configs/ekk-lm3s9b96/nsh/defconfig | 2 +- nuttx/configs/ekk-lm3s9b96/ostest/defconfig | 2 +- nuttx/configs/ez80f910200kitg/ostest/defconfig | 2 +- nuttx/configs/ez80f910200zco/ostest/defconfig | 2 +- nuttx/configs/fire-stm32v2/nsh/defconfig | 28 +- nuttx/configs/fire-stm32v2/src/up_usbmsc.c | 8 +- nuttx/configs/freedom-kl25z/nsh/defconfig | 2 +- nuttx/configs/freedom-kl25z/ostest/defconfig | 2 +- nuttx/configs/hymini-stm32v/README.txt | 2 +- nuttx/configs/hymini-stm32v/buttons/defconfig | 2 +- nuttx/configs/hymini-stm32v/nsh/defconfig | 2 +- nuttx/configs/hymini-stm32v/nsh2/defconfig | 28 +- nuttx/configs/hymini-stm32v/ostest/defconfig | 2 +- nuttx/configs/hymini-stm32v/src/up_usbmsc.c | 10 +- nuttx/configs/hymini-stm32v/usbmsc/appconfig | 2 +- nuttx/configs/hymini-stm32v/usbmsc/defconfig | 22 +- nuttx/configs/hymini-stm32v/usbnsh/defconfig | 2 +- nuttx/configs/kwikstik-k40/ostest/defconfig | 2 +- nuttx/configs/kwikstik-k40/src/up_usbmsc.c | 6 +- nuttx/configs/lincoln60/ostest/defconfig | 20 +- nuttx/configs/lm3s6965-ek/discover/defconfig | 2 +- nuttx/configs/lm3s6965-ek/nsh/defconfig | 2 +- nuttx/configs/lm3s6965-ek/nx/defconfig | 2 +- nuttx/configs/lm3s6965-ek/ostest/defconfig | 2 +- nuttx/configs/lm3s6965-ek/tcpecho/defconfig | 2 +- nuttx/configs/lm4f120-launchpad/nsh/defconfig | 2 +- nuttx/configs/lm4f120-launchpad/ostest/defconfig | 2 +- nuttx/configs/lpcxpresso-lpc1768/README.txt | 2 +- nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig | 20 +- nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig | 20 +- nuttx/configs/lpcxpresso-lpc1768/nx/defconfig | 20 +- nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig | 20 +- nuttx/configs/lpcxpresso-lpc1768/src/up_usbmsc.c | 6 +- nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig | 20 +- nuttx/configs/lpcxpresso-lpc1768/usbmsc/appconfig | 2 +- nuttx/configs/lpcxpresso-lpc1768/usbmsc/defconfig | 20 +- nuttx/configs/maple/nsh/defconfig | 2 +- nuttx/configs/maple/usbnsh/defconfig | 2 +- nuttx/configs/mcu123-lpc214x/README.txt | 2 +- nuttx/configs/mcu123-lpc214x/composite/defconfig | 20 +- nuttx/configs/mcu123-lpc214x/nsh/defconfig | 2 +- nuttx/configs/mcu123-lpc214x/src/up_usbmsc.c | 6 +- nuttx/configs/mcu123-lpc214x/usbmsc/appconfig | 2 +- nuttx/configs/mcu123-lpc214x/usbmsc/defconfig | 20 +- nuttx/configs/micropendous3/hello/defconfig | 20 +- nuttx/configs/mikroe-stm32f4/fulldemo/defconfig | 2 +- nuttx/configs/mikroe-stm32f4/kostest/defconfig | 2 +- nuttx/configs/mikroe-stm32f4/nsh/defconfig | 2 +- nuttx/configs/mikroe-stm32f4/nx/defconfig | 2 +- nuttx/configs/mikroe-stm32f4/nxlines/defconfig | 2 +- nuttx/configs/mikroe-stm32f4/nxtext/defconfig | 2 +- nuttx/configs/mikroe-stm32f4/usbnsh/defconfig | 2 +- nuttx/configs/mirtoo/nsh/defconfig | 20 +- nuttx/configs/mirtoo/nxffs/defconfig | 20 +- nuttx/configs/mirtoo/ostest/defconfig | 20 +- nuttx/configs/nucleus2g/README.txt | 2 +- nuttx/configs/nucleus2g/src/up_usbmsc.c | 6 +- nuttx/configs/nucleus2g/usbmsc/appconfig | 2 +- nuttx/configs/nucleus2g/usbmsc/defconfig | 20 +- nuttx/configs/nucleus2g/usbserial/defconfig | 2 +- nuttx/configs/nutiny-nuc120/nsh/defconfig | 2 +- nuttx/configs/nutiny-nuc120/ostest/defconfig | 2 +- nuttx/configs/olimex-lpc1766stk/README.txt | 2 +- nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig | 2 +- nuttx/configs/olimex-lpc1766stk/nettest/defconfig | 2 +- nuttx/configs/olimex-lpc1766stk/nsh/defconfig | 2 +- nuttx/configs/olimex-lpc1766stk/nx/defconfig | 20 +- nuttx/configs/olimex-lpc1766stk/ostest/defconfig | 20 +- nuttx/configs/olimex-lpc1766stk/src/up_usbmsc.c | 6 +- nuttx/configs/olimex-lpc1766stk/usbmsc/appconfig | 2 +- nuttx/configs/olimex-lpc1766stk/usbmsc/defconfig | 20 +- .../configs/olimex-lpc1766stk/usbserial/defconfig | 2 +- nuttx/configs/olimex-lpc1766stk/zmodem/defconfig | 2 +- nuttx/configs/olimex-stm32-p107/nsh/defconfig | 2 +- nuttx/configs/open1788/knsh/defconfig | 2 +- nuttx/configs/open1788/nsh/defconfig | 2 +- nuttx/configs/open1788/nxlines/defconfig | 2 +- nuttx/configs/open1788/ostest/defconfig | 2 +- nuttx/configs/p112/ostest/defconfig | 2 +- nuttx/configs/pcblogic-pic32mx/nsh/defconfig | 2 +- nuttx/configs/pcblogic-pic32mx/ostest/defconfig | 2 +- nuttx/configs/pic32-starterkit/README.txt | 12 +- nuttx/configs/pic32-starterkit/nsh/appconfig | 4 +- nuttx/configs/pic32-starterkit/nsh/defconfig | 20 +- nuttx/configs/pic32-starterkit/nsh2/appconfig | 4 +- nuttx/configs/pic32-starterkit/nsh2/defconfig | 20 +- nuttx/configs/pic32-starterkit/ostest/defconfig | 20 +- nuttx/configs/pic32-starterkit/src/up_usbmsc.c | 2 +- nuttx/configs/pic32mx7mmb/README.txt | 10 +- nuttx/configs/pic32mx7mmb/nsh/appconfig | 2 +- nuttx/configs/pic32mx7mmb/nsh/defconfig | 20 +- nuttx/configs/pic32mx7mmb/ostest/defconfig | 20 +- nuttx/configs/pic32mx7mmb/src/up_usbmsc.c | 2 +- nuttx/configs/pirelli_dpl10/nsh_highram/defconfig | 2 +- nuttx/configs/sam3u-ek/knsh/defconfig | 2 +- nuttx/configs/sam3u-ek/nsh/defconfig | 2 +- nuttx/configs/sam3u-ek/nx/defconfig | 2 +- nuttx/configs/sam3u-ek/nxwm/defconfig | 2 +- nuttx/configs/sam3u-ek/ostest/defconfig | 2 +- nuttx/configs/sam3u-ek/src/up_usbmsc.c | 8 +- nuttx/configs/sam4l-xplained/nsh/defconfig | 2 +- nuttx/configs/sam4l-xplained/ostest/defconfig | 2 +- nuttx/configs/sam4s-xplained/nsh/defconfig | 2 +- nuttx/configs/sam4s-xplained/ostest/defconfig | 2 +- nuttx/configs/sama5d3x-ek/README.txt | 14 +- nuttx/configs/sama5d3x-ek/demo/defconfig | 35 +- nuttx/configs/sama5d3x-ek/hello/defconfig | 2 +- nuttx/configs/sama5d3x-ek/norboot/defconfig | 2 +- nuttx/configs/sama5d3x-ek/nsh/defconfig | 2 +- nuttx/configs/sama5d3x-ek/ostest/defconfig | 2 +- nuttx/configs/sama5d3x-ek/src/sam_usbmsc.c | 6 +- nuttx/configs/shenzhou/nsh/defconfig | 2 +- nuttx/configs/shenzhou/nxwm/defconfig | 2 +- nuttx/configs/shenzhou/src/up_usbmsc.c | 8 +- nuttx/configs/shenzhou/thttpd/defconfig | 2 +- nuttx/configs/sim/cxxtest/defconfig | 2 +- nuttx/configs/sim/mtdpart/defconfig | 2 +- nuttx/configs/sim/nsh/defconfig | 2 +- nuttx/configs/sim/nxffs/defconfig | 2 +- nuttx/configs/sim/nxlines/defconfig | 2 +- nuttx/configs/sim/nxwm/defconfig | 2 +- nuttx/configs/sim/ostest/defconfig | 2 +- nuttx/configs/stm3210e-eval/README.txt | 4 +- nuttx/configs/stm3210e-eval/RIDE/bigfatstub.c | 60 +- nuttx/configs/stm3210e-eval/composite/defconfig | 22 +- nuttx/configs/stm3210e-eval/nsh2/appconfig | 2 +- nuttx/configs/stm3210e-eval/nsh2/defconfig | 22 +- nuttx/configs/stm3210e-eval/nxconsole/appconfig | 2 +- nuttx/configs/stm3210e-eval/pm/appconfig | 2 +- nuttx/configs/stm3210e-eval/pm/defconfig | 22 +- nuttx/configs/stm3210e-eval/src/up_usbmsc.c | 10 +- nuttx/configs/stm3210e-eval/usbmsc/appconfig | 2 +- nuttx/configs/stm3210e-eval/usbmsc/defconfig | 22 +- nuttx/configs/stm3210e-eval/usbserial/defconfig | 2 +- nuttx/configs/stm3220g-eval/nsh/defconfig | 22 +- nuttx/configs/stm3220g-eval/nsh2/defconfig | 22 +- nuttx/configs/stm3220g-eval/nxwm/defconfig | 2 +- nuttx/configs/stm3220g-eval/ostest/defconfig | 22 +- nuttx/configs/stm3240g-eval/discover/defconfig | 2 +- nuttx/configs/stm3240g-eval/nsh/defconfig | 22 +- nuttx/configs/stm3240g-eval/nxconsole/defconfig | 22 +- nuttx/configs/stm3240g-eval/nxwm/defconfig | 22 +- nuttx/configs/stm3240g-eval/ostest/defconfig | 2 +- nuttx/configs/stm3240g-eval/webserver/defconfig | 22 +- nuttx/configs/stm3240g-eval/xmlrpc/defconfig | 2 +- nuttx/configs/stm32_tiny/nsh/defconfig | 2 +- nuttx/configs/stm32_tiny/usbnsh/defconfig | 2 +- nuttx/configs/stm32f100rc_generic/nsh/defconfig | 2 +- nuttx/configs/stm32f100rc_generic/ostest/defconfig | 2 +- nuttx/configs/stm32f3discovery/nsh/defconfig | 2 +- nuttx/configs/stm32f3discovery/ostest/defconfig | 2 +- nuttx/configs/stm32f3discovery/usbnsh/defconfig | 2 +- nuttx/configs/stm32f4discovery/cxxtest/defconfig | 2 +- nuttx/configs/stm32f4discovery/elf/defconfig | 2 +- nuttx/configs/stm32f4discovery/kostest/defconfig | 2 +- nuttx/configs/stm32f4discovery/nsh/defconfig | 2 +- nuttx/configs/stm32f4discovery/nxlines/defconfig | 2 +- nuttx/configs/stm32f4discovery/ostest/defconfig | 2 +- .../configs/stm32f4discovery/posix_spawn/defconfig | 2 +- nuttx/configs/stm32f4discovery/usbnsh/defconfig | 2 +- nuttx/configs/stm32f4discovery/winbuild/defconfig | 2 +- nuttx/configs/stm32ldiscovery/nsh/defconfig | 2 +- nuttx/configs/sure-pic32mx/README.txt | 4 +- nuttx/configs/sure-pic32mx/nsh/defconfig | 2 +- nuttx/configs/sure-pic32mx/ostest/defconfig | 2 +- nuttx/configs/sure-pic32mx/usbnsh/defconfig | 2 +- nuttx/configs/teensy/README.txt | 2 +- nuttx/configs/teensy/hello/defconfig | 20 +- nuttx/configs/teensy/src/up_usbmsc.c | 6 +- nuttx/configs/teensy/usbmsc/appconfig | 2 +- nuttx/configs/teensy/usbmsc/defconfig | 20 +- nuttx/configs/twr-k60n512/nsh/defconfig | 2 +- nuttx/configs/twr-k60n512/ostest/defconfig | 2 +- nuttx/configs/twr-k60n512/src/up_usbmsc.c | 6 +- nuttx/configs/ubw32/nsh/appconfig | 4 +- nuttx/configs/ubw32/nsh/defconfig | 20 +- nuttx/configs/ubw32/ostest/defconfig | 2 +- nuttx/configs/vsn/src/usbmsc.c | 8 +- nuttx/configs/xtrs/nsh/defconfig | 2 +- nuttx/configs/xtrs/ostest/defconfig | 2 +- nuttx/configs/xtrs/pashello/defconfig | 2 +- nuttx/configs/z16f2800100zcog/ostest/defconfig | 2 +- nuttx/configs/z16f2800100zcog/pashello/defconfig | 2 +- nuttx/configs/z80sim/nsh/defconfig | 2 +- nuttx/configs/z80sim/ostest/defconfig | 2 +- nuttx/configs/z80sim/pashello/defconfig | 2 +- nuttx/configs/z8encore000zco/ostest/defconfig | 2 +- nuttx/configs/z8f64200100kit/ostest/defconfig | 2 +- nuttx/configs/zkit-arm-1769/hello/defconfig | 2 +- nuttx/configs/zkit-arm-1769/nsh/defconfig | 2 +- nuttx/configs/zkit-arm-1769/nxhello/defconfig | 2 +- nuttx/configs/zkit-arm-1769/src/up_usbmsc.c | 6 +- nuttx/configs/zkit-arm-1769/thttpd/defconfig | 2 +- nuttx/configs/zp214xpa/nsh/defconfig | 2 +- nuttx/configs/zp214xpa/nxlines/defconfig | 2 +- 228 files changed, 1887 insertions(+), 1944 deletions(-) delete mode 100644 apps/examples/usbmsc/.gitignore delete mode 100644 apps/examples/usbmsc/Kconfig delete mode 100644 apps/examples/usbmsc/Makefile delete mode 100644 apps/examples/usbmsc/usbmsc.h delete mode 100644 apps/examples/usbmsc/usbmsc_main.c create mode 100644 apps/system/usbmsc/.gitignore create mode 100644 apps/system/usbmsc/Kconfig create mode 100644 apps/system/usbmsc/Makefile create mode 100644 apps/system/usbmsc/usbmsc.h create mode 100644 apps/system/usbmsc/usbmsc_main.c diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt index 83c084322..cb8e0976c 100644 --- a/apps/ChangeLog.txt +++ b/apps/ChangeLog.txt @@ -663,4 +663,4 @@ compilation probably introduced on 2013-9-9 (2013-9-23). * apps/system/stackmonitor: Add a daemon that can be used to monitor stack usage by all threads (2013-9-24). - + * system/usbmsc: Move examples/usbmsc to system/usbmsc (2013-9-25). diff --git a/apps/examples/Kconfig b/apps/examples/Kconfig index 99785a155..adbb54a7e 100644 --- a/apps/examples/Kconfig +++ b/apps/examples/Kconfig @@ -62,7 +62,6 @@ source "$APPSDIR/examples/udp/Kconfig" source "$APPSDIR/examples/discover/Kconfig" source "$APPSDIR/examples/uip/Kconfig" source "$APPSDIR/examples/usbserial/Kconfig" -source "$APPSDIR/examples/usbmsc/Kconfig" source "$APPSDIR/examples/usbterm/Kconfig" source "$APPSDIR/examples/watchdog/Kconfig" source "$APPSDIR/examples/wget/Kconfig" diff --git a/apps/examples/Make.defs b/apps/examples/Make.defs index 12f554654..a5e4dc087 100644 --- a/apps/examples/Make.defs +++ b/apps/examples/Make.defs @@ -270,10 +270,6 @@ ifeq ($(CONFIG_EXAMPLES_USBSERIAL),y) CONFIGURED_APPS += examples/usbserial endif -ifeq ($(CONFIG_EXAMPLES_USBMSC),y) -CONFIGURED_APPS += examples/usbmsc -endif - ifeq ($(CONFIG_EXAMPLES_USBTERM),y) CONFIGURED_APPS += examples/usbterm endif diff --git a/apps/examples/Makefile b/apps/examples/Makefile index a98fe5ebe..584531ddf 100644 --- a/apps/examples/Makefile +++ b/apps/examples/Makefile @@ -43,8 +43,8 @@ SUBDIRS += lcdrw mm modbus mount mtdpart nettest nrf24l01_term nsh null SUBDIRS += nx nxconsole nxffs nxflat nxhello nximage nxlines nxtext ostest SUBDIRS += pashello pipe poll posix_spawn pwm qencoder relays rgmp romfs SUBDIRS += sendmail serloop slcd smart smart_test tcpecho telnetd thttpd tiff -SUBDIRS += touchscreen udp uip usbserial usbmsc usbterm watchdog -SUBDIRS += wget wgetjson xmlrpc +SUBDIRS += touchscreen udp uip usbserial usbterm watchdog wget wgetjson +SUBDIRS += xmlrpc # Sub-directories that might need context setup. Directories may need # context setup for a variety of reasons, but the most common is because @@ -57,7 +57,7 @@ CNTXTDIRS += adc can cc3000 cdcacm composite cxxtest dhcpd discover flash_test CNTXTDIRS += ftpd hello helloxx json keypadtestmodbus lcdrw mtdpart nettest CNTXTDIRS += nx nxhello nximage nxlines nxtext nrf24l01_term ostest relays CNTXTDIRS += qencoder slcd smart_test tcpecho telnetd tiff touchscreen -CNTXTDIRS += usbmsc usbterm watchdog wgetjson +CNTXTDIRS += usbterm watchdog wgetjson endif all: nothing diff --git a/apps/examples/README.txt b/apps/examples/README.txt index bb0c9fc49..02e38061c 100644 --- a/apps/examples/README.txt +++ b/apps/examples/README.txt @@ -1825,83 +1825,6 @@ examples/usbserial The host and target will exchange are variety of very small and very large serial messages. -examples/usbmsc -^^^^^^^^^^^^^^^ - - This example registers a block device driver, then exports the block - the device using the USB storage class driver. In order to use this - example, your board-specific logic must provide the function: - - void usbmsc_archinitialize(void); - - This function will be called by the example/usbmsc in order to - do the actual registration of the block device drivers. For examples - of the implementation of usbmsc_archinitialize() see - configs/mcu123-lpc124x/src/up_usbmsc.c or - configs/stm3210e-eval/src/usbmsc.c - - Configuration options: - - CONFIG_NSH_BUILTIN_APPS - This example can be built as two NSH "built-in" commands if this option - is selected: 'msconn' will connect the USB mass storage device; 'msdis' - will disconnect the USB storage device. - CONFIG_EXAMPLES_USBMSC_NLUNS - Defines the number of logical units (LUNs) exported by the USB storage - driver. Each LUN corresponds to one exported block driver (or partition - of a block driver). May be 1, 2, or 3. Default is 1. - CONFIG_EXAMPLES_USBMSC_DEVMINOR1 - The minor device number of the block driver for the first LUN. For - example, N in /dev/mmcsdN. Used for registering the block driver. Default - is zero. - CONFIG_EXAMPLES_USBMSC_DEVPATH1 - The full path to the registered block driver. Default is "/dev/mmcsd0" - CONFIG_EXAMPLES_USBMSC_DEVMINOR2 and CONFIG_EXAMPLES_USBMSC_DEVPATH2 - Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS - is 2 or 3. No defaults. - CONFIG_EXAMPLES_USBMSC_DEVMINOR3 and CONFIG_EXAMPLES_USBMSC_DEVPATH3 - Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS - is 3. No defaults. - CONFIG_EXAMPLES_USBMSC_DEBUGMM - Enables some debug tests to check for memory usage and memory leaks. - - If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then - the example code will also manage the USB trace output. The amount of trace output - can be controlled using: - - CONFIG_EXAMPLES_USBMSC_TRACEINIT - Show initialization events - CONFIG_EXAMPLES_USBMSC_TRACECLASS - Show class driver events - CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS - Show data transfer events - CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER - Show controller events - CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS - Show interrupt-related events. - - Error results are always shown in the trace output - - NOTE 1: When built as an NSH add-on command (CONFIG_NSH_BUILTIN_APPS=y), - Caution should be used to assure that the SD drive (or other storage device) is - not in use when the USB storage device is configured. Specifically, the SD - driver should be unmounted like: - - nsh> mount -t vfat /dev/mmcsd0 /mnt/sdcard # Card is mounted in NSH - ... - nsh> umount /mnd/sdcard # Unmount before connecting USB!!! - nsh> msconn # Connect the USB storage device - ... - nsh> msdis # Disconnect USB storate device - nsh> mount -t vfat /dev/mmcsd0 /mnt/sdcard # Restore the mount - - Failure to do this could result in corruption of the SD card format. - - NOTE 2: This test exercises internal USB device driver interfaces. As such, - it relies on internal OS interfaces that are not normally available to a - user-space program. As a result, this example cannot be used if a - NuttX is built as a protected, supervisor kernel (CONFIG_NUTTX_KERNEL). - examples/usbterm ^^^^^^^^^^^^^^^^ diff --git a/apps/examples/usbmsc/.gitignore b/apps/examples/usbmsc/.gitignore deleted file mode 100644 index fa1ec7579..000000000 --- a/apps/examples/usbmsc/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -/Make.dep -/.depend -/.built -/*.asm -/*.obj -/*.rel -/*.lst -/*.sym -/*.adb -/*.lib -/*.src diff --git a/apps/examples/usbmsc/Kconfig b/apps/examples/usbmsc/Kconfig deleted file mode 100644 index 4d366d89f..000000000 --- a/apps/examples/usbmsc/Kconfig +++ /dev/null @@ -1,167 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see misc/tools/kconfig-language.txt. -# - -config EXAMPLES_USBMSC - bool "USB mass storage class example" - default n - ---help--- - Enable the USB mass storage class example - -if EXAMPLES_USBMSC - -config EXAMPLES_USBMSC_NLUNS - int "Number of LUNs" - default 1 - ---help--- - Defines the number of logical units (LUNs) exported by the USB - storage driver. Each LUN corresponds to one exported block driver - (or partition of a block driver). May be 1, 2, or 3. Default is 1. - -config EXAMPLES_USBMSC_DEVMINOR1 - int "LUN1 Minor Device Number" - default 0 - ---help--- - The minor device number of the block driver for the first LUN. For - example, N in /dev/mmcsdN. Used for registering the block driver. - Default is zero. - -config EXAMPLES_USBMSC_DEVPATH1 - string "LUN1 Device Path" - default "/dev/mmcsd0" - ---help--- - The full path to the registered block driver. Default is - "/dev/mmcsd0" - -config EXAMPLES_USBMSC_DEVMINOR2 - int "LUN2 Minor Device Number" - default 1 - ---help--- - The minor device number of the block driver for the second LUN. For - example, N in /dev/mmcsdN. Used for registering the block driver. - Ignored if EXAMPLES_USBMSC_NLUNS < 2. Default is one. - -config EXAMPLES_USBMSC_DEVPATH2 - string "LUN2 Device Path" - default "/dev/mmcsd1" - ---help--- - The full path to the registered block driver. Ignored if - EXAMPLES_USBMSC_NLUNS < 2. Default is "/dev/mmcsd1" - -config EXAMPLES_USBMSC_DEVMINOR3 - int "LUN3 Minor Device Number" - default 2 - ---help--- - The minor device number of the block driver for the third LUN. For - example, N in /dev/mmcsdN. Used for registering the block driver. - Ignored if EXAMPLES_USBMSC_NLUNS < 2. Default is two. - -config EXAMPLES_USBMSC_DEVPATH3 - string "LUN3 Device Path" - default "/dev/mmcsd2" - ---help--- - The full path to the registered block driver. Ignored if - EXAMPLES_USBMSC_NLUNS < 2. Default is "/dev/mmcsd2" - -config EXAMPLES_USBMSC_DEBUGMM - bool "USB MSC MM Debug" - default n - ---help--- - Enables some debug tests to check for memory usage and memory leaks. - -config EXAMPLES_USBMSC_TRACE - bool "Trace USB activity" - default n - depends on (USBDEV_TRACE || DEBUG_USB) && !NSH_BUILTIN_APPS - ---help--- - If this example is built as a standalone task and if USB device tracing is - enabled, then this example can be configured to unobtrusively monitor - USB activity by selecting this option. - -if EXAMPLES_USBMSC_TRACE - -config EXAMPLES_USBMSC_TRACEINIT - bool "USB Trace Initialization" - default n - ---help--- - If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), - then the example code will also manage the USB trace output. The - amount of trace output can be controlled this configuration value: - This setting will show USB initialization events - -config EXAMPLES_USBMSC_TRACECLASS - bool "USB Trace Class" - default n - ---help--- - If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), - then the example code will also manage the USB trace output. The - amount of trace output can be controlled this configuration value: - This setting will show USB class driver events - -config EXAMPLES_USBMSC_TRACETRANSFERS - bool "USB Trace Transfers" - default n - ---help--- - If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), - then the example code will also manage the USB trace output. The - amount of trace output can be controlled this configuration value: - This setting will show USB data transfer events - -config EXAMPLES_USBMSC_TRACECONTROLLER - bool "USB Trace Device Controller Events" - default n - ---help--- - If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), - then the example code will also manage the USB trace output. The - amount of trace output can be controlled this configuration value: - This setting will show USB device controller events - -config EXAMPLES_USBMSC_TRACEINTERRUPTS - bool "USB Trace Device Controller Interrupt Events" - default n - ---help--- - If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), - then the example code will also manage the USB trace output. The - amount of trace output can be controlled this configuration value: - This setting will show USB device controller interrupt-related events. - -endif # EXAMPLES_USBMSC_TRACE - -if NSH_BUILTIN_APPS - -config EXAMPLES_USBMSC_CMD_STACKSIZE - int "Stacksize of msconn and msdis commands" - default 768 - ---help--- - Size of the stack used by the small 'msconn' and 'msdis' command - applications. Warning, just because the applications are small, - the stack usage could still be deep! - -config EXAMPLES_USBMSC_CMD_PRIORITY - int "Priority of the msconn and msdis commands" - default 100 - ---help--- - Priority of the small 'msconn' and 'msdis' command applications. - -config EXAMPLES_USBMSC_DAEMON_STACKSIZE - int "Stacksize of msconn daemon" - default 2048 - ---help--- - To avoid threading entanglements, the USB MSC class is initialized - on a daemon thread. This permits the msconn application to return - to the NSH command line immediately. This is the stack used for - that short-lived USB MSC initialization daemon. - -config EXAMPLES_USBMSC_DAEMON_PRIORITY - int "Priority of the msconn daemon" - default 100 - ---help--- - To avoid threading entanglements, the USB MSC class is initialized - on a daemon thread. This permits the msconn application to return - to the NSH command line immediately. This is the priority used for - that short-lived USB MSC initialization daemon. - -endif # NSH_BUILTIN_APPS -endif # EXAMPLES_USBMSC - diff --git a/apps/examples/usbmsc/Makefile b/apps/examples/usbmsc/Makefile deleted file mode 100644 index 73031e991..000000000 --- a/apps/examples/usbmsc/Makefile +++ /dev/null @@ -1,120 +0,0 @@ -############################################################################ -# apps/examples/usbmsc/Makefile -# -# Copyright (C) 2008, 2010-2012 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - --include $(TOPDIR)/.config --include $(TOPDIR)/Make.defs -include $(APPDIR)/Make.defs - -# USB device mass storage example - -ASRCS = -CSRCS = usbmsc_main.c - -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) - -SRCS = $(ASRCS) $(CSRCS) -OBJS = $(AOBJS) $(COBJS) - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) -else -ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) -else - BIN = ../../libapps$(LIBEXT) -endif -endif - -ROOTDEPPATH = --dep-path . - -# USB storage built-in application info - -CONFIG_EXAMPLES_USBMSC_CMD_STACKSIZE ?= 768 -CONFIG_EXAMPLES_USBMSC_CMD_PRIORITY ?= SCHED_PRIORITY_DEFAULT - -APPNAME1 = msconn -PRIORITY1 = $(CONFIG_EXAMPLES_USBMSC_CMD_PRIORITY) -STACKSIZE1 = $(CONFIG_EXAMPLES_USBMSC_CMD_STACKSIZE) - -APPNAME2 = msdis -PRIORITY2 = $(CONFIG_EXAMPLES_USBMSC_CMD_PRIORITY) -STACKSIZE2 = $(CONFIG_EXAMPLES_USBMSC_CMD_STACKSIZE) - -# Common build - -VPATH = - -all: .built -.PHONY: context clean depend distclean - -$(AOBJS): %$(OBJEXT): %.S - $(call ASSEMBLE, $<, $@) - -$(COBJS): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) - -.built: $(OBJS) - $(call ARCHIVE, $(BIN), $(OBJS)) - @touch .built - -ifeq ($(CONFIG_NSH_BUILTIN_APPS),y) -$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME1)_main.bdat: $(DEPCONFIG) Makefile - $(call REGISTER,$(APPNAME1),$(PRIORITY1),$(STACKSIZE1),$(APPNAME1)_main) - -$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME2)_main.bdat: $(DEPCONFIG) Makefile - $(call REGISTER,$(APPNAME2),$(PRIORITY2),$(STACKSIZE2),$(APPNAME2)_main) - -context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME1)_main.bdat $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME2)_main.bdat -else -context: -endif - -.depend: Makefile $(SRCS) - @$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep - @touch $@ - -depend: .depend - -clean: - $(call DELFILE, .built) - $(call CLEAN) - -distclean: clean - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep - diff --git a/apps/examples/usbmsc/usbmsc.h b/apps/examples/usbmsc/usbmsc.h deleted file mode 100644 index e0e3ba81b..000000000 --- a/apps/examples/usbmsc/usbmsc.h +++ /dev/null @@ -1,180 +0,0 @@ -/**************************************************************************** - * examples/usbmsc/usbmsc.h - * - * Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -#ifndef __EXAMPLES_USBSTORAGE_USBMSC_H -#define __EXAMPLES_USBSTORAGE_USBMSC_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include - -/**************************************************************************** - * Pre-Processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -#ifndef CONFIG_EXAMPLES_USBMSC_NLUNS -# define CONFIG_EXAMPLES_USBMSC_NLUNS 1 -#endif - -#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 -# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 -#endif - -#ifndef CONFIG_EXAMPLES_USBMSC_DEVPATH1 -# define CONFIG_EXAMPLES_USBMSC_DEVPATH1 "/dev/mmcsd0" -#endif - -#if CONFIG_EXAMPLES_USBMSC_NLUNS > 1 -# ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR2 -# error "CONFIG_EXAMPLES_USBMSC_DEVMINOR2 for LUN=2" -# endif -# ifndef CONFIG_EXAMPLES_USBMSC_DEVPATH2 -# error "CONFIG_EXAMPLES_USBMSC_DEVPATH2 for LUN=2" -# endif -# if CONFIG_EXAMPLES_USBMSC_NLUNS > 2 -# ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR3 -# error "CONFIG_EXAMPLES_USBMSC_DEVMINOR2 for LUN=3" -# endif -# ifndef CONFIG_EXAMPLES_USBMSC_DEVPATH3 -# error "CONFIG_EXAMPLES_USBMSC_DEVPATH3 for LUN=3" -# endif -# if CONFIG_EXAMPLES_USBMSC_NLUNS > 3 -# error "CONFIG_EXAMPLES_USBMSC_NLUNS must be {1,2,3}" -# endif -# else -# undef CONFIG_EXAMPLES_USBMSC_DEVMINOR3 -# undef CONFIG_EXAMPLES_USBMSC_DEVPATH3 -# endif -#else -# undef CONFIG_EXAMPLES_USBMSC_DEVMINOR2 -# undef CONFIG_EXAMPLES_USBMSC_DEVPATH2 -# undef CONFIG_EXAMPLES_USBMSC_DEVMINOR3 -# undef CONFIG_EXAMPLES_USBMSC_DEVPATH3 -#endif - -#if defined(CONFIG_NSH_BUILTIN_APPS) && defined(CONFIG_SCHED_WAITPID) -# ifndef CONFIG_EXAMPLES_USBMSC_DAEMON_STACKSIZE -# define CONFIG_EXAMPLES_USBMSC_DAEMON_STACKSIZE 2048 -# endif -#endif - -/* Debug ********************************************************************/ - -#ifdef CONFIG_CPP_HAVE_VARARGS -# ifdef CONFIG_DEBUG -# define message(...) lowsyslog(__VA_ARGS__) -# define msgflush() -# else -# define message(...) printf(__VA_ARGS__) -# define msgflush() fflush(stdout) -# endif -#else -# ifdef CONFIG_DEBUG -# define message lowsyslog -# define msgflush() -# else -# define message printf -# define msgflush() fflush(stdout) -# endif -#endif - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/* All global variables used by this example are packed into a structure in - * order to avoid name collisions. - */ - -#if defined(CONFIG_NSH_BUILTIN_APPS) || defined(CONFIG_EXAMPLES_USBMSC_DEBUGMM) -struct usbmsc_state_s -{ - /* This is the handle that references to this particular USB storage driver - * instance. It is only needed if the USB mass storage device example is - * built using CONFIG_NSH_BUILTIN_APPS. In this case, the value - * of the driver handle must be remembered between the 'msconn' and 'msdis' - * commands. - */ - -#ifdef CONFIG_NSH_BUILTIN_APPS - FAR void *mshandle; -#endif - - /* Heap usage samples. These are useful for checking USB storage memory - * usage and for tracking down memoryh leaks. - */ - -#ifdef CONFIG_EXAMPLES_USBMSC_DEBUGMM - struct mallinfo mmstart; /* Memory usage before the connection */ - struct mallinfo mmprevious; /* The last memory usage sample */ - struct mallinfo mmcurrent; /* The current memory usage sample */ -#endif -}; -#endif - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/* All global variables used by this example are packed into a structure in - * order to avoid name collisions. - */ - -#if defined(CONFIG_NSH_BUILTIN_APPS) || defined(CONFIG_EXAMPLES_USBMSC_DEBUGMM) -extern struct usbmsc_state_s g_usbmsc; -#endif - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: usbmsc_archinitialize - * - * Description: - * Perform architecture specific initialization. This function must - * configure the block device to export via USB. This function must be - * provided by architecture-specific logic in order to use this example. - * - ****************************************************************************/ - -extern int usbmsc_archinitialize(void); - -#endif /* __EXAMPLES_USBSTORAGE_USBMSC_H */ diff --git a/apps/examples/usbmsc/usbmsc_main.c b/apps/examples/usbmsc/usbmsc_main.c deleted file mode 100644 index 20938d6ca..000000000 --- a/apps/examples/usbmsc/usbmsc_main.c +++ /dev/null @@ -1,660 +0,0 @@ -/**************************************************************************** - * examples/usbmsc/usbmsc_main.c - * - * Copyright (C) 2008-2012 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include -#include -#include - -#include -#include - -#include "usbmsc.h" - -/**************************************************************************** - * Definitions - ****************************************************************************/ - -#ifdef CONFIG_EXAMPLES_USBMSC_TRACEINIT -# define TRACE_INIT_BITS (TRACE_INIT_BIT) -#else -# define TRACE_INIT_BITS (0) -#endif - -#define TRACE_ERROR_BITS (TRACE_DEVERROR_BIT|TRACE_CLSERROR_BIT) - -#ifdef CONFIG_EXAMPLES_USBMSC_TRACECLASS -# define TRACE_CLASS_BITS (TRACE_CLASS_BIT|TRACE_CLASSAPI_BIT|TRACE_CLASSSTATE_BIT) -#else -# define TRACE_CLASS_BITS (0) -#endif - -#ifdef CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS -# define TRACE_TRANSFER_BITS (TRACE_OUTREQQUEUED_BIT|TRACE_INREQQUEUED_BIT|TRACE_READ_BIT|\ - TRACE_WRITE_BIT|TRACE_COMPLETE_BIT) -#else -# define TRACE_TRANSFER_BITS (0) -#endif - -#ifdef CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER -# define TRACE_CONTROLLER_BITS (TRACE_EP_BIT|TRACE_DEV_BIT) -#else -# define TRACE_CONTROLLER_BITS (0) -#endif - -#ifdef CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS -# define TRACE_INTERRUPT_BITS (TRACE_INTENTRY_BIT|TRACE_INTDECODE_BIT|TRACE_INTEXIT_BIT) -#else -# define TRACE_INTERRUPT_BITS (0) -#endif - -#define TRACE_BITSET (TRACE_INIT_BITS|TRACE_ERROR_BITS|TRACE_CLASS_BITS|\ - TRACE_TRANSFER_BITS|TRACE_CONTROLLER_BITS|TRACE_INTERRUPT_BITS) - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/* All global variables used by this example are packed into a structure in - * order to avoid name collisions. - */ - -#if defined(CONFIG_NSH_BUILTIN_APPS) || defined(CONFIG_EXAMPLES_USBMSC_DEBUGMM) -struct usbmsc_state_s g_usbmsc; -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: show_memory_usage - ****************************************************************************/ - -#ifdef CONFIG_EXAMPLES_USBMSC_DEBUGMM -static void show_memory_usage(struct mallinfo *mmbefore, - struct mallinfo *mmafter) -{ - int diff; - - message(" total used free largest\n"); - message("Before:%11d%11d%11d%11d\n", - mmbefore->arena, mmbefore->uordblks, mmbefore->fordblks, mmbefore->mxordblk); - message("After: %11d%11d%11d%11d\n", - mmafter->arena, mmafter->uordblks, mmafter->fordblks, mmafter->mxordblk); - - diff = mmbefore->uordblks - mmafter->uordblks; - if (diff < 0) - { - message("Change:%11d allocated\n", -diff); - } - else if (diff > 0) - { - message("Change:%11d freed\n", diff); - } -} -#else -# define show_memory_usage(mm1, mm2) -#endif - -/**************************************************************************** - * Name: check_test_memory_usage - ****************************************************************************/ - -#ifdef CONFIG_EXAMPLES_USBMSC_DEBUGMM -static void check_test_memory_usage(FAR const char *msg) -{ - /* Get the current memory usage */ - -#ifdef CONFIG_CAN_PASS_STRUCTS - g_usbmsc.mmcurrent = mallinfo(); -#else - (void)mallinfo(&g_usbmsc.mmcurrent); -#endif - - /* Show the change from the previous time */ - - message("\%s:\n", msg); - show_memory_usage(&g_usbmsc.mmprevious, &g_usbmsc.mmcurrent); - - /* Set up for the next test */ - -#ifdef CONFIG_CAN_PASS_STRUCTS - g_usbmsc.mmprevious = g_usbmsc.mmcurrent; -#else - memcpy(&g_usbmsc.mmprevious, &g_usbmsc.mmcurrent, sizeof(struct mallinfo)); -#endif -} -#else -# define check_test_memory_usage(msg) -#endif - -/**************************************************************************** - * Name: check_test_memory_usage - ****************************************************************************/ - -#ifdef CONFIG_EXAMPLES_USBMSC_DEBUGMM -static void final_memory_usage(FAR const char *msg) -{ - /* Get the current memory usage */ - -#ifdef CONFIG_CAN_PASS_STRUCTS - g_usbmsc.mmcurrent = mallinfo(); -#else - (void)mallinfo(&g_usbmsc.mmcurrent); -#endif - - /* Show the change from the previous time */ - - message("\n%s:\n", msg); - show_memory_usage(&g_usbmsc.mmstart, &g_usbmsc.mmcurrent); -} -#else -# define final_memory_usage(msg) -#endif - -/**************************************************************************** - * Name: usbmsc_enumerate - ****************************************************************************/ - -#ifdef CONFIG_EXAMPLES_USBMSC_TRACE -static int usbmsc_enumerate(struct usbtrace_s *trace, void *arg) -{ - switch (trace->event) - { - case TRACE_DEVINIT: - message("USB controller initialization: %04x\n", trace->value); - break; - - case TRACE_DEVUNINIT: - message("USB controller un-initialization: %04x\n", trace->value); - break; - - case TRACE_DEVREGISTER: - message("usbdev_register(): %04x\n", trace->value); - break; - - case TRACE_DEVUNREGISTER: - message("usbdev_unregister(): %04x\n", trace->value); - break; - - case TRACE_EPCONFIGURE: - message("Endpoint configure(): %04x\n", trace->value); - break; - - case TRACE_EPDISABLE: - message("Endpoint disable(): %04x\n", trace->value); - break; - - case TRACE_EPALLOCREQ: - message("Endpoint allocreq(): %04x\n", trace->value); - break; - - case TRACE_EPFREEREQ: - message("Endpoint freereq(): %04x\n", trace->value); - break; - - case TRACE_EPALLOCBUFFER: - message("Endpoint allocbuffer(): %04x\n", trace->value); - break; - - case TRACE_EPFREEBUFFER: - message("Endpoint freebuffer(): %04x\n", trace->value); - break; - - case TRACE_EPSUBMIT: - message("Endpoint submit(): %04x\n", trace->value); - break; - - case TRACE_EPCANCEL: - message("Endpoint cancel(): %04x\n", trace->value); - break; - - case TRACE_EPSTALL: - message("Endpoint stall(true): %04x\n", trace->value); - break; - - case TRACE_EPRESUME: - message("Endpoint stall(false): %04x\n", trace->value); - break; - - case TRACE_DEVALLOCEP: - message("Device allocep(): %04x\n", trace->value); - break; - - case TRACE_DEVFREEEP: - message("Device freeep(): %04x\n", trace->value); - break; - - case TRACE_DEVGETFRAME: - message("Device getframe(): %04x\n", trace->value); - break; - - case TRACE_DEVWAKEUP: - message("Device wakeup(): %04x\n", trace->value); - break; - - case TRACE_DEVSELFPOWERED: - message("Device selfpowered(): %04x\n", trace->value); - break; - - case TRACE_DEVPULLUP: - message("Device pullup(): %04x\n", trace->value); - break; - - case TRACE_CLASSBIND: - message("Class bind(): %04x\n", trace->value); - break; - - case TRACE_CLASSUNBIND: - message("Class unbind(): %04x\n", trace->value); - break; - - case TRACE_CLASSDISCONNECT: - message("Class disconnect(): %04x\n", trace->value); - break; - - case TRACE_CLASSSETUP: - message("Class setup(): %04x\n", trace->value); - break; - - case TRACE_CLASSSUSPEND: - message("Class suspend(): %04x\n", trace->value); - break; - - case TRACE_CLASSRESUME: - message("Class resume(): %04x\n", trace->value); - break; - - case TRACE_CLASSRDCOMPLETE: - message("Class RD request complete: %04x\n", trace->value); - break; - - case TRACE_CLASSWRCOMPLETE: - message("Class WR request complete: %04x\n", trace->value); - break; - - default: - switch (TRACE_ID(trace->event)) - { - case TRACE_CLASSAPI_ID: /* Other class driver system API calls */ - message("Class API call %d: %04x\n", TRACE_DATA(trace->event), trace->value); - break; - - case TRACE_CLASSSTATE_ID: /* Track class driver state changes */ - message("Class state %d: %04x\n", TRACE_DATA(trace->event), trace->value); - break; - - case TRACE_INTENTRY_ID: /* Interrupt handler entry */ - message("Interrrupt %d entry: %04x\n", TRACE_DATA(trace->event), trace->value); - break; - - case TRACE_INTDECODE_ID: /* Decoded interrupt trace->event */ - message("Interrrupt decode %d: %04x\n", TRACE_DATA(trace->event), trace->value); - break; - - case TRACE_INTEXIT_ID: /* Interrupt handler exit */ - message("Interrrupt %d exit: %04x\n", TRACE_DATA(trace->event), trace->value); - break; - - case TRACE_OUTREQQUEUED_ID: /* Request queued for OUT endpoint */ - message("EP%d OUT request queued: %04x\n", TRACE_DATA(trace->event), trace->value); - break; - - case TRACE_INREQQUEUED_ID: /* Request queued for IN endpoint */ - message("EP%d IN request queued: %04x\n", TRACE_DATA(trace->event), trace->value); - break; - - case TRACE_READ_ID: /* Read (OUT) action */ - message("EP%d OUT read: %04x\n", TRACE_DATA(trace->event), trace->value); - break; - - case TRACE_WRITE_ID: /* Write (IN) action */ - message("EP%d IN write: %04x\n", TRACE_DATA(trace->event), trace->value); - break; - - case TRACE_COMPLETE_ID: /* Request completed */ - message("EP%d request complete: %04x\n", TRACE_DATA(trace->event), trace->value); - break; - - case TRACE_DEVERROR_ID: /* USB controller driver error event */ - message("Controller error: %02x:%04x\n", TRACE_DATA(trace->event), trace->value); - break; - - case TRACE_CLSERROR_ID: /* USB class driver error event */ - message("Class error: %02x:%04x\n", TRACE_DATA(trace->event), trace->value); - break; - - default: - message("Unrecognized event: %02x:%02x:%04x\n", - TRACE_ID(trace->event) >> 8, TRACE_DATA(trace->event), trace->value); - break; - } - } - return OK; -} -#endif - -/**************************************************************************** - * msconn_main - * - * Description: - * This is the main program that configures the USB mass storage device - * and exports the LUN(s). If CONFIG_NSH_BUILTIN_APPS is defined - * in the NuttX configuration, then this program can be executed by - * entering the "msconn" command at the NSH console. - * - ****************************************************************************/ - -static int msconn_daemon(int argc, char *argv[]) -{ - FAR void *handle; - int ret; - - /* If this program is implemented as the NSH 'msconn' command, then we need to - * do a little error checking to assure that we are not being called re-entrantly. - */ - -#ifdef CONFIG_NSH_BUILTIN_APPS - /* Check if there is a non-NULL USB mass storage device handle (meaning that the - * USB mass storage device is already configured). - */ - - if (g_usbmsc.mshandle) - { - message("msconn_main: ERROR: Already connected\n"); - return EXIT_FAILURE; - } -#endif - -#ifdef CONFIG_EXAMPLES_USBMSC_DEBUGMM -# ifdef CONFIG_CAN_PASS_STRUCTS - g_usbmsc.mmstart = mallinfo(); - g_usbmsc.mmprevious = g_usbmsc.mmstart; -# else - (void)mallinfo(&g_usbmsc.mmstart); - memcpy(&g_usbmsc.mmprevious, &g_usbmsc.mmstart, sizeof(struct mallinfo)); -# endif -#endif - - /* Initialize USB trace output IDs */ - -#ifdef CONFIG_EXAMPLES_USBMSC_TRACE - usbtrace_enable(TRACE_BITSET); - check_test_memory_usage("After usbtrace_enable()"); -#endif - - /* Register block drivers (architecture-specific) */ - - message("msconn_main: Creating block drivers\n"); - ret = usbmsc_archinitialize(); - if (ret < 0) - { - message("msconn_main: usbmsc_archinitialize failed: %d\n", -ret); - return EXIT_FAILURE; - } - check_test_memory_usage("After usbmsc_archinitialize()"); - - /* Then exports the LUN(s) */ - - message("msconn_main: Configuring with NLUNS=%d\n", CONFIG_EXAMPLES_USBMSC_NLUNS); - ret = usbmsc_configure(CONFIG_EXAMPLES_USBMSC_NLUNS, &handle); - if (ret < 0) - { - message("msconn_main: usbmsc_configure failed: %d\n", -ret); - usbmsc_uninitialize(handle); - return EXIT_FAILURE; - } - message("msconn_main: handle=%p\n", handle); - check_test_memory_usage("After usbmsc_configure()"); - - message("msconn_main: Bind LUN=0 to %s\n", CONFIG_EXAMPLES_USBMSC_DEVPATH1); - ret = usbmsc_bindlun(handle, CONFIG_EXAMPLES_USBMSC_DEVPATH1, 0, 0, 0, false); - if (ret < 0) - { - message("msconn_main: usbmsc_bindlun failed for LUN 1 using %s: %d\n", - CONFIG_EXAMPLES_USBMSC_DEVPATH1, -ret); - usbmsc_uninitialize(handle); - return EXIT_FAILURE; - } - check_test_memory_usage("After usbmsc_bindlun()"); - -#if CONFIG_EXAMPLES_USBMSC_NLUNS > 1 - - message("msconn_main: Bind LUN=1 to %s\n", CONFIG_EXAMPLES_USBMSC_DEVPATH2); - ret = usbmsc_bindlun(handle, CONFIG_EXAMPLES_USBMSC_DEVPATH2, 1, 0, 0, false); - if (ret < 0) - { - message("msconn_main: usbmsc_bindlun failed for LUN 2 using %s: %d\n", - CONFIG_EXAMPLES_USBMSC_DEVPATH2, -ret); - usbmsc_uninitialize(handle); - return EXIT_FAILURE; - } - check_test_memory_usage("After usbmsc_bindlun() #2"); - -#if CONFIG_EXAMPLES_USBMSC_NLUNS > 2 - - message("msconn_main: Bind LUN=2 to %s\n", CONFIG_EXAMPLES_USBMSC_DEVPATH3); - ret = usbmsc_bindlun(handle, CONFIG_EXAMPLES_USBMSC_DEVPATH3, 2, 0, 0, false); - if (ret < 0) - { - message("msconn_main: usbmsc_bindlun failed for LUN 3 using %s: %d\n", - CONFIG_EXAMPLES_USBMSC_DEVPATH3, -ret); - usbmsc_uninitialize(handle); - return EXIT_FAILURE; - } - check_test_memory_usage("After usbmsc_bindlun() #3"); - -#endif -#endif - - ret = usbmsc_exportluns(handle); - if (ret < 0) - { - message("msconn_main: usbmsc_exportluns failed: %d\n", -ret); - usbmsc_uninitialize(handle); - return EXIT_FAILURE; - } - check_test_memory_usage("After usbmsc_exportluns()"); - - /* It this program was configued as an NSH command, then just exit now. - * Also, if signals are not enabled (and, hence, sleep() is not supported. - * then we have not real option but to exit now. - */ - -#if !defined(CONFIG_NSH_BUILTIN_APPS) && !defined(CONFIG_DISABLE_SIGNALS) - - /* Otherwise, this thread will hang around and monitor the USB storage activity */ - - for (;;) - { - msgflush(); - sleep(5); - -# ifdef CONFIG_EXAMPLES_USBMSC_TRACE - message("\nmsconn_main: USB TRACE DATA:\n"); - ret = usbtrace_enumerate(usbmsc_enumerate, NULL); - if (ret < 0) - { - message("msconn_main: usbtrace_enumerate failed: %d\n", -ret); - usbmsc_uninitialize(handle); - return EXIT_FAILURE; - } - check_test_memory_usage("After usbtrace_enumerate()"); -# else - message("msconn_main: Still alive\n"); -# endif - } -#elif defined(CONFIG_NSH_BUILTIN_APPS) - - /* Return the USB mass storage device handle so it can be used by the 'misconn' - * command. - */ - - message("msconn_main: Connected\n"); - g_usbmsc.mshandle = handle; - check_test_memory_usage("After MS connection"); - -#else /* defined(CONFIG_DISABLE_SIGNALS) */ - - /* Just exit */ - - message("msconn_main: Exiting\n"); - - /* Dump debug memory usage */ - - final_memory_usage("Final memory usage"); -#endif - return EXIT_SUCCESS; -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * msconn_main - * - * Description: - * This is the main program that configures the USB mass storage device - * and exports the LUN(s). If CONFIG_NSH_BUILTIN_APPS is defined - * in the NuttX configuration, then this program can be executed by - * entering the "msconn" command at the NSH console. - * - ****************************************************************************/ - -int msconn_main(int argc, char *argv[]) -{ - /* If this function is started as a built-in application from the NSH - * command line, then daemonize. Why? Because NSH is probably waiting - * on waitpid() for msconn to complete. But the USB MSC initialization - * logic creates a dedicated worker thread using pthread_create(). As - * consequences, there will be two members of the task group and waitpid() - * will not wake up when msconn returns. It will not wake-up until both - * msconn and the USB MSC work thread terminate. - */ - -#if defined(CONFIG_NSH_BUILTIN_APPS) && defined(CONFIG_SCHED_WAITPID) - char *newargv[1] = { NULL }; - struct sched_param param; - int ret; - - /* Check if there is a non-NULL USB mass storage device handle (meaning - * that the USB mass storage device is already configured). There is - * no handshaking so there is a race condition: We will check again - * when the daemon is started. - * - * REVISIT: This might a good application for vfork(); - */ - - if (g_usbmsc.mshandle) - { - message("msconn_main: ERROR: Already connected\n"); - return 1; - } - -#ifndef CONFIG_EXAMPLES_USBMSC_DAEMON_PRIORITY - /* Set the daemon to the same priority as this task */ - - ret = sched_getparam(0, ¶m); - if (ret < 0) - { - message("msconn_main: ERROR: Already connected\n"); - return EXIT_FAILURE; - } -#else - param.sched_priority = CONFIG_EXAMPLES_USBMSC_DAEMON_PRIORITY; -#endif - - ret = TASK_CREATE("msconn daemon", param.sched_priority, - CONFIG_EXAMPLES_USBMSC_DAEMON_STACKSIZE, - msconn_daemon, newargv); - if (ret < 0) - { - message("msconn_main: ERROR: TASK_CREATE failed: %d\n", ret); - return EXIT_FAILURE; - } - - return EXIT_SUCCESS; -#else - /* Otherwise, there is no need to daemonize */ - - return msconn_daemon(argc, argv); -#endif -} - -/**************************************************************************** - * msdis_main - * - * Description: - * This is a program entry point that will disconnet the USB mass storage - * device. This program is only available if CONFIG_NSH_BUILTIN_APPS - * is defined in the NuttX configuration. In that case, this program can - * be executed by entering the "msdis" command at the NSH console. - * - ****************************************************************************/ - -#ifdef CONFIG_NSH_BUILTIN_APPS -int msdis_main(int argc, char *argv[]) -{ - /* First check if the USB mass storage device is already connected */ - - if (!g_usbmsc.mshandle) - { - message("msdis: ERROR: Not connected\n"); - return EXIT_FAILURE; - } - check_test_memory_usage("Since MS connection"); - - /* Then disconnect the device and uninitialize the USB mass storage driver */ - - usbmsc_uninitialize(g_usbmsc.mshandle); - g_usbmsc.mshandle = NULL; - message("msdis: Disconnected\n"); - check_test_memory_usage("After usbmsc_uninitialize()"); - - /* Dump debug memory usage */ - - final_memory_usage("Final memory usage"); - return EXIT_SUCCESS; -} -#endif diff --git a/apps/system/Kconfig b/apps/system/Kconfig index b2e1f3c62..22d212b12 100644 --- a/apps/system/Kconfig +++ b/apps/system/Kconfig @@ -51,6 +51,10 @@ menu "Stack Monitor" source "$APPSDIR/system/stackmonitor/Kconfig" endmenu +menu "USB Mass Storage Class" +source "$APPSDIR/system/usbmsc/Kconfig" +endmenu + menu "Zmodem Commands" source "$APPSDIR/system/zmodem/Kconfig" endmenu diff --git a/apps/system/Make.defs b/apps/system/Make.defs index 58e4c306d..c12a77af0 100644 --- a/apps/system/Make.defs +++ b/apps/system/Make.defs @@ -82,6 +82,10 @@ ifeq ($(CONFIG_SYSTEM_STACKMONITOR),y) CONFIGURED_APPS += system/stackmonitor endif +ifeq ($(CONFIG_SYSTEM_USBMSC),y) +CONFIGURED_APPS += system/usbmsc +endif + ifeq ($(CONFIG_SYSTEM_ZMODEM),y) CONFIGURED_APPS += system/zmodem endif diff --git a/apps/system/Makefile b/apps/system/Makefile index 8cf858267..01008dbdc 100644 --- a/apps/system/Makefile +++ b/apps/system/Makefile @@ -38,7 +38,7 @@ # Sub-directories containing system task SUBDIRS = flash_eraseall free i2c install poweroff ramtest ramtron readline -SUBDIRS += sdcard stackmonitor sysinfo usbmonitor zmodem +SUBDIRS += sdcard stackmonitor sysinfo usbmonitor usbmsc zmodem # Create the list of installed runtime modules (INSTALLED_DIRS) diff --git a/apps/system/usbmsc/.gitignore b/apps/system/usbmsc/.gitignore new file mode 100644 index 000000000..fa1ec7579 --- /dev/null +++ b/apps/system/usbmsc/.gitignore @@ -0,0 +1,11 @@ +/Make.dep +/.depend +/.built +/*.asm +/*.obj +/*.rel +/*.lst +/*.sym +/*.adb +/*.lib +/*.src diff --git a/apps/system/usbmsc/Kconfig b/apps/system/usbmsc/Kconfig new file mode 100644 index 000000000..d78f8a8ac --- /dev/null +++ b/apps/system/usbmsc/Kconfig @@ -0,0 +1,171 @@ +# +# For a description of the syntax of this configuration file, +# see misc/tools/kconfig-language.txt. +# + +config SYSTEM_USBMSC + bool "USB mass storage class controls" + default n + depends on USBMSC + ---help--- + Enable the USB mass storage class controls. These controls include: + + msconn: Connect the mass storage device to the host + msdis : Disconnect the mass storage device to the host + +if SYSTEM_USBMSC + +config SYSTEM_USBMSC_NLUNS + int "Number of LUNs" + default 1 + ---help--- + Defines the number of logical units (LUNs) exported by the USB + storage driver. Each LUN corresponds to one exported block driver + (or partition of a block driver). May be 1, 2, or 3. Default is 1. + +config SYSTEM_USBMSC_DEVMINOR1 + int "LUN1 Minor Device Number" + default 0 + ---help--- + The minor device number of the block driver for the first LUN. For + example, N in /dev/mmcsdN. Used for registering the block driver. + Default is zero. + +config SYSTEM_USBMSC_DEVPATH1 + string "LUN1 Device Path" + default "/dev/mmcsd0" + ---help--- + The full path to the registered block driver. Default is + "/dev/mmcsd0" + +config SYSTEM_USBMSC_DEVMINOR2 + int "LUN2 Minor Device Number" + default 1 + ---help--- + The minor device number of the block driver for the second LUN. For + example, N in /dev/mmcsdN. Used for registering the block driver. + Ignored if SYSTEM_USBMSC_NLUNS < 2. Default is one. + +config SYSTEM_USBMSC_DEVPATH2 + string "LUN2 Device Path" + default "/dev/mmcsd1" + ---help--- + The full path to the registered block driver. Ignored if + SYSTEM_USBMSC_NLUNS < 2. Default is "/dev/mmcsd1" + +config SYSTEM_USBMSC_DEVMINOR3 + int "LUN3 Minor Device Number" + default 2 + ---help--- + The minor device number of the block driver for the third LUN. For + example, N in /dev/mmcsdN. Used for registering the block driver. + Ignored if SYSTEM_USBMSC_NLUNS < 2. Default is two. + +config SYSTEM_USBMSC_DEVPATH3 + string "LUN3 Device Path" + default "/dev/mmcsd2" + ---help--- + The full path to the registered block driver. Ignored if + SYSTEM_USBMSC_NLUNS < 2. Default is "/dev/mmcsd2" + +config SYSTEM_USBMSC_DEBUGMM + bool "USB MSC MM Debug" + default n + ---help--- + Enables some debug tests to check for memory usage and memory leaks. + +config SYSTEM_USBMSC_TRACE + bool "Trace USB activity" + default n + depends on (USBDEV_TRACE || DEBUG_USB) && !NSH_BUILTIN_APPS + ---help--- + If this add-on is built as a standalone task and if USB device tracing is + enabled, then this add-on can be configured to unobtrusively monitor + USB activity by selecting this option. + +if SYSTEM_USBMSC_TRACE + +config SYSTEM_USBMSC_TRACEINIT + bool "USB Trace Initialization" + default n + ---help--- + If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + then the add-on code will also manage the USB trace output. The + amount of trace output can be controlled this configuration value: + This setting will show USB initialization events + +config SYSTEM_USBMSC_TRACECLASS + bool "USB Trace Class" + default n + ---help--- + If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + then the add-on code will also manage the USB trace output. The + amount of trace output can be controlled this configuration value: + This setting will show USB class driver events + +config SYSTEM_USBMSC_TRACETRANSFERS + bool "USB Trace Transfers" + default n + ---help--- + If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + then the add-on code will also manage the USB trace output. The + amount of trace output can be controlled this configuration value: + This setting will show USB data transfer events + +config SYSTEM_USBMSC_TRACECONTROLLER + bool "USB Trace Device Controller Events" + default n + ---help--- + If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + then the add-on code will also manage the USB trace output. The + amount of trace output can be controlled this configuration value: + This setting will show USB device controller events + +config SYSTEM_USBMSC_TRACEINTERRUPTS + bool "USB Trace Device Controller Interrupt Events" + default n + ---help--- + If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + then the add-on code will also manage the USB trace output. The + amount of trace output can be controlled this configuration value: + This setting will show USB device controller interrupt-related events. + +endif # SYSTEM_USBMSC_TRACE + +if NSH_BUILTIN_APPS + +config SYSTEM_USBMSC_CMD_STACKSIZE + int "Stacksize of msconn and msdis commands" + default 768 + ---help--- + Size of the stack used by the small 'msconn' and 'msdis' command + applications. Warning, just because the applications are small, + the stack usage could still be deep! + +config SYSTEM_USBMSC_CMD_PRIORITY + int "Priority of the msconn and msdis commands" + default 100 + ---help--- + Priority of the small 'msconn' and 'msdis' command applications. + +config SYSTEM_USBMSC_DAEMON_STACKSIZE + int "Stacksize of msconn daemon" + default 2048 + ---help--- + To avoid threading entanglements, the USB MSC class is initialized + on a daemon thread. This permits the msconn application to return + to the NSH command line immediately. This is the stack used for + that short-lived USB MSC initialization daemon. + +config SYSTEM_USBMSC_DAEMON_PRIORITY + int "Priority of the msconn daemon" + default 100 + ---help--- + To avoid threading entanglements, the USB MSC class is initialized + on a daemon thread. This permits the msconn application to return + to the NSH command line immediately. This is the priority used for + that short-lived USB MSC initialization daemon. + +endif # NSH_BUILTIN_APPS +endif # SYSTEM_USBMSC + diff --git a/apps/system/usbmsc/Makefile b/apps/system/usbmsc/Makefile new file mode 100644 index 000000000..842733ef7 --- /dev/null +++ b/apps/system/usbmsc/Makefile @@ -0,0 +1,120 @@ +############################################################################ +# apps/system/usbmsc/Makefile +# +# Copyright (C) 2008, 2010-2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +-include $(TOPDIR)/.config +-include $(TOPDIR)/Make.defs +include $(APPDIR)/Make.defs + +# USB device mass storage add-on + +ASRCS = +CSRCS = usbmsc_main.c + +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) + +SRCS = $(ASRCS) $(CSRCS) +OBJS = $(AOBJS) $(COBJS) + +ifeq ($(CONFIG_WINDOWS_NATIVE),y) + BIN = ..\..\libapps$(LIBEXT) +else +ifeq ($(WINTOOL),y) + BIN = ..\\..\\libapps$(LIBEXT) +else + BIN = ../../libapps$(LIBEXT) +endif +endif + +ROOTDEPPATH = --dep-path . + +# USB storage built-in application info + +CONFIG_SYSTEM_USBMSC_CMD_STACKSIZE ?= 768 +CONFIG_SYSTEM_USBMSC_CMD_PRIORITY ?= SCHED_PRIORITY_DEFAULT + +APPNAME1 = msconn +PRIORITY1 = $(CONFIG_SYSTEM_USBMSC_CMD_PRIORITY) +STACKSIZE1 = $(CONFIG_SYSTEM_USBMSC_CMD_STACKSIZE) + +APPNAME2 = msdis +PRIORITY2 = $(CONFIG_SYSTEM_USBMSC_CMD_PRIORITY) +STACKSIZE2 = $(CONFIG_SYSTEM_USBMSC_CMD_STACKSIZE) + +# Common build + +VPATH = + +all: .built +.PHONY: context clean depend distclean + +$(AOBJS): %$(OBJEXT): %.S + $(call ASSEMBLE, $<, $@) + +$(COBJS): %$(OBJEXT): %.c + $(call COMPILE, $<, $@) + +.built: $(OBJS) + $(call ARCHIVE, $(BIN), $(OBJS)) + @touch .built + +ifeq ($(CONFIG_NSH_BUILTIN_APPS),y) +$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME1)_main.bdat: $(DEPCONFIG) Makefile + $(call REGISTER,$(APPNAME1),$(PRIORITY1),$(STACKSIZE1),$(APPNAME1)_main) + +$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME2)_main.bdat: $(DEPCONFIG) Makefile + $(call REGISTER,$(APPNAME2),$(PRIORITY2),$(STACKSIZE2),$(APPNAME2)_main) + +context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME1)_main.bdat $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME2)_main.bdat +else +context: +endif + +.depend: Makefile $(SRCS) + @$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + @touch $@ + +depend: .depend + +clean: + $(call DELFILE, .built) + $(call CLEAN) + +distclean: clean + $(call DELFILE, Make.dep) + $(call DELFILE, .depend) + +-include Make.dep + diff --git a/apps/system/usbmsc/usbmsc.h b/apps/system/usbmsc/usbmsc.h new file mode 100644 index 000000000..c829473e4 --- /dev/null +++ b/apps/system/usbmsc/usbmsc.h @@ -0,0 +1,180 @@ +/**************************************************************************** + * system/usbmsc/usbmsc.h + * + * Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +#ifndef __EXAMPLES_USBSTORAGE_USBMSC_H +#define __EXAMPLES_USBSTORAGE_USBMSC_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ + +/* Configuration ************************************************************/ + +#ifndef CONFIG_SYSTEM_USBMSC_NLUNS +# define CONFIG_SYSTEM_USBMSC_NLUNS 1 +#endif + +#ifndef CONFIG_SYSTEM_USBMSC_DEVMINOR1 +# define CONFIG_SYSTEM_USBMSC_DEVMINOR1 0 +#endif + +#ifndef CONFIG_SYSTEM_USBMSC_DEVPATH1 +# define CONFIG_SYSTEM_USBMSC_DEVPATH1 "/dev/mmcsd0" +#endif + +#if CONFIG_SYSTEM_USBMSC_NLUNS > 1 +# ifndef CONFIG_SYSTEM_USBMSC_DEVMINOR2 +# error "CONFIG_SYSTEM_USBMSC_DEVMINOR2 for LUN=2" +# endif +# ifndef CONFIG_SYSTEM_USBMSC_DEVPATH2 +# error "CONFIG_SYSTEM_USBMSC_DEVPATH2 for LUN=2" +# endif +# if CONFIG_SYSTEM_USBMSC_NLUNS > 2 +# ifndef CONFIG_SYSTEM_USBMSC_DEVMINOR3 +# error "CONFIG_SYSTEM_USBMSC_DEVMINOR2 for LUN=3" +# endif +# ifndef CONFIG_SYSTEM_USBMSC_DEVPATH3 +# error "CONFIG_SYSTEM_USBMSC_DEVPATH3 for LUN=3" +# endif +# if CONFIG_SYSTEM_USBMSC_NLUNS > 3 +# error "CONFIG_SYSTEM_USBMSC_NLUNS must be {1,2,3}" +# endif +# else +# undef CONFIG_SYSTEM_USBMSC_DEVMINOR3 +# undef CONFIG_SYSTEM_USBMSC_DEVPATH3 +# endif +#else +# undef CONFIG_SYSTEM_USBMSC_DEVMINOR2 +# undef CONFIG_SYSTEM_USBMSC_DEVPATH2 +# undef CONFIG_SYSTEM_USBMSC_DEVMINOR3 +# undef CONFIG_SYSTEM_USBMSC_DEVPATH3 +#endif + +#if defined(CONFIG_NSH_BUILTIN_APPS) && defined(CONFIG_SCHED_WAITPID) +# ifndef CONFIG_SYSTEM_USBMSC_DAEMON_STACKSIZE +# define CONFIG_SYSTEM_USBMSC_DAEMON_STACKSIZE 2048 +# endif +#endif + +/* Debug ********************************************************************/ + +#ifdef CONFIG_CPP_HAVE_VARARGS +# ifdef CONFIG_DEBUG +# define message(...) lowsyslog(__VA_ARGS__) +# define msgflush() +# else +# define message(...) printf(__VA_ARGS__) +# define msgflush() fflush(stdout) +# endif +#else +# ifdef CONFIG_DEBUG +# define message lowsyslog +# define msgflush() +# else +# define message printf +# define msgflush() fflush(stdout) +# endif +#endif + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +/* All global variables used by this add-on are packed into a structure in + * order to avoid name collisions. + */ + +#if defined(CONFIG_NSH_BUILTIN_APPS) || defined(CONFIG_SYSTEM_USBMSC_DEBUGMM) +struct usbmsc_state_s +{ + /* This is the handle that references to this particular USB storage driver + * instance. It is only needed if the USB mass storage device add-on is + * built using CONFIG_NSH_BUILTIN_APPS. In this case, the value + * of the driver handle must be remembered between the 'msconn' and 'msdis' + * commands. + */ + +#ifdef CONFIG_NSH_BUILTIN_APPS + FAR void *mshandle; +#endif + + /* Heap usage samples. These are useful for checking USB storage memory + * usage and for tracking down memoryh leaks. + */ + +#ifdef CONFIG_SYSTEM_USBMSC_DEBUGMM + struct mallinfo mmstart; /* Memory usage before the connection */ + struct mallinfo mmprevious; /* The last memory usage sample */ + struct mallinfo mmcurrent; /* The current memory usage sample */ +#endif +}; +#endif + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +/* All global variables used by this add-on are packed into a structure in + * order to avoid name collisions. + */ + +#if defined(CONFIG_NSH_BUILTIN_APPS) || defined(CONFIG_SYSTEM_USBMSC_DEBUGMM) +extern struct usbmsc_state_s g_usbmsc; +#endif + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: usbmsc_archinitialize + * + * Description: + * Perform architecture specific initialization. This function must + * configure the block device to export via USB. This function must be + * provided by architecture-specific logic in order to use this add-on. + * + ****************************************************************************/ + +extern int usbmsc_archinitialize(void); + +#endif /* __EXAMPLES_USBSTORAGE_USBMSC_H */ diff --git a/apps/system/usbmsc/usbmsc_main.c b/apps/system/usbmsc/usbmsc_main.c new file mode 100644 index 000000000..3b3dc96cc --- /dev/null +++ b/apps/system/usbmsc/usbmsc_main.c @@ -0,0 +1,660 @@ +/**************************************************************************** + * system/usbmsc/usbmsc_main.c + * + * Copyright (C) 2008-2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include "usbmsc.h" + +/**************************************************************************** + * Definitions + ****************************************************************************/ + +#ifdef CONFIG_SYSTEM_USBMSC_TRACEINIT +# define TRACE_INIT_BITS (TRACE_INIT_BIT) +#else +# define TRACE_INIT_BITS (0) +#endif + +#define TRACE_ERROR_BITS (TRACE_DEVERROR_BIT|TRACE_CLSERROR_BIT) + +#ifdef CONFIG_SYSTEM_USBMSC_TRACECLASS +# define TRACE_CLASS_BITS (TRACE_CLASS_BIT|TRACE_CLASSAPI_BIT|TRACE_CLASSSTATE_BIT) +#else +# define TRACE_CLASS_BITS (0) +#endif + +#ifdef CONFIG_SYSTEM_USBMSC_TRACETRANSFERS +# define TRACE_TRANSFER_BITS (TRACE_OUTREQQUEUED_BIT|TRACE_INREQQUEUED_BIT|TRACE_READ_BIT|\ + TRACE_WRITE_BIT|TRACE_COMPLETE_BIT) +#else +# define TRACE_TRANSFER_BITS (0) +#endif + +#ifdef CONFIG_SYSTEM_USBMSC_TRACECONTROLLER +# define TRACE_CONTROLLER_BITS (TRACE_EP_BIT|TRACE_DEV_BIT) +#else +# define TRACE_CONTROLLER_BITS (0) +#endif + +#ifdef CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS +# define TRACE_INTERRUPT_BITS (TRACE_INTENTRY_BIT|TRACE_INTDECODE_BIT|TRACE_INTEXIT_BIT) +#else +# define TRACE_INTERRUPT_BITS (0) +#endif + +#define TRACE_BITSET (TRACE_INIT_BITS|TRACE_ERROR_BITS|TRACE_CLASS_BITS|\ + TRACE_TRANSFER_BITS|TRACE_CONTROLLER_BITS|TRACE_INTERRUPT_BITS) + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/* All global variables used by this add-on are packed into a structure in + * order to avoid name collisions. + */ + +#if defined(CONFIG_NSH_BUILTIN_APPS) || defined(CONFIG_SYSTEM_USBMSC_DEBUGMM) +struct usbmsc_state_s g_usbmsc; +#endif + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: show_memory_usage + ****************************************************************************/ + +#ifdef CONFIG_SYSTEM_USBMSC_DEBUGMM +static void show_memory_usage(struct mallinfo *mmbefore, + struct mallinfo *mmafter) +{ + int diff; + + message(" total used free largest\n"); + message("Before:%11d%11d%11d%11d\n", + mmbefore->arena, mmbefore->uordblks, mmbefore->fordblks, mmbefore->mxordblk); + message("After: %11d%11d%11d%11d\n", + mmafter->arena, mmafter->uordblks, mmafter->fordblks, mmafter->mxordblk); + + diff = mmbefore->uordblks - mmafter->uordblks; + if (diff < 0) + { + message("Change:%11d allocated\n", -diff); + } + else if (diff > 0) + { + message("Change:%11d freed\n", diff); + } +} +#else +# define show_memory_usage(mm1, mm2) +#endif + +/**************************************************************************** + * Name: check_test_memory_usage + ****************************************************************************/ + +#ifdef CONFIG_SYSTEM_USBMSC_DEBUGMM +static void check_test_memory_usage(FAR const char *msg) +{ + /* Get the current memory usage */ + +#ifdef CONFIG_CAN_PASS_STRUCTS + g_usbmsc.mmcurrent = mallinfo(); +#else + (void)mallinfo(&g_usbmsc.mmcurrent); +#endif + + /* Show the change from the previous time */ + + message("\%s:\n", msg); + show_memory_usage(&g_usbmsc.mmprevious, &g_usbmsc.mmcurrent); + + /* Set up for the next test */ + +#ifdef CONFIG_CAN_PASS_STRUCTS + g_usbmsc.mmprevious = g_usbmsc.mmcurrent; +#else + memcpy(&g_usbmsc.mmprevious, &g_usbmsc.mmcurrent, sizeof(struct mallinfo)); +#endif +} +#else +# define check_test_memory_usage(msg) +#endif + +/**************************************************************************** + * Name: check_test_memory_usage + ****************************************************************************/ + +#ifdef CONFIG_SYSTEM_USBMSC_DEBUGMM +static void final_memory_usage(FAR const char *msg) +{ + /* Get the current memory usage */ + +#ifdef CONFIG_CAN_PASS_STRUCTS + g_usbmsc.mmcurrent = mallinfo(); +#else + (void)mallinfo(&g_usbmsc.mmcurrent); +#endif + + /* Show the change from the previous time */ + + message("\n%s:\n", msg); + show_memory_usage(&g_usbmsc.mmstart, &g_usbmsc.mmcurrent); +} +#else +# define final_memory_usage(msg) +#endif + +/**************************************************************************** + * Name: usbmsc_enumerate + ****************************************************************************/ + +#ifdef CONFIG_SYSTEM_USBMSC_TRACE +static int usbmsc_enumerate(struct usbtrace_s *trace, void *arg) +{ + switch (trace->event) + { + case TRACE_DEVINIT: + message("USB controller initialization: %04x\n", trace->value); + break; + + case TRACE_DEVUNINIT: + message("USB controller un-initialization: %04x\n", trace->value); + break; + + case TRACE_DEVREGISTER: + message("usbdev_register(): %04x\n", trace->value); + break; + + case TRACE_DEVUNREGISTER: + message("usbdev_unregister(): %04x\n", trace->value); + break; + + case TRACE_EPCONFIGURE: + message("Endpoint configure(): %04x\n", trace->value); + break; + + case TRACE_EPDISABLE: + message("Endpoint disable(): %04x\n", trace->value); + break; + + case TRACE_EPALLOCREQ: + message("Endpoint allocreq(): %04x\n", trace->value); + break; + + case TRACE_EPFREEREQ: + message("Endpoint freereq(): %04x\n", trace->value); + break; + + case TRACE_EPALLOCBUFFER: + message("Endpoint allocbuffer(): %04x\n", trace->value); + break; + + case TRACE_EPFREEBUFFER: + message("Endpoint freebuffer(): %04x\n", trace->value); + break; + + case TRACE_EPSUBMIT: + message("Endpoint submit(): %04x\n", trace->value); + break; + + case TRACE_EPCANCEL: + message("Endpoint cancel(): %04x\n", trace->value); + break; + + case TRACE_EPSTALL: + message("Endpoint stall(true): %04x\n", trace->value); + break; + + case TRACE_EPRESUME: + message("Endpoint stall(false): %04x\n", trace->value); + break; + + case TRACE_DEVALLOCEP: + message("Device allocep(): %04x\n", trace->value); + break; + + case TRACE_DEVFREEEP: + message("Device freeep(): %04x\n", trace->value); + break; + + case TRACE_DEVGETFRAME: + message("Device getframe(): %04x\n", trace->value); + break; + + case TRACE_DEVWAKEUP: + message("Device wakeup(): %04x\n", trace->value); + break; + + case TRACE_DEVSELFPOWERED: + message("Device selfpowered(): %04x\n", trace->value); + break; + + case TRACE_DEVPULLUP: + message("Device pullup(): %04x\n", trace->value); + break; + + case TRACE_CLASSBIND: + message("Class bind(): %04x\n", trace->value); + break; + + case TRACE_CLASSUNBIND: + message("Class unbind(): %04x\n", trace->value); + break; + + case TRACE_CLASSDISCONNECT: + message("Class disconnect(): %04x\n", trace->value); + break; + + case TRACE_CLASSSETUP: + message("Class setup(): %04x\n", trace->value); + break; + + case TRACE_CLASSSUSPEND: + message("Class suspend(): %04x\n", trace->value); + break; + + case TRACE_CLASSRESUME: + message("Class resume(): %04x\n", trace->value); + break; + + case TRACE_CLASSRDCOMPLETE: + message("Class RD request complete: %04x\n", trace->value); + break; + + case TRACE_CLASSWRCOMPLETE: + message("Class WR request complete: %04x\n", trace->value); + break; + + default: + switch (TRACE_ID(trace->event)) + { + case TRACE_CLASSAPI_ID: /* Other class driver system API calls */ + message("Class API call %d: %04x\n", TRACE_DATA(trace->event), trace->value); + break; + + case TRACE_CLASSSTATE_ID: /* Track class driver state changes */ + message("Class state %d: %04x\n", TRACE_DATA(trace->event), trace->value); + break; + + case TRACE_INTENTRY_ID: /* Interrupt handler entry */ + message("Interrrupt %d entry: %04x\n", TRACE_DATA(trace->event), trace->value); + break; + + case TRACE_INTDECODE_ID: /* Decoded interrupt trace->event */ + message("Interrrupt decode %d: %04x\n", TRACE_DATA(trace->event), trace->value); + break; + + case TRACE_INTEXIT_ID: /* Interrupt handler exit */ + message("Interrrupt %d exit: %04x\n", TRACE_DATA(trace->event), trace->value); + break; + + case TRACE_OUTREQQUEUED_ID: /* Request queued for OUT endpoint */ + message("EP%d OUT request queued: %04x\n", TRACE_DATA(trace->event), trace->value); + break; + + case TRACE_INREQQUEUED_ID: /* Request queued for IN endpoint */ + message("EP%d IN request queued: %04x\n", TRACE_DATA(trace->event), trace->value); + break; + + case TRACE_READ_ID: /* Read (OUT) action */ + message("EP%d OUT read: %04x\n", TRACE_DATA(trace->event), trace->value); + break; + + case TRACE_WRITE_ID: /* Write (IN) action */ + message("EP%d IN write: %04x\n", TRACE_DATA(trace->event), trace->value); + break; + + case TRACE_COMPLETE_ID: /* Request completed */ + message("EP%d request complete: %04x\n", TRACE_DATA(trace->event), trace->value); + break; + + case TRACE_DEVERROR_ID: /* USB controller driver error event */ + message("Controller error: %02x:%04x\n", TRACE_DATA(trace->event), trace->value); + break; + + case TRACE_CLSERROR_ID: /* USB class driver error event */ + message("Class error: %02x:%04x\n", TRACE_DATA(trace->event), trace->value); + break; + + default: + message("Unrecognized event: %02x:%02x:%04x\n", + TRACE_ID(trace->event) >> 8, TRACE_DATA(trace->event), trace->value); + break; + } + } + return OK; +} +#endif + +/**************************************************************************** + * msconn_main + * + * Description: + * This is the main program that configures the USB mass storage device + * and exports the LUN(s). If CONFIG_NSH_BUILTIN_APPS is defined + * in the NuttX configuration, then this program can be executed by + * entering the "msconn" command at the NSH console. + * + ****************************************************************************/ + +static int msconn_daemon(int argc, char *argv[]) +{ + FAR void *handle; + int ret; + + /* If this program is implemented as the NSH 'msconn' command, then we need to + * do a little error checking to assure that we are not being called re-entrantly. + */ + +#ifdef CONFIG_NSH_BUILTIN_APPS + /* Check if there is a non-NULL USB mass storage device handle (meaning that the + * USB mass storage device is already configured). + */ + + if (g_usbmsc.mshandle) + { + message("msconn_main: ERROR: Already connected\n"); + return EXIT_FAILURE; + } +#endif + +#ifdef CONFIG_SYSTEM_USBMSC_DEBUGMM +# ifdef CONFIG_CAN_PASS_STRUCTS + g_usbmsc.mmstart = mallinfo(); + g_usbmsc.mmprevious = g_usbmsc.mmstart; +# else + (void)mallinfo(&g_usbmsc.mmstart); + memcpy(&g_usbmsc.mmprevious, &g_usbmsc.mmstart, sizeof(struct mallinfo)); +# endif +#endif + + /* Initialize USB trace output IDs */ + +#ifdef CONFIG_SYSTEM_USBMSC_TRACE + usbtrace_enable(TRACE_BITSET); + check_test_memory_usage("After usbtrace_enable()"); +#endif + + /* Register block drivers (architecture-specific) */ + + message("msconn_main: Creating block drivers\n"); + ret = usbmsc_archinitialize(); + if (ret < 0) + { + message("msconn_main: usbmsc_archinitialize failed: %d\n", -ret); + return EXIT_FAILURE; + } + check_test_memory_usage("After usbmsc_archinitialize()"); + + /* Then exports the LUN(s) */ + + message("msconn_main: Configuring with NLUNS=%d\n", CONFIG_SYSTEM_USBMSC_NLUNS); + ret = usbmsc_configure(CONFIG_SYSTEM_USBMSC_NLUNS, &handle); + if (ret < 0) + { + message("msconn_main: usbmsc_configure failed: %d\n", -ret); + usbmsc_uninitialize(handle); + return EXIT_FAILURE; + } + message("msconn_main: handle=%p\n", handle); + check_test_memory_usage("After usbmsc_configure()"); + + message("msconn_main: Bind LUN=0 to %s\n", CONFIG_SYSTEM_USBMSC_DEVPATH1); + ret = usbmsc_bindlun(handle, CONFIG_SYSTEM_USBMSC_DEVPATH1, 0, 0, 0, false); + if (ret < 0) + { + message("msconn_main: usbmsc_bindlun failed for LUN 1 using %s: %d\n", + CONFIG_SYSTEM_USBMSC_DEVPATH1, -ret); + usbmsc_uninitialize(handle); + return EXIT_FAILURE; + } + check_test_memory_usage("After usbmsc_bindlun()"); + +#if CONFIG_SYSTEM_USBMSC_NLUNS > 1 + + message("msconn_main: Bind LUN=1 to %s\n", CONFIG_SYSTEM_USBMSC_DEVPATH2); + ret = usbmsc_bindlun(handle, CONFIG_SYSTEM_USBMSC_DEVPATH2, 1, 0, 0, false); + if (ret < 0) + { + message("msconn_main: usbmsc_bindlun failed for LUN 2 using %s: %d\n", + CONFIG_SYSTEM_USBMSC_DEVPATH2, -ret); + usbmsc_uninitialize(handle); + return EXIT_FAILURE; + } + check_test_memory_usage("After usbmsc_bindlun() #2"); + +#if CONFIG_SYSTEM_USBMSC_NLUNS > 2 + + message("msconn_main: Bind LUN=2 to %s\n", CONFIG_SYSTEM_USBMSC_DEVPATH3); + ret = usbmsc_bindlun(handle, CONFIG_SYSTEM_USBMSC_DEVPATH3, 2, 0, 0, false); + if (ret < 0) + { + message("msconn_main: usbmsc_bindlun failed for LUN 3 using %s: %d\n", + CONFIG_SYSTEM_USBMSC_DEVPATH3, -ret); + usbmsc_uninitialize(handle); + return EXIT_FAILURE; + } + check_test_memory_usage("After usbmsc_bindlun() #3"); + +#endif +#endif + + ret = usbmsc_exportluns(handle); + if (ret < 0) + { + message("msconn_main: usbmsc_exportluns failed: %d\n", -ret); + usbmsc_uninitialize(handle); + return EXIT_FAILURE; + } + check_test_memory_usage("After usbmsc_exportluns()"); + + /* It this program was configued as an NSH command, then just exit now. + * Also, if signals are not enabled (and, hence, sleep() is not supported. + * then we have not real option but to exit now. + */ + +#if !defined(CONFIG_NSH_BUILTIN_APPS) && !defined(CONFIG_DISABLE_SIGNALS) + + /* Otherwise, this thread will hang around and monitor the USB storage activity */ + + for (;;) + { + msgflush(); + sleep(5); + +# ifdef CONFIG_SYSTEM_USBMSC_TRACE + message("\nmsconn_main: USB TRACE DATA:\n"); + ret = usbtrace_enumerate(usbmsc_enumerate, NULL); + if (ret < 0) + { + message("msconn_main: usbtrace_enumerate failed: %d\n", -ret); + usbmsc_uninitialize(handle); + return EXIT_FAILURE; + } + check_test_memory_usage("After usbtrace_enumerate()"); +# else + message("msconn_main: Still alive\n"); +# endif + } +#elif defined(CONFIG_NSH_BUILTIN_APPS) + + /* Return the USB mass storage device handle so it can be used by the 'misconn' + * command. + */ + + message("msconn_main: Connected\n"); + g_usbmsc.mshandle = handle; + check_test_memory_usage("After MS connection"); + +#else /* defined(CONFIG_DISABLE_SIGNALS) */ + + /* Just exit */ + + message("msconn_main: Exiting\n"); + + /* Dump debug memory usage */ + + final_memory_usage("Final memory usage"); +#endif + return EXIT_SUCCESS; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * msconn_main + * + * Description: + * This is the main program that configures the USB mass storage device + * and exports the LUN(s). If CONFIG_NSH_BUILTIN_APPS is defined + * in the NuttX configuration, then this program can be executed by + * entering the "msconn" command at the NSH console. + * + ****************************************************************************/ + +int msconn_main(int argc, char *argv[]) +{ + /* If this function is started as a built-in application from the NSH + * command line, then daemonize. Why? Because NSH is probably waiting + * on waitpid() for msconn to complete. But the USB MSC initialization + * logic creates a dedicated worker thread using pthread_create(). As + * consequences, there will be two members of the task group and waitpid() + * will not wake up when msconn returns. It will not wake-up until both + * msconn and the USB MSC work thread terminate. + */ + +#if defined(CONFIG_NSH_BUILTIN_APPS) && defined(CONFIG_SCHED_WAITPID) + char *newargv[1] = { NULL }; + struct sched_param param; + int ret; + + /* Check if there is a non-NULL USB mass storage device handle (meaning + * that the USB mass storage device is already configured). There is + * no handshaking so there is a race condition: We will check again + * when the daemon is started. + * + * REVISIT: This might a good application for vfork(); + */ + + if (g_usbmsc.mshandle) + { + message("msconn_main: ERROR: Already connected\n"); + return 1; + } + +#ifndef CONFIG_SYSTEM_USBMSC_DAEMON_PRIORITY + /* Set the daemon to the same priority as this task */ + + ret = sched_getparam(0, ¶m); + if (ret < 0) + { + message("msconn_main: ERROR: Already connected\n"); + return EXIT_FAILURE; + } +#else + param.sched_priority = CONFIG_SYSTEM_USBMSC_DAEMON_PRIORITY; +#endif + + ret = TASK_CREATE("msconn daemon", param.sched_priority, + CONFIG_SYSTEM_USBMSC_DAEMON_STACKSIZE, + msconn_daemon, newargv); + if (ret < 0) + { + message("msconn_main: ERROR: TASK_CREATE failed: %d\n", ret); + return EXIT_FAILURE; + } + + return EXIT_SUCCESS; +#else + /* Otherwise, there is no need to daemonize */ + + return msconn_daemon(argc, argv); +#endif +} + +/**************************************************************************** + * msdis_main + * + * Description: + * This is a program entry point that will disconnet the USB mass storage + * device. This program is only available if CONFIG_NSH_BUILTIN_APPS + * is defined in the NuttX configuration. In that case, this program can + * be executed by entering the "msdis" command at the NSH console. + * + ****************************************************************************/ + +#ifdef CONFIG_NSH_BUILTIN_APPS +int msdis_main(int argc, char *argv[]) +{ + /* First check if the USB mass storage device is already connected */ + + if (!g_usbmsc.mshandle) + { + message("msdis: ERROR: Not connected\n"); + return EXIT_FAILURE; + } + check_test_memory_usage("Since MS connection"); + + /* Then disconnect the device and uninitialize the USB mass storage driver */ + + usbmsc_uninitialize(g_usbmsc.mshandle); + g_usbmsc.mshandle = NULL; + message("msdis: Disconnected\n"); + check_test_memory_usage("After usbmsc_uninitialize()"); + + /* Dump debug memory usage */ + + final_memory_usage("Final memory usage"); + return EXIT_SUCCESS; +} +#endif diff --git a/misc/uClibc++/install.sh b/misc/uClibc++/install.sh index e60f0fc9c..f3dc09892 100755 --- a/misc/uClibc++/install.sh +++ b/misc/uClibc++/install.sh @@ -301,7 +301,7 @@ fi echo -e ${lgpl} | more echo "" -readyn "I agree to the termso the GNU LGPL Version 3 license" "N" +readyn "I agree to the terms of the GNU LGPL Version 3 license" "N" echo "" if [ "X${ans}" != "Xy" -a "X${ans}" != "XY" ]; then diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 67d50634b..5807df015 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -5629,4 +5629,5 @@ and STM32 Kconfigs into the common network driver Kconfig (2013-9-25). * arch/arm/src/sam_emac.c: EMAC driver is basically functional. More testing is needed (as always) (2013-9-25). - + * configs: Changes to many defconfig files resulting from moving + apps/examples/usbmsc to apps/system/usbmsc (2013-9-25). diff --git a/nuttx/Documentation/README.html b/nuttx/Documentation/README.html index 748c51622..759e71816 100644 --- a/nuttx/Documentation/README.html +++ b/nuttx/Documentation/README.html @@ -265,6 +265,7 @@ | `- system/ | |- i2c/README.txt | |- install/README.txt + | |- usbmsc/README.txt | `- zmodem/README.txt `- NxWidgets |- Doxygen diff --git a/nuttx/README.txt b/nuttx/README.txt index 76d2b9b19..0d681179c 100644 --- a/nuttx/README.txt +++ b/nuttx/README.txt @@ -191,7 +191,7 @@ Notes about Header Files header file then you should also define CONFIG_ARCH_MATH_H=y in your NuttX Configuration file. If CONFIG_ARCH_MATH_H is selected, then the top-level Makefile will copy the stub math.h header file from - include/nuttx/matn.h to include/math.h where it will become the system + include/nuttx/math.h to include/math.h where it will become the system math.h header file. The stub math.h header file does nothing other than to include that archicture-specific math.h header file as the system math.h header file. @@ -1200,6 +1200,8 @@ apps | | `- README.txt | |- install | | `- README.txt + | |- usbmsc + | | `- README.txt | `- zmodem | `- README.txt `- README.txt diff --git a/nuttx/configs/amber/hello/defconfig b/nuttx/configs/amber/hello/defconfig index 2092d160f..734ee564f 100644 --- a/nuttx/configs/amber/hello/defconfig +++ b/nuttx/configs/amber/hello/defconfig @@ -398,16 +398,16 @@ CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Stack and heap information diff --git a/nuttx/configs/arduino-due/nsh/defconfig b/nuttx/configs/arduino-due/nsh/defconfig index e3f68950f..7707fefdc 100644 --- a/nuttx/configs/arduino-due/nsh/defconfig +++ b/nuttx/configs/arduino-due/nsh/defconfig @@ -530,7 +530,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/arduino-due/ostest/defconfig b/nuttx/configs/arduino-due/ostest/defconfig index c9fc0c54b..b77e2bdef 100644 --- a/nuttx/configs/arduino-due/ostest/defconfig +++ b/nuttx/configs/arduino-due/ostest/defconfig @@ -521,7 +521,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/cloudctrl/nsh/defconfig b/nuttx/configs/cloudctrl/nsh/defconfig index 585f3acca..81b97f617 100644 --- a/nuttx/configs/cloudctrl/nsh/defconfig +++ b/nuttx/configs/cloudctrl/nsh/defconfig @@ -556,7 +556,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WLAN is not set diff --git a/nuttx/configs/cloudctrl/src/up_usbmsc.c b/nuttx/configs/cloudctrl/src/up_usbmsc.c index 454cfccf5..57888986b 100644 --- a/nuttx/configs/cloudctrl/src/up_usbmsc.c +++ b/nuttx/configs/cloudctrl/src/up_usbmsc.c @@ -53,8 +53,8 @@ ****************************************************************************/ /* Configuration ************************************************************/ -#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 -# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 +#ifndef CONFIG_SYSTEM_USBMSC_DEVMINOR1 +# define CONFIG_SYSTEM_USBMSC_DEVMINOR1 0 #endif /* Debug ********************************************************************/ @@ -91,13 +91,13 @@ int usbmsc_archinitialize(void) { - /* If examples/usbmsc is built as an NSH command, then SD slot should + /* If system/usbmsc is built as an NSH command, then SD slot should * already have been initized in nsh_archinitialize() (see up_nsh.c). In * this case, there is nothing further to be done here. */ #ifndef CONFIG_NSH_BUILTIN_APPS - return stm32_sdinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1); + return stm32_sdinitialize(CONFIG_SYSTEM_USBMSC_DEVMINOR1); #else return OK; #endif diff --git a/nuttx/configs/ea3131/README.txt b/nuttx/configs/ea3131/README.txt index c5d7436a4..40cafa402 100644 --- a/nuttx/configs/ea3131/README.txt +++ b/nuttx/configs/ea3131/README.txt @@ -648,6 +648,6 @@ Where is one of the following: usbmsc: This configuration directory exercises the USB mass storage - class driver at examples/usbmsc. See examples/README.txt for + class driver at system/usbmsc. See examples/README.txt for more information. diff --git a/nuttx/configs/ea3131/src/up_usbmsc.c b/nuttx/configs/ea3131/src/up_usbmsc.c index b91bc3598..80f8eee9b 100644 --- a/nuttx/configs/ea3131/src/up_usbmsc.c +++ b/nuttx/configs/ea3131/src/up_usbmsc.c @@ -57,15 +57,15 @@ /* Configuration ************************************************************/ -#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 -# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 +#ifndef CONFIG_SYSTEM_USBMSC_DEVMINOR1 +# define CONFIG_SYSTEM_USBMSC_DEVMINOR1 0 #endif -#ifndef CONFIG_EXAMPLES_USBMSC_DEVPATH1 -# define CONFIG_EXAMPLES_USBMSC_DEVPATH1 "/dev/ram" +#ifndef CONFIG_SYSTEM_USBMSC_DEVPATH1 +# define CONFIG_SYSTEM_USBMSC_DEVPATH1 "/dev/ram" #endif -static const char g_source[] = CONFIG_EXAMPLES_USBMSC_DEVPATH1; +static const char g_source[] = CONFIG_SYSTEM_USBMSC_DEVPATH1; static struct fat_format_s g_fmt = FAT_FORMAT_INITIALIZER; #define USBMSC_NSECTORS 64 @@ -99,7 +99,7 @@ int usbmsc_archinitialize(void) /* Register a RAMDISK device to manage this RAM image */ - ret = ramdisk_register(CONFIG_EXAMPLES_USBMSC_DEVMINOR1, + ret = ramdisk_register(CONFIG_SYSTEM_USBMSC_DEVMINOR1, pbuffer, USBMSC_NSECTORS, USBMSC_SECTORSIZE, diff --git a/nuttx/configs/ea3131/usbmsc/appconfig b/nuttx/configs/ea3131/usbmsc/appconfig index 985ad9e47..b5284670c 100644 --- a/nuttx/configs/ea3131/usbmsc/appconfig +++ b/nuttx/configs/ea3131/usbmsc/appconfig @@ -35,5 +35,5 @@ # Path to example in apps/examples containing the user_start entry point -CONFIGURED_APPS += examples/usbmsc +CONFIGURED_APPS += system/usbmsc diff --git a/nuttx/configs/ea3131/usbmsc/defconfig b/nuttx/configs/ea3131/usbmsc/defconfig index 243d26449..ea9826652 100644 --- a/nuttx/configs/ea3131/usbmsc/defconfig +++ b/nuttx/configs/ea3131/usbmsc/defconfig @@ -397,16 +397,16 @@ CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/ram0" -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/ram0" +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Stack and heap information diff --git a/nuttx/configs/ea3131/usbserial/defconfig b/nuttx/configs/ea3131/usbserial/defconfig index 8295b3dc8..8f50fa5fa 100644 --- a/nuttx/configs/ea3131/usbserial/defconfig +++ b/nuttx/configs/ea3131/usbserial/defconfig @@ -396,16 +396,16 @@ CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/ram0" -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/ram0" +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Stack and heap information diff --git a/nuttx/configs/ea3152/src/up_usbmsc.c b/nuttx/configs/ea3152/src/up_usbmsc.c index 311ecb741..66fb11694 100644 --- a/nuttx/configs/ea3152/src/up_usbmsc.c +++ b/nuttx/configs/ea3152/src/up_usbmsc.c @@ -57,15 +57,15 @@ /* Configuration ************************************************************/ -#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 -# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 +#ifndef CONFIG_SYSTEM_USBMSC_DEVMINOR1 +# define CONFIG_SYSTEM_USBMSC_DEVMINOR1 0 #endif -#ifndef CONFIG_EXAMPLES_USBMSC_DEVPATH1 -# define CONFIG_EXAMPLES_USBMSC_DEVPATH1 "/dev/ram" +#ifndef CONFIG_SYSTEM_USBMSC_DEVPATH1 +# define CONFIG_SYSTEM_USBMSC_DEVPATH1 "/dev/ram" #endif -static const char g_source[] = CONFIG_EXAMPLES_USBMSC_DEVPATH1; +static const char g_source[] = CONFIG_SYSTEM_USBMSC_DEVPATH1; static struct fat_format_s g_fmt = FAT_FORMAT_INITIALIZER; #define USBMSC_NSECTORS 64 @@ -99,7 +99,7 @@ int usbmsc_archinitialize(void) /* Register a RAMDISK device to manage this RAM image */ - ret = ramdisk_register(CONFIG_EXAMPLES_USBMSC_DEVMINOR1, + ret = ramdisk_register(CONFIG_SYSTEM_USBMSC_DEVMINOR1, pbuffer, USBMSC_NSECTORS, USBMSC_SECTORSIZE, diff --git a/nuttx/configs/ekk-lm3s9b96/nsh/defconfig b/nuttx/configs/ekk-lm3s9b96/nsh/defconfig index 54e883338..85e605ea2 100644 --- a/nuttx/configs/ekk-lm3s9b96/nsh/defconfig +++ b/nuttx/configs/ekk-lm3s9b96/nsh/defconfig @@ -515,7 +515,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WGET is not set diff --git a/nuttx/configs/ekk-lm3s9b96/ostest/defconfig b/nuttx/configs/ekk-lm3s9b96/ostest/defconfig index 4ac8b4798..dd16055bc 100644 --- a/nuttx/configs/ekk-lm3s9b96/ostest/defconfig +++ b/nuttx/configs/ekk-lm3s9b96/ostest/defconfig @@ -450,7 +450,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/ez80f910200kitg/ostest/defconfig b/nuttx/configs/ez80f910200kitg/ostest/defconfig index 1bdd83568..fff3f1f9e 100644 --- a/nuttx/configs/ez80f910200kitg/ostest/defconfig +++ b/nuttx/configs/ez80f910200kitg/ostest/defconfig @@ -388,7 +388,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WLAN is not set diff --git a/nuttx/configs/ez80f910200zco/ostest/defconfig b/nuttx/configs/ez80f910200zco/ostest/defconfig index 812912a82..83cfeebf9 100644 --- a/nuttx/configs/ez80f910200zco/ostest/defconfig +++ b/nuttx/configs/ez80f910200zco/ostest/defconfig @@ -396,7 +396,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WLAN is not set diff --git a/nuttx/configs/fire-stm32v2/nsh/defconfig b/nuttx/configs/fire-stm32v2/nsh/defconfig index 0d0f50d10..c702ab026 100644 --- a/nuttx/configs/fire-stm32v2/nsh/defconfig +++ b/nuttx/configs/fire-stm32v2/nsh/defconfig @@ -772,20 +772,20 @@ CONFIG_EXAMPLES_NSH=y # # USB Mass Storage Class Example # -CONFIG_EXAMPLES_USBMSC=y -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_DEVMINOR2=1 -CONFIG_EXAMPLES_USBMSC_DEVPATH2="/dev/mmcsd1" -CONFIG_EXAMPLES_USBMSC_DEVMINOR3=2 -CONFIG_EXAMPLES_USBMSC_DEVPATH3="/dev/mmcsd2" -# CONFIG_EXAMPLES_USBMSC_DEBUGMM is not set -# CONFIG_EXAMPLES_USBMSC_TRACEINIT is not set -# CONFIG_EXAMPLES_USBMSC_TRACECLASS is not set -# CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS is not set -# CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER is not set -# CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS is not set +CONFIG_SYSTEM_USBMSC=y +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_DEVMINOR2=1 +CONFIG_SYSTEM_USBMSC_DEVPATH2="/dev/mmcsd1" +CONFIG_SYSTEM_USBMSC_DEVMINOR3=2 +CONFIG_SYSTEM_USBMSC_DEVPATH3="/dev/mmcsd2" +# CONFIG_SYSTEM_USBMSC_DEBUGMM is not set +# CONFIG_SYSTEM_USBMSC_TRACEINIT is not set +# CONFIG_SYSTEM_USBMSC_TRACECLASS is not set +# CONFIG_SYSTEM_USBMSC_TRACETRANSFERS is not set +# CONFIG_SYSTEM_USBMSC_TRACECONTROLLER is not set +# CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS is not set # # USB Serial Terminal Example diff --git a/nuttx/configs/fire-stm32v2/src/up_usbmsc.c b/nuttx/configs/fire-stm32v2/src/up_usbmsc.c index 3a1ebe0e0..41f966e9d 100644 --- a/nuttx/configs/fire-stm32v2/src/up_usbmsc.c +++ b/nuttx/configs/fire-stm32v2/src/up_usbmsc.c @@ -52,8 +52,8 @@ ****************************************************************************/ /* Configuration ************************************************************/ -#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 -# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 +#ifndef CONFIG_SYSTEM_USBMSC_DEVMINOR1 +# define CONFIG_SYSTEM_USBMSC_DEVMINOR1 0 #endif /* Debug ********************************************************************/ @@ -90,13 +90,13 @@ int usbmsc_archinitialize(void) { - /* If examples/usbmsc is built as an NSH command, then SD slot should + /* If system/usbmsc is built as an NSH command, then SD slot should * already have been initized in nsh_archinitialize() (see up_nsh.c). In * this case, there is nothing further to be done here. */ #ifndef CONFIG_NSH_BUILTIN_APPS - return stm32_sdinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1); + return stm32_sdinitialize(CONFIG_SYSTEM_USBMSC_DEVMINOR1); #else return OK; #endif diff --git a/nuttx/configs/freedom-kl25z/nsh/defconfig b/nuttx/configs/freedom-kl25z/nsh/defconfig index 3a8155366..e3347a0a1 100644 --- a/nuttx/configs/freedom-kl25z/nsh/defconfig +++ b/nuttx/configs/freedom-kl25z/nsh/defconfig @@ -487,7 +487,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/freedom-kl25z/ostest/defconfig b/nuttx/configs/freedom-kl25z/ostest/defconfig index e4e1bd7b6..ff325869f 100644 --- a/nuttx/configs/freedom-kl25z/ostest/defconfig +++ b/nuttx/configs/freedom-kl25z/ostest/defconfig @@ -470,7 +470,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=1 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/hymini-stm32v/README.txt b/nuttx/configs/hymini-stm32v/README.txt index e2059b074..37a9c69fc 100644 --- a/nuttx/configs/hymini-stm32v/README.txt +++ b/nuttx/configs/hymini-stm32v/README.txt @@ -610,7 +610,7 @@ Where is one of the following: ----------- ----------------------- -------------------------------- Built-in None apps/examples/nx Apps apps/examples/nxhello - apps/examples/usbmsc (4) + apps/system/usbmsc (4) apps/examples/buttons apps/examples/nximage =========== ======================= ================================ diff --git a/nuttx/configs/hymini-stm32v/buttons/defconfig b/nuttx/configs/hymini-stm32v/buttons/defconfig index ab5bb0c83..66d154d3f 100644 --- a/nuttx/configs/hymini-stm32v/buttons/defconfig +++ b/nuttx/configs/hymini-stm32v/buttons/defconfig @@ -543,7 +543,7 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/hymini-stm32v/nsh/defconfig b/nuttx/configs/hymini-stm32v/nsh/defconfig index ee0272c01..d5704e167 100755 --- a/nuttx/configs/hymini-stm32v/nsh/defconfig +++ b/nuttx/configs/hymini-stm32v/nsh/defconfig @@ -553,7 +553,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/hymini-stm32v/nsh2/defconfig b/nuttx/configs/hymini-stm32v/nsh2/defconfig index 2b58eed35..067169b26 100644 --- a/nuttx/configs/hymini-stm32v/nsh2/defconfig +++ b/nuttx/configs/hymini-stm32v/nsh2/defconfig @@ -723,20 +723,20 @@ CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0" # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -CONFIG_EXAMPLES_USBMSC=y -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_DEVMINOR2=1 -CONFIG_EXAMPLES_USBMSC_DEVPATH2="/dev/mmcsd1" -CONFIG_EXAMPLES_USBMSC_DEVMINOR3=2 -CONFIG_EXAMPLES_USBMSC_DEVPATH3="/dev/mmcsd2" -# CONFIG_EXAMPLES_USBMSC_DEBUGMM is not set -# CONFIG_EXAMPLES_USBMSC_TRACEINIT is not set -# CONFIG_EXAMPLES_USBMSC_TRACECLASS is not set -# CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS is not set -# CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER is not set -# CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS is not set +CONFIG_SYSTEM_USBMSC=y +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_DEVMINOR2=1 +CONFIG_SYSTEM_USBMSC_DEVPATH2="/dev/mmcsd1" +CONFIG_SYSTEM_USBMSC_DEVMINOR3=2 +CONFIG_SYSTEM_USBMSC_DEVPATH3="/dev/mmcsd2" +# CONFIG_SYSTEM_USBMSC_DEBUGMM is not set +# CONFIG_SYSTEM_USBMSC_TRACEINIT is not set +# CONFIG_SYSTEM_USBMSC_TRACECLASS is not set +# CONFIG_SYSTEM_USBMSC_TRACETRANSFERS is not set +# CONFIG_SYSTEM_USBMSC_TRACECONTROLLER is not set +# CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/hymini-stm32v/ostest/defconfig b/nuttx/configs/hymini-stm32v/ostest/defconfig index b270796c2..f29463a90 100644 --- a/nuttx/configs/hymini-stm32v/ostest/defconfig +++ b/nuttx/configs/hymini-stm32v/ostest/defconfig @@ -537,7 +537,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/hymini-stm32v/src/up_usbmsc.c b/nuttx/configs/hymini-stm32v/src/up_usbmsc.c index e7fc41907..105aed5b5 100644 --- a/nuttx/configs/hymini-stm32v/src/up_usbmsc.c +++ b/nuttx/configs/hymini-stm32v/src/up_usbmsc.c @@ -60,8 +60,8 @@ /* Configuration ************************************************************/ -#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 -# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 +#ifndef CONFIG_SYSTEM_USBMSC_DEVMINOR1 +# define CONFIG_SYSTEM_USBMSC_DEVMINOR1 0 #endif /* SLOT number(s) could depend on the board configuration */ @@ -109,7 +109,7 @@ int usbmsc_archinitialize(void) { - /* If examples/usbmsc is built as an NSH command, then SD slot should + /* If system/usbmsc is built as an NSH command, then SD slot should * already have been initialized in nsh_archinitialize() (see up_nsh.c). In * this case, there is nothing further to be done here. */ @@ -136,9 +136,9 @@ int usbmsc_archinitialize(void) message("usbmsc_archinitialize: " "Bind SDIO to the MMC/SD driver, minor=%d\n", - CONFIG_EXAMPLES_USBMSC_DEVMINOR1); + CONFIG_SYSTEM_USBMSC_DEVMINOR1); - ret = mmcsd_slotinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1, sdio); + ret = mmcsd_slotinitialize(CONFIG_SYSTEM_USBMSC_DEVMINOR1, sdio); if (ret != OK) { message("usbmsc_archinitialize: " diff --git a/nuttx/configs/hymini-stm32v/usbmsc/appconfig b/nuttx/configs/hymini-stm32v/usbmsc/appconfig index e0143e969..e97435546 100644 --- a/nuttx/configs/hymini-stm32v/usbmsc/appconfig +++ b/nuttx/configs/hymini-stm32v/usbmsc/appconfig @@ -35,5 +35,5 @@ # Path to example in apps/examples containing the user_start entry point -CONFIGURED_APPS += examples/usbmsc +CONFIGURED_APPS += system/usbmsc diff --git a/nuttx/configs/hymini-stm32v/usbmsc/defconfig b/nuttx/configs/hymini-stm32v/usbmsc/defconfig index be2aed657..2a1aa3ae6 100755 --- a/nuttx/configs/hymini-stm32v/usbmsc/defconfig +++ b/nuttx/configs/hymini-stm32v/usbmsc/defconfig @@ -462,17 +462,17 @@ CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_DEBUGMM=n -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_DEBUGMM=n +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Settings for examples/watchdog diff --git a/nuttx/configs/hymini-stm32v/usbnsh/defconfig b/nuttx/configs/hymini-stm32v/usbnsh/defconfig index f2b74f3dd..433605d66 100644 --- a/nuttx/configs/hymini-stm32v/usbnsh/defconfig +++ b/nuttx/configs/hymini-stm32v/usbnsh/defconfig @@ -586,7 +586,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/kwikstik-k40/ostest/defconfig b/nuttx/configs/kwikstik-k40/ostest/defconfig index fa5663bc1..0b1e1fed8 100755 --- a/nuttx/configs/kwikstik-k40/ostest/defconfig +++ b/nuttx/configs/kwikstik-k40/ostest/defconfig @@ -484,7 +484,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/kwikstik-k40/src/up_usbmsc.c b/nuttx/configs/kwikstik-k40/src/up_usbmsc.c index bbdbbba94..53bdbb402 100644 --- a/nuttx/configs/kwikstik-k40/src/up_usbmsc.c +++ b/nuttx/configs/kwikstik-k40/src/up_usbmsc.c @@ -56,8 +56,8 @@ /* Configuration ************************************************************/ -#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 -# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 +#ifndef CONFIG_SYSTEM_USBMSC_DEVMINOR1 +# define CONFIG_SYSTEM_USBMSC_DEVMINOR1 0 #endif /* SLOT number(s) could depend on the board configuration */ @@ -105,7 +105,7 @@ int usbmsc_archinitialize(void) { - /* If examples/usbmsc is built as an NSH command, then SD slot should + /* If system/usbmsc is built as an NSH command, then SD slot should * already have been initized in nsh_archinitialize() (see up_nsh.c). In * this case, there is nothing further to be done here. */ diff --git a/nuttx/configs/lincoln60/ostest/defconfig b/nuttx/configs/lincoln60/ostest/defconfig index 43e4fe6f8..fbd5c0bdf 100644 --- a/nuttx/configs/lincoln60/ostest/defconfig +++ b/nuttx/configs/lincoln60/ostest/defconfig @@ -465,16 +465,16 @@ CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Stack and heap information diff --git a/nuttx/configs/lm3s6965-ek/discover/defconfig b/nuttx/configs/lm3s6965-ek/discover/defconfig index 7fe3518c0..b1813fc3a 100644 --- a/nuttx/configs/lm3s6965-ek/discover/defconfig +++ b/nuttx/configs/lm3s6965-ek/discover/defconfig @@ -490,7 +490,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WGET is not set diff --git a/nuttx/configs/lm3s6965-ek/nsh/defconfig b/nuttx/configs/lm3s6965-ek/nsh/defconfig index 7fe3518c0..b1813fc3a 100755 --- a/nuttx/configs/lm3s6965-ek/nsh/defconfig +++ b/nuttx/configs/lm3s6965-ek/nsh/defconfig @@ -490,7 +490,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WGET is not set diff --git a/nuttx/configs/lm3s6965-ek/nx/defconfig b/nuttx/configs/lm3s6965-ek/nx/defconfig index cd804e861..c4f3819d2 100755 --- a/nuttx/configs/lm3s6965-ek/nx/defconfig +++ b/nuttx/configs/lm3s6965-ek/nx/defconfig @@ -508,7 +508,7 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/lm3s6965-ek/ostest/defconfig b/nuttx/configs/lm3s6965-ek/ostest/defconfig index 3a08679f9..090547d30 100755 --- a/nuttx/configs/lm3s6965-ek/ostest/defconfig +++ b/nuttx/configs/lm3s6965-ek/ostest/defconfig @@ -433,7 +433,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/lm3s6965-ek/tcpecho/defconfig b/nuttx/configs/lm3s6965-ek/tcpecho/defconfig index e45f4748e..87fc3f389 100644 --- a/nuttx/configs/lm3s6965-ek/tcpecho/defconfig +++ b/nuttx/configs/lm3s6965-ek/tcpecho/defconfig @@ -537,7 +537,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set CONFIG_EXAMPLES_TCPECHO=y CONFIG_EXAMPLES_TCPECHO_PORT=80 diff --git a/nuttx/configs/lm4f120-launchpad/nsh/defconfig b/nuttx/configs/lm4f120-launchpad/nsh/defconfig index 953802df4..187e4683f 100755 --- a/nuttx/configs/lm4f120-launchpad/nsh/defconfig +++ b/nuttx/configs/lm4f120-launchpad/nsh/defconfig @@ -456,7 +456,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/lm4f120-launchpad/ostest/defconfig b/nuttx/configs/lm4f120-launchpad/ostest/defconfig index 2ab53f2e3..94e4e7ab1 100755 --- a/nuttx/configs/lm4f120-launchpad/ostest/defconfig +++ b/nuttx/configs/lm4f120-launchpad/ostest/defconfig @@ -453,7 +453,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/lpcxpresso-lpc1768/README.txt b/nuttx/configs/lpcxpresso-lpc1768/README.txt index 9e4c224cb..0dbabcc1c 100644 --- a/nuttx/configs/lpcxpresso-lpc1768/README.txt +++ b/nuttx/configs/lpcxpresso-lpc1768/README.txt @@ -802,7 +802,7 @@ Where is one of the following: usbmsc: This configuration directory exercises the USB mass storage - class driver at apps/examples/usbmsc. See apps/examples/README.txt + class driver at apps/system/usbmsc. See apps/examples/README.txt for more information. NOTE: At present, the value for the SD SPI frequency is too diff --git a/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig b/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig index 4a42bf0d6..400f5d0b9 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig @@ -463,16 +463,16 @@ CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Stack and heap information diff --git a/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig b/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig index f4790c435..dcf7200c4 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig @@ -473,16 +473,16 @@ CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Stack and heap information diff --git a/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig b/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig index f7fc9b6c8..ed7d045f8 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig @@ -506,16 +506,16 @@ CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Settings for examples/nx diff --git a/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig b/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig index 4300982bc..934dafe4c 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig @@ -451,16 +451,16 @@ CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Stack and heap information diff --git a/nuttx/configs/lpcxpresso-lpc1768/src/up_usbmsc.c b/nuttx/configs/lpcxpresso-lpc1768/src/up_usbmsc.c index 8266952a2..291f244d9 100644 --- a/nuttx/configs/lpcxpresso-lpc1768/src/up_usbmsc.c +++ b/nuttx/configs/lpcxpresso-lpc1768/src/up_usbmsc.c @@ -54,8 +54,8 @@ /* Configuration ************************************************************/ -#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 -# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 +#ifndef CONFIG_SYSTEM_USBMSC_DEVMINOR1 +# define CONFIG_SYSTEM_USBMSC_DEVMINOR1 0 #endif /* PORT and SLOT number probably depend on the board configuration */ @@ -129,7 +129,7 @@ int usbmsc_archinitialize(void) message("usbmsc_archinitialize: Binding SPI port %d to MMC/SD slot %d\n", LPC17XX_MMCSDSPIPORTNO, LPC17XX_MMCSDSLOTNO); - ret = mmcsd_spislotinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1, LPC17XX_MMCSDSLOTNO, spi); + ret = mmcsd_spislotinitialize(CONFIG_SYSTEM_USBMSC_DEVMINOR1, LPC17XX_MMCSDSLOTNO, spi); if (ret < 0) { message("usbmsc_archinitialize: Failed to bind SPI port %d to MMC/SD slot %d: %d\n", diff --git a/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig b/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig index b4fde8c15..608421ca1 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig @@ -490,16 +490,16 @@ CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Stack and heap information diff --git a/nuttx/configs/lpcxpresso-lpc1768/usbmsc/appconfig b/nuttx/configs/lpcxpresso-lpc1768/usbmsc/appconfig index df394f27d..db4fda850 100644 --- a/nuttx/configs/lpcxpresso-lpc1768/usbmsc/appconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/usbmsc/appconfig @@ -35,5 +35,5 @@ # Path to example in apps/examples containing the user_start entry point -CONFIGURED_APPS += examples/usbmsc +CONFIGURED_APPS += system/usbmsc diff --git a/nuttx/configs/lpcxpresso-lpc1768/usbmsc/defconfig b/nuttx/configs/lpcxpresso-lpc1768/usbmsc/defconfig index 0f8656e7a..460b23b79 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/usbmsc/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/usbmsc/defconfig @@ -447,16 +447,16 @@ CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Stack and heap information diff --git a/nuttx/configs/maple/nsh/defconfig b/nuttx/configs/maple/nsh/defconfig index 7d32bd5be..6afab7da4 100644 --- a/nuttx/configs/maple/nsh/defconfig +++ b/nuttx/configs/maple/nsh/defconfig @@ -626,7 +626,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/maple/usbnsh/defconfig b/nuttx/configs/maple/usbnsh/defconfig index 406a73d2a..733d397ee 100644 --- a/nuttx/configs/maple/usbnsh/defconfig +++ b/nuttx/configs/maple/usbnsh/defconfig @@ -647,7 +647,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/mcu123-lpc214x/README.txt b/nuttx/configs/mcu123-lpc214x/README.txt index e9e6c3710..bf25c21e2 100644 --- a/nuttx/configs/mcu123-lpc214x/README.txt +++ b/nuttx/configs/mcu123-lpc214x/README.txt @@ -392,7 +392,7 @@ usbmsc: ------- This configuration directory exercises the USB mass storage - class driver at examples/usbmsc. See examples/README.txt for + class driver at system/usbmsc. See examples/README.txt for more information. Default toolchain: Buildroot diff --git a/nuttx/configs/mcu123-lpc214x/composite/defconfig b/nuttx/configs/mcu123-lpc214x/composite/defconfig index 912214a24..3bffaa966 100644 --- a/nuttx/configs/mcu123-lpc214x/composite/defconfig +++ b/nuttx/configs/mcu123-lpc214x/composite/defconfig @@ -383,16 +383,16 @@ CONFIG_EXAMPLES_USBSERIAL_ONLYSMALL=n CONFIG_EXAMPLES_USBSERIAL_ONLYBIG=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=y -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=y -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=y -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=y +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=y +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=y +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Settings for examples/composite diff --git a/nuttx/configs/mcu123-lpc214x/nsh/defconfig b/nuttx/configs/mcu123-lpc214x/nsh/defconfig index c97f2f3b2..97c94d6f1 100644 --- a/nuttx/configs/mcu123-lpc214x/nsh/defconfig +++ b/nuttx/configs/mcu123-lpc214x/nsh/defconfig @@ -446,7 +446,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WLAN is not set diff --git a/nuttx/configs/mcu123-lpc214x/src/up_usbmsc.c b/nuttx/configs/mcu123-lpc214x/src/up_usbmsc.c index 38f29bc1e..5f9a4e509 100644 --- a/nuttx/configs/mcu123-lpc214x/src/up_usbmsc.c +++ b/nuttx/configs/mcu123-lpc214x/src/up_usbmsc.c @@ -54,8 +54,8 @@ /* Configuration ************************************************************/ -#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 -# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 +#ifndef CONFIG_SYSTEM_USBMSC_DEVMINOR1 +# define CONFIG_SYSTEM_USBMSC_DEVMINOR1 0 #endif /* PORT and SLOT number probably depend on the board configuration */ @@ -129,7 +129,7 @@ int usbmsc_archinitialize(void) message("usbmsc_archinitialize: Binding SPI port %d to MMC/SD slot %d\n", LPC214X_MMCSDSPIPORTNO, LPC214X_MMCSDSLOTNO); - ret = mmcsd_spislotinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1, LPC214X_MMCSDSLOTNO, spi); + ret = mmcsd_spislotinitialize(CONFIG_SYSTEM_USBMSC_DEVMINOR1, LPC214X_MMCSDSLOTNO, spi); if (ret < 0) { message("usbmsc_archinitialize: Failed to bind SPI port %d to MMC/SD slot %d: %d\n", diff --git a/nuttx/configs/mcu123-lpc214x/usbmsc/appconfig b/nuttx/configs/mcu123-lpc214x/usbmsc/appconfig index 2011b6519..79867f26b 100644 --- a/nuttx/configs/mcu123-lpc214x/usbmsc/appconfig +++ b/nuttx/configs/mcu123-lpc214x/usbmsc/appconfig @@ -35,5 +35,5 @@ # Path to example in apps/examples containing the user_start entry point -CONFIGURED_APPS += examples/usbmsc +CONFIGURED_APPS += system/usbmsc diff --git a/nuttx/configs/mcu123-lpc214x/usbmsc/defconfig b/nuttx/configs/mcu123-lpc214x/usbmsc/defconfig index 6a19f399c..647d932f7 100644 --- a/nuttx/configs/mcu123-lpc214x/usbmsc/defconfig +++ b/nuttx/configs/mcu123-lpc214x/usbmsc/defconfig @@ -340,16 +340,16 @@ CONFIG_EXAMPLES_USBSERIAL_ONLYSMALL=n CONFIG_EXAMPLES_USBSERIAL_ONLYBIG=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=y -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=y -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=y -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=y +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=y +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=y +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Stack and heap information diff --git a/nuttx/configs/micropendous3/hello/defconfig b/nuttx/configs/micropendous3/hello/defconfig index 50c72ba6c..7da8dd769 100644 --- a/nuttx/configs/micropendous3/hello/defconfig +++ b/nuttx/configs/micropendous3/hello/defconfig @@ -393,16 +393,16 @@ CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Stack and heap information diff --git a/nuttx/configs/mikroe-stm32f4/fulldemo/defconfig b/nuttx/configs/mikroe-stm32f4/fulldemo/defconfig index d867dc2b5..d3389e780 100644 --- a/nuttx/configs/mikroe-stm32f4/fulldemo/defconfig +++ b/nuttx/configs/mikroe-stm32f4/fulldemo/defconfig @@ -793,7 +793,7 @@ CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0" # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/mikroe-stm32f4/kostest/defconfig b/nuttx/configs/mikroe-stm32f4/kostest/defconfig index 4dbae1237..6efe6dc91 100644 --- a/nuttx/configs/mikroe-stm32f4/kostest/defconfig +++ b/nuttx/configs/mikroe-stm32f4/kostest/defconfig @@ -693,7 +693,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/mikroe-stm32f4/nsh/defconfig b/nuttx/configs/mikroe-stm32f4/nsh/defconfig index bddbda9ae..c82c3ea52 100644 --- a/nuttx/configs/mikroe-stm32f4/nsh/defconfig +++ b/nuttx/configs/mikroe-stm32f4/nsh/defconfig @@ -620,7 +620,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/mikroe-stm32f4/nx/defconfig b/nuttx/configs/mikroe-stm32f4/nx/defconfig index 06bbc63e4..683937ce9 100644 --- a/nuttx/configs/mikroe-stm32f4/nx/defconfig +++ b/nuttx/configs/mikroe-stm32f4/nx/defconfig @@ -618,7 +618,7 @@ CONFIG_EXAMPLES_NX_BPP=16 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/mikroe-stm32f4/nxlines/defconfig b/nuttx/configs/mikroe-stm32f4/nxlines/defconfig index 920ebc058..e556f5c5d 100644 --- a/nuttx/configs/mikroe-stm32f4/nxlines/defconfig +++ b/nuttx/configs/mikroe-stm32f4/nxlines/defconfig @@ -620,7 +620,7 @@ CONFIG_EXAMPLES_NXLINES_BPP=16 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/mikroe-stm32f4/nxtext/defconfig b/nuttx/configs/mikroe-stm32f4/nxtext/defconfig index aa38f79fd..dfef029bb 100644 --- a/nuttx/configs/mikroe-stm32f4/nxtext/defconfig +++ b/nuttx/configs/mikroe-stm32f4/nxtext/defconfig @@ -630,7 +630,7 @@ CONFIG_EXAMPLES_NXTEXT_DEFAULT_FONT=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/mikroe-stm32f4/usbnsh/defconfig b/nuttx/configs/mikroe-stm32f4/usbnsh/defconfig index f12e4acd8..90729405a 100644 --- a/nuttx/configs/mikroe-stm32f4/usbnsh/defconfig +++ b/nuttx/configs/mikroe-stm32f4/usbnsh/defconfig @@ -668,7 +668,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/mirtoo/nsh/defconfig b/nuttx/configs/mirtoo/nsh/defconfig index 7314c0197..831e08540 100644 --- a/nuttx/configs/mirtoo/nsh/defconfig +++ b/nuttx/configs/mirtoo/nsh/defconfig @@ -473,16 +473,16 @@ CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Stack and heap information diff --git a/nuttx/configs/mirtoo/nxffs/defconfig b/nuttx/configs/mirtoo/nxffs/defconfig index acdde8416..1765354fe 100644 --- a/nuttx/configs/mirtoo/nxffs/defconfig +++ b/nuttx/configs/mirtoo/nxffs/defconfig @@ -516,16 +516,16 @@ CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Stack and heap information diff --git a/nuttx/configs/mirtoo/ostest/defconfig b/nuttx/configs/mirtoo/ostest/defconfig index f68a34374..be73f1608 100644 --- a/nuttx/configs/mirtoo/ostest/defconfig +++ b/nuttx/configs/mirtoo/ostest/defconfig @@ -449,16 +449,16 @@ CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Stack and heap information diff --git a/nuttx/configs/nucleus2g/README.txt b/nuttx/configs/nucleus2g/README.txt index 153d7fa4f..f2e9bef51 100644 --- a/nuttx/configs/nucleus2g/README.txt +++ b/nuttx/configs/nucleus2g/README.txt @@ -545,6 +545,6 @@ Where is one of the following: usbmsc: This configuration directory exercises the USB mass storage - class driver at examples/usbmsc. See examples/README.txt for + class driver at system/usbmsc. See examples/README.txt for more information. diff --git a/nuttx/configs/nucleus2g/src/up_usbmsc.c b/nuttx/configs/nucleus2g/src/up_usbmsc.c index 3031106a0..ca8f6f7b7 100644 --- a/nuttx/configs/nucleus2g/src/up_usbmsc.c +++ b/nuttx/configs/nucleus2g/src/up_usbmsc.c @@ -54,8 +54,8 @@ /* Configuration ************************************************************/ -#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 -# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 +#ifndef CONFIG_SYSTEM_USBMSC_DEVMINOR1 +# define CONFIG_SYSTEM_USBMSC_DEVMINOR1 0 #endif /* PORT and SLOT number probably depend on the board configuration */ @@ -129,7 +129,7 @@ int usbmsc_archinitialize(void) message("usbmsc_archinitialize: Binding SPI port %d to MMC/SD slot %d\n", LPC17XX_MMCSDSPIPORTNO, LPC17XX_MMCSDSLOTNO); - ret = mmcsd_spislotinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1, LPC17XX_MMCSDSLOTNO, spi); + ret = mmcsd_spislotinitialize(CONFIG_SYSTEM_USBMSC_DEVMINOR1, LPC17XX_MMCSDSLOTNO, spi); if (ret < 0) { message("usbmsc_archinitialize: Failed to bind SPI port %d to MMC/SD slot %d: %d\n", diff --git a/nuttx/configs/nucleus2g/usbmsc/appconfig b/nuttx/configs/nucleus2g/usbmsc/appconfig index 4999d4933..7ded77858 100644 --- a/nuttx/configs/nucleus2g/usbmsc/appconfig +++ b/nuttx/configs/nucleus2g/usbmsc/appconfig @@ -35,5 +35,5 @@ # Path to example in apps/examples containing the user_start entry point -CONFIGURED_APPS += examples/usbmsc +CONFIGURED_APPS += system/usbmsc diff --git a/nuttx/configs/nucleus2g/usbmsc/defconfig b/nuttx/configs/nucleus2g/usbmsc/defconfig index 81ee5c492..85f2a419b 100755 --- a/nuttx/configs/nucleus2g/usbmsc/defconfig +++ b/nuttx/configs/nucleus2g/usbmsc/defconfig @@ -440,16 +440,16 @@ CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Stack and heap information diff --git a/nuttx/configs/nucleus2g/usbserial/defconfig b/nuttx/configs/nucleus2g/usbserial/defconfig index 6de79a12e..91221ee7e 100644 --- a/nuttx/configs/nucleus2g/usbserial/defconfig +++ b/nuttx/configs/nucleus2g/usbserial/defconfig @@ -527,7 +527,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set CONFIG_EXAMPLES_USBSERIAL=y -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/nutiny-nuc120/nsh/defconfig b/nuttx/configs/nutiny-nuc120/nsh/defconfig index a27e0276c..4191ba212 100644 --- a/nuttx/configs/nutiny-nuc120/nsh/defconfig +++ b/nuttx/configs/nutiny-nuc120/nsh/defconfig @@ -479,7 +479,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/nutiny-nuc120/ostest/defconfig b/nuttx/configs/nutiny-nuc120/ostest/defconfig index 36b2f22bc..b515b9db3 100644 --- a/nuttx/configs/nutiny-nuc120/ostest/defconfig +++ b/nuttx/configs/nutiny-nuc120/ostest/defconfig @@ -489,7 +489,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=1 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/olimex-lpc1766stk/README.txt b/nuttx/configs/olimex-lpc1766stk/README.txt index 9bf1ef52a..5bfd273c1 100644 --- a/nuttx/configs/olimex-lpc1766stk/README.txt +++ b/nuttx/configs/olimex-lpc1766stk/README.txt @@ -1058,7 +1058,7 @@ Where is one of the following: usbmsc: This configuration directory exercises the USB mass storage - class driver at apps/examples/usbmsc. See apps/examples/README.txt + class driver at apps/system/usbmsc. See apps/examples/README.txt for more information. zmodem: diff --git a/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig b/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig index d42e3da48..04093bf35 100755 --- a/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig @@ -569,7 +569,7 @@ CONFIG_EXAMPLES_HIDKBD_ENCODED=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/olimex-lpc1766stk/nettest/defconfig b/nuttx/configs/olimex-lpc1766stk/nettest/defconfig index f0f0a0faf..cbf241f48 100755 --- a/nuttx/configs/olimex-lpc1766stk/nettest/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/nettest/defconfig @@ -547,7 +547,7 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WGET is not set diff --git a/nuttx/configs/olimex-lpc1766stk/nsh/defconfig b/nuttx/configs/olimex-lpc1766stk/nsh/defconfig index ddbab4c39..14df57a0f 100644 --- a/nuttx/configs/olimex-lpc1766stk/nsh/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/nsh/defconfig @@ -585,7 +585,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/olimex-lpc1766stk/nx/defconfig b/nuttx/configs/olimex-lpc1766stk/nx/defconfig index 24f8ffedb..991e365fb 100755 --- a/nuttx/configs/olimex-lpc1766stk/nx/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/nx/defconfig @@ -537,16 +537,16 @@ CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Settings for examples/nx diff --git a/nuttx/configs/olimex-lpc1766stk/ostest/defconfig b/nuttx/configs/olimex-lpc1766stk/ostest/defconfig index 7d1a7af63..8ed63ef78 100755 --- a/nuttx/configs/olimex-lpc1766stk/ostest/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/ostest/defconfig @@ -465,16 +465,16 @@ CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Stack and heap information diff --git a/nuttx/configs/olimex-lpc1766stk/src/up_usbmsc.c b/nuttx/configs/olimex-lpc1766stk/src/up_usbmsc.c index c14420394..78a99a2b1 100644 --- a/nuttx/configs/olimex-lpc1766stk/src/up_usbmsc.c +++ b/nuttx/configs/olimex-lpc1766stk/src/up_usbmsc.c @@ -57,8 +57,8 @@ /* Configuration ************************************************************/ -#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 -# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 +#ifndef CONFIG_SYSTEM_USBMSC_DEVMINOR1 +# define CONFIG_SYSTEM_USBMSC_DEVMINOR1 0 #endif /* PORT and SLOT number probably depend on the board configuration */ @@ -136,7 +136,7 @@ int usbmsc_archinitialize(void) message("usbmsc_archinitialize: Binding SPI port %d to MMC/SD slot %d\n", LPC17XX_MMCSDSPIPORTNO, LPC17XX_MMCSDSLOTNO); - ret = mmcsd_spislotinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1, LPC17XX_MMCSDSLOTNO, spi); + ret = mmcsd_spislotinitialize(CONFIG_SYSTEM_USBMSC_DEVMINOR1, LPC17XX_MMCSDSLOTNO, spi); if (ret < 0) { message("usbmsc_archinitialize: Failed to bind SPI port %d to MMC/SD slot %d: %d\n", diff --git a/nuttx/configs/olimex-lpc1766stk/usbmsc/appconfig b/nuttx/configs/olimex-lpc1766stk/usbmsc/appconfig index da8acd704..5f623be76 100644 --- a/nuttx/configs/olimex-lpc1766stk/usbmsc/appconfig +++ b/nuttx/configs/olimex-lpc1766stk/usbmsc/appconfig @@ -35,5 +35,5 @@ # Path to example in apps/examples containing the user_start entry point -CONFIGURED_APPS += examples/usbmsc +CONFIGURED_APPS += system/usbmsc diff --git a/nuttx/configs/olimex-lpc1766stk/usbmsc/defconfig b/nuttx/configs/olimex-lpc1766stk/usbmsc/defconfig index 99bf4b552..9bdfda630 100755 --- a/nuttx/configs/olimex-lpc1766stk/usbmsc/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/usbmsc/defconfig @@ -467,16 +467,16 @@ CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Stack and heap information diff --git a/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig b/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig index 1119dcdc7..ca09c0c40 100644 --- a/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig @@ -526,7 +526,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set CONFIG_EXAMPLES_USBSERIAL=y -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/olimex-lpc1766stk/zmodem/defconfig b/nuttx/configs/olimex-lpc1766stk/zmodem/defconfig index 12cdcdcef..4fe5abacf 100644 --- a/nuttx/configs/olimex-lpc1766stk/zmodem/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/zmodem/defconfig @@ -600,7 +600,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/olimex-stm32-p107/nsh/defconfig b/nuttx/configs/olimex-stm32-p107/nsh/defconfig index 0935f8fb5..f1a116da6 100644 --- a/nuttx/configs/olimex-stm32-p107/nsh/defconfig +++ b/nuttx/configs/olimex-stm32-p107/nsh/defconfig @@ -695,7 +695,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_XMLRPC is not set diff --git a/nuttx/configs/open1788/knsh/defconfig b/nuttx/configs/open1788/knsh/defconfig index 6aad3faf1..ac7b867f0 100755 --- a/nuttx/configs/open1788/knsh/defconfig +++ b/nuttx/configs/open1788/knsh/defconfig @@ -566,7 +566,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/open1788/nsh/defconfig b/nuttx/configs/open1788/nsh/defconfig index 2dfc279f5..e81b11f45 100644 --- a/nuttx/configs/open1788/nsh/defconfig +++ b/nuttx/configs/open1788/nsh/defconfig @@ -521,7 +521,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/open1788/nxlines/defconfig b/nuttx/configs/open1788/nxlines/defconfig index e4c0ea589..223e3b5a8 100644 --- a/nuttx/configs/open1788/nxlines/defconfig +++ b/nuttx/configs/open1788/nxlines/defconfig @@ -623,7 +623,7 @@ CONFIG_EXAMPLES_NXLINES_BPP=32 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/open1788/ostest/defconfig b/nuttx/configs/open1788/ostest/defconfig index 5546db942..dfeb19274 100644 --- a/nuttx/configs/open1788/ostest/defconfig +++ b/nuttx/configs/open1788/ostest/defconfig @@ -490,7 +490,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/p112/ostest/defconfig b/nuttx/configs/p112/ostest/defconfig index 69430483a..16ab08987 100644 --- a/nuttx/configs/p112/ostest/defconfig +++ b/nuttx/configs/p112/ostest/defconfig @@ -425,7 +425,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WLAN is not set diff --git a/nuttx/configs/pcblogic-pic32mx/nsh/defconfig b/nuttx/configs/pcblogic-pic32mx/nsh/defconfig index 33cc59113..a542ad175 100644 --- a/nuttx/configs/pcblogic-pic32mx/nsh/defconfig +++ b/nuttx/configs/pcblogic-pic32mx/nsh/defconfig @@ -566,7 +566,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/pcblogic-pic32mx/ostest/defconfig b/nuttx/configs/pcblogic-pic32mx/ostest/defconfig index fd8157b69..13927405f 100644 --- a/nuttx/configs/pcblogic-pic32mx/ostest/defconfig +++ b/nuttx/configs/pcblogic-pic32mx/ostest/defconfig @@ -561,7 +561,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/pic32-starterkit/README.txt b/nuttx/configs/pic32-starterkit/README.txt index 0dd49c444..af194171b 100644 --- a/nuttx/configs/pic32-starterkit/README.txt +++ b/nuttx/configs/pic32-starterkit/README.txt @@ -1095,7 +1095,7 @@ Where is one of the following: CONFIG_CDCACM=y : Enable the CDCACM device - examples/usbmsc - There are some hooks in the appconfig file + system/usbmsc - There are some hooks in the appconfig file to enable the USB mass storage device. However, this device cannot work until support for the SD card is also incorporated. @@ -1203,15 +1203,15 @@ Where is one of the following: d) Use a RAM disk (instead of an SD card) as the USB MSC logical unit: - -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" - +CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/ram0" + -CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" + +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/ram0" 2. Changes to apps/.config. - a) Enable building of the examples/usbmsc: + a) Enable building of the system/usbmsc: - -# CONFIGURED_APPS += examples/usbmsc - + CONFIGURED_APPS += examples/usbmsc + -# CONFIGURED_APPS += system/usbmsc + + CONFIGURED_APPS += system/usbmsc 3. When NSH first comes up, you must manually create the RAM disk before exporting it: diff --git a/nuttx/configs/pic32-starterkit/nsh/appconfig b/nuttx/configs/pic32-starterkit/nsh/appconfig index 6f6b4d561..98c52a98e 100644 --- a/nuttx/configs/pic32-starterkit/nsh/appconfig +++ b/nuttx/configs/pic32-starterkit/nsh/appconfig @@ -55,8 +55,8 @@ ifeq ($(CONFIG_PIC32MX_USBDEV),y) # USB Mass Storage Class device configurations ifeq ($(CONFIG_USBMSC),y) -# Uncomment to enable the examples/usbmsc built-in -# CONFIGURED_APPS += examples/usbmsc +# Uncomment to enable the system/usbmsc built-in +# CONFIGURED_APPS += system/usbmsc endif # USB CDC/ACM serial device configurations diff --git a/nuttx/configs/pic32-starterkit/nsh/defconfig b/nuttx/configs/pic32-starterkit/nsh/defconfig index f57c3c787..3388dec0a 100644 --- a/nuttx/configs/pic32-starterkit/nsh/defconfig +++ b/nuttx/configs/pic32-starterkit/nsh/defconfig @@ -626,16 +626,16 @@ CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Settings for examples/usbterm diff --git a/nuttx/configs/pic32-starterkit/nsh2/appconfig b/nuttx/configs/pic32-starterkit/nsh2/appconfig index 95712d484..73cfdb455 100644 --- a/nuttx/configs/pic32-starterkit/nsh2/appconfig +++ b/nuttx/configs/pic32-starterkit/nsh2/appconfig @@ -55,8 +55,8 @@ ifeq ($(CONFIG_PIC32MX_USBDEV),y) # USB Mass Storage Class device configurations ifeq ($(CONFIG_USBMSC),y) -# Uncomment to enable the examples/usbmsc built-in -# CONFIGURED_APPS += examples/usbmsc +# Uncomment to enable the system/usbmsc built-in +# CONFIGURED_APPS += system/usbmsc endif # USB CDC/ACM serial device configurations diff --git a/nuttx/configs/pic32-starterkit/nsh2/defconfig b/nuttx/configs/pic32-starterkit/nsh2/defconfig index 1a791c4f5..0cb70d5ac 100644 --- a/nuttx/configs/pic32-starterkit/nsh2/defconfig +++ b/nuttx/configs/pic32-starterkit/nsh2/defconfig @@ -625,16 +625,16 @@ CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Settings for examples/usbterm diff --git a/nuttx/configs/pic32-starterkit/ostest/defconfig b/nuttx/configs/pic32-starterkit/ostest/defconfig index ce2b3fa23..0e55d4a51 100644 --- a/nuttx/configs/pic32-starterkit/ostest/defconfig +++ b/nuttx/configs/pic32-starterkit/ostest/defconfig @@ -622,16 +622,16 @@ CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Settings for examples/usbterm diff --git a/nuttx/configs/pic32-starterkit/src/up_usbmsc.c b/nuttx/configs/pic32-starterkit/src/up_usbmsc.c index 00b374dfd..535754f15 100644 --- a/nuttx/configs/pic32-starterkit/src/up_usbmsc.c +++ b/nuttx/configs/pic32-starterkit/src/up_usbmsc.c @@ -82,7 +82,7 @@ int usbmsc_archinitialize(void) { - /* If examples/usbmsc is built as an NSH command, then SD slot should + /* If system/usbmsc is built as an NSH command, then SD slot should * already have been initized in nsh_archinitialize() (see up_nsh.c). In * this case, there is nothing further to be done here. */ diff --git a/nuttx/configs/pic32mx7mmb/README.txt b/nuttx/configs/pic32mx7mmb/README.txt index 73b50945b..19ae05bc6 100644 --- a/nuttx/configs/pic32mx7mmb/README.txt +++ b/nuttx/configs/pic32mx7mmb/README.txt @@ -771,15 +771,15 @@ Where is one of the following: d) Use a RAM disk (instead of an SD card) as the USB MSC logical unit: - -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" - +CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/ram0" + -CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" + +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/ram0" 2. Changes to nuttx/.config. - a) Enable building of the examples/usbmsc: + a) Enable building of the system/usbmsc: - -# CONFIGURED_APPS += examples/usbmsc - + CONFIGURED_APPS += examples/usbmsc + -# CONFIGURED_APPS += system/usbmsc + + CONFIGURED_APPS += system/usbmsc 3. When NSH first comes up, you must manually create the RAM disk before exporting it: diff --git a/nuttx/configs/pic32mx7mmb/nsh/appconfig b/nuttx/configs/pic32mx7mmb/nsh/appconfig index 679ab5997..08ee858e9 100644 --- a/nuttx/configs/pic32mx7mmb/nsh/appconfig +++ b/nuttx/configs/pic32mx7mmb/nsh/appconfig @@ -55,7 +55,7 @@ ifeq ($(CONFIG_PIC32MX_USBDEV),y) # USB Mass Storage Class device configurations ifeq ($(CONFIG_USBMSC),y) - CONFIGURED_APPS += examples/usbmsc + CONFIGURED_APPS += system/usbmsc else # USB CDC/ACM serial device configurations diff --git a/nuttx/configs/pic32mx7mmb/nsh/defconfig b/nuttx/configs/pic32mx7mmb/nsh/defconfig index f47363019..839464997 100644 --- a/nuttx/configs/pic32mx7mmb/nsh/defconfig +++ b/nuttx/configs/pic32mx7mmb/nsh/defconfig @@ -738,16 +738,16 @@ CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Settings for examples/usbterm diff --git a/nuttx/configs/pic32mx7mmb/ostest/defconfig b/nuttx/configs/pic32mx7mmb/ostest/defconfig index de06d1674..419f2040f 100644 --- a/nuttx/configs/pic32mx7mmb/ostest/defconfig +++ b/nuttx/configs/pic32mx7mmb/ostest/defconfig @@ -622,16 +622,16 @@ CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Settings for examples/usbterm diff --git a/nuttx/configs/pic32mx7mmb/src/up_usbmsc.c b/nuttx/configs/pic32mx7mmb/src/up_usbmsc.c index 5ec64336c..7038bb635 100644 --- a/nuttx/configs/pic32mx7mmb/src/up_usbmsc.c +++ b/nuttx/configs/pic32mx7mmb/src/up_usbmsc.c @@ -82,7 +82,7 @@ int usbmsc_archinitialize(void) { - /* If examples/usbmsc is built as an NSH command, then SD slot should + /* If system/usbmsc is built as an NSH command, then SD slot should * already have been initized in nsh_archinitialize() (see up_nsh.c). In * this case, there is nothing further to be done here. */ diff --git a/nuttx/configs/pirelli_dpl10/nsh_highram/defconfig b/nuttx/configs/pirelli_dpl10/nsh_highram/defconfig index 41aec2462..8703a9a75 100644 --- a/nuttx/configs/pirelli_dpl10/nsh_highram/defconfig +++ b/nuttx/configs/pirelli_dpl10/nsh_highram/defconfig @@ -435,7 +435,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/sam3u-ek/knsh/defconfig b/nuttx/configs/sam3u-ek/knsh/defconfig index 87aa0b5dc..e9209a8f7 100644 --- a/nuttx/configs/sam3u-ek/knsh/defconfig +++ b/nuttx/configs/sam3u-ek/knsh/defconfig @@ -537,7 +537,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/sam3u-ek/nsh/defconfig b/nuttx/configs/sam3u-ek/nsh/defconfig index 43b8295d9..6e3710e97 100644 --- a/nuttx/configs/sam3u-ek/nsh/defconfig +++ b/nuttx/configs/sam3u-ek/nsh/defconfig @@ -535,7 +535,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/sam3u-ek/nx/defconfig b/nuttx/configs/sam3u-ek/nx/defconfig index 8fbb6ec63..7c2744d7a 100644 --- a/nuttx/configs/sam3u-ek/nx/defconfig +++ b/nuttx/configs/sam3u-ek/nx/defconfig @@ -590,7 +590,7 @@ CONFIG_EXAMPLES_NX_BPP=16 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/sam3u-ek/nxwm/defconfig b/nuttx/configs/sam3u-ek/nxwm/defconfig index 5e81ffe92..9bdd6a36c 100644 --- a/nuttx/configs/sam3u-ek/nxwm/defconfig +++ b/nuttx/configs/sam3u-ek/nxwm/defconfig @@ -656,7 +656,7 @@ CONFIG_CXX_NEWLONG=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/sam3u-ek/ostest/defconfig b/nuttx/configs/sam3u-ek/ostest/defconfig index cb237b44a..83052e68e 100644 --- a/nuttx/configs/sam3u-ek/ostest/defconfig +++ b/nuttx/configs/sam3u-ek/ostest/defconfig @@ -498,7 +498,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/sam3u-ek/src/up_usbmsc.c b/nuttx/configs/sam3u-ek/src/up_usbmsc.c index 0d58e2f45..99a8f365d 100644 --- a/nuttx/configs/sam3u-ek/src/up_usbmsc.c +++ b/nuttx/configs/sam3u-ek/src/up_usbmsc.c @@ -58,8 +58,8 @@ /* Configuration ************************************************************/ -#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 -# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 +#ifndef CONFIG_SYSTEM_USBMSC_DEVMINOR1 +# define CONFIG_SYSTEM_USBMSC_DEVMINOR1 0 #endif /* SLOT number(s) depends on the board configuration */ @@ -122,9 +122,9 @@ int usbmsc_archinitialize(void) message("usbmsc_archinitialize: " "Bind SDIO to the MMC/SD driver, minor=%d\n", - CONFIG_EXAMPLES_USBMSC_DEVMINOR1); + CONFIG_SYSTEM_USBMSC_DEVMINOR1); - ret = mmcsd_slotinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1, sdio); + ret = mmcsd_slotinitialize(CONFIG_SYSTEM_USBMSC_DEVMINOR1, sdio); if (ret != OK) { message("usbmsc_archinitialize: " diff --git a/nuttx/configs/sam4l-xplained/nsh/defconfig b/nuttx/configs/sam4l-xplained/nsh/defconfig index 285073658..62a0ce1d9 100644 --- a/nuttx/configs/sam4l-xplained/nsh/defconfig +++ b/nuttx/configs/sam4l-xplained/nsh/defconfig @@ -551,7 +551,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/sam4l-xplained/ostest/defconfig b/nuttx/configs/sam4l-xplained/ostest/defconfig index c29d602bb..d70605572 100644 --- a/nuttx/configs/sam4l-xplained/ostest/defconfig +++ b/nuttx/configs/sam4l-xplained/ostest/defconfig @@ -516,7 +516,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/sam4s-xplained/nsh/defconfig b/nuttx/configs/sam4s-xplained/nsh/defconfig index 7e1becb81..406d4d3b9 100644 --- a/nuttx/configs/sam4s-xplained/nsh/defconfig +++ b/nuttx/configs/sam4s-xplained/nsh/defconfig @@ -525,7 +525,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/sam4s-xplained/ostest/defconfig b/nuttx/configs/sam4s-xplained/ostest/defconfig index c8c20a4b2..63438de0c 100644 --- a/nuttx/configs/sam4s-xplained/ostest/defconfig +++ b/nuttx/configs/sam4s-xplained/ostest/defconfig @@ -502,7 +502,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/sama5d3x-ek/README.txt b/nuttx/configs/sama5d3x-ek/README.txt index 8c131b150..7e1814584 100644 --- a/nuttx/configs/sama5d3x-ek/README.txt +++ b/nuttx/configs/sama5d3x-ek/README.txt @@ -1141,18 +1141,18 @@ Configurations CONFIG_USBMSC_EPBULKOUT=1 : Use EP1 for the BULK OUT endpoint CONFIG_USBMSC_EPBULKIN=2 : Use EP2 for the BULK IN endpoint - The following setting enables an example that can can be used to + The following setting enables an add-on that can can be used to control the CDC/ACM device. It will add two new NSH commands: a. msconn will connect the USB serial device and export the AT25 to the host, and b. msdis which will disconnect the USB serial device. - Application Configuration -> Examples: - CONFIG_EXAMPLES_USBMSC=y : Enable the USBMSC example - CONFIG_EXAMPLES_USBMSC_NLUNS=1 : One LUN - CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 : Minor device zero - CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mtdblock0" + Application Configuration -> System Add-Ons: + CONFIG_SYSTEM_USBMSC=y : Enable the USBMSC add-on + CONFIG_SYSTEM_USBMSC_NLUNS=1 : One LUN + CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 : Minor device zero + CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mtdblock0" : Use a single, LUN: The AT25 : block driver. @@ -1169,7 +1169,7 @@ Configurations nsh> msdis nsh> mount -t vfat /dev/mtdblock0 /mnt/at25 - b. If you change the value CONFIG_EXAMPLES_USBMSC_DEVPATH1, then you + b. If you change the value CONFIG_SYSTEM_USBMSC_DEVPATH1, then you can export other file systems: "/dev/mmcsd1" will export the HSMCI1 microSD diff --git a/nuttx/configs/sama5d3x-ek/demo/defconfig b/nuttx/configs/sama5d3x-ek/demo/defconfig index 6e0c3299d..a2273e1ec 100644 --- a/nuttx/configs/sama5d3x-ek/demo/defconfig +++ b/nuttx/configs/sama5d3x-ek/demo/defconfig @@ -43,6 +43,7 @@ CONFIG_RAW_BINARY=y # Debug Options # # CONFIG_DEBUG is not set +CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_DEBUG_SYMBOLS is not set # @@ -691,19 +692,6 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -CONFIG_EXAMPLES_USBMSC=y -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mtdblock0" -CONFIG_EXAMPLES_USBMSC_DEVMINOR2=1 -CONFIG_EXAMPLES_USBMSC_DEVPATH2="/dev/mmcsd1" -CONFIG_EXAMPLES_USBMSC_DEVMINOR3=2 -CONFIG_EXAMPLES_USBMSC_DEVPATH3="/dev/mmcsd2" -# CONFIG_EXAMPLES_USBMSC_DEBUGMM is not set -CONFIG_EXAMPLES_USBMSC_CMD_STACKSIZE=768 -CONFIG_EXAMPLES_USBMSC_CMD_PRIORITY=100 -CONFIG_EXAMPLES_USBMSC_DAEMON_STACKSIZE=2048 -CONFIG_EXAMPLES_USBMSC_DAEMON_PRIORITY=100 # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set @@ -876,6 +864,27 @@ CONFIG_READLINE_ECHO=y # USB Monitor # +# +# Stack Monitor +# + +# +# USB Mass Storage Class +# +CONFIG_SYSTEM_USBMSC=y +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mtdblock0" +CONFIG_SYSTEM_USBMSC_DEVMINOR2=1 +CONFIG_SYSTEM_USBMSC_DEVPATH2="/dev/mmcsd1" +CONFIG_SYSTEM_USBMSC_DEVMINOR3=2 +CONFIG_SYSTEM_USBMSC_DEVPATH3="/dev/mmcsd2" +# CONFIG_SYSTEM_USBMSC_DEBUGMM is not set +CONFIG_SYSTEM_USBMSC_CMD_STACKSIZE=768 +CONFIG_SYSTEM_USBMSC_CMD_PRIORITY=100 +CONFIG_SYSTEM_USBMSC_DAEMON_STACKSIZE=2048 +CONFIG_SYSTEM_USBMSC_DAEMON_PRIORITY=100 + # # Zmodem Commands # diff --git a/nuttx/configs/sama5d3x-ek/hello/defconfig b/nuttx/configs/sama5d3x-ek/hello/defconfig index a89e0e977..416f6475b 100644 --- a/nuttx/configs/sama5d3x-ek/hello/defconfig +++ b/nuttx/configs/sama5d3x-ek/hello/defconfig @@ -510,7 +510,7 @@ CONFIG_EXAMPLES_HELLO=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/sama5d3x-ek/norboot/defconfig b/nuttx/configs/sama5d3x-ek/norboot/defconfig index 8af56b68b..5aea4c9f3 100644 --- a/nuttx/configs/sama5d3x-ek/norboot/defconfig +++ b/nuttx/configs/sama5d3x-ek/norboot/defconfig @@ -525,7 +525,7 @@ CONFIG_EXAMPLES_HELLO=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/sama5d3x-ek/nsh/defconfig b/nuttx/configs/sama5d3x-ek/nsh/defconfig index 605ee9cbd..b9f4ec9aa 100644 --- a/nuttx/configs/sama5d3x-ek/nsh/defconfig +++ b/nuttx/configs/sama5d3x-ek/nsh/defconfig @@ -551,7 +551,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/sama5d3x-ek/ostest/defconfig b/nuttx/configs/sama5d3x-ek/ostest/defconfig index d4bb4c412..b69ecf836 100644 --- a/nuttx/configs/sama5d3x-ek/ostest/defconfig +++ b/nuttx/configs/sama5d3x-ek/ostest/defconfig @@ -534,7 +534,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/sama5d3x-ek/src/sam_usbmsc.c b/nuttx/configs/sama5d3x-ek/src/sam_usbmsc.c index 844a1602c..b303e6d87 100644 --- a/nuttx/configs/sama5d3x-ek/src/sam_usbmsc.c +++ b/nuttx/configs/sama5d3x-ek/src/sam_usbmsc.c @@ -64,11 +64,11 @@ # undef HAVE_AT25 #endif -#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 -# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 +#ifndef CONFIG_SYSTEM_USBMSC_DEVMINOR1 +# define CONFIG_SYSTEM_USBMSC_DEVMINOR1 0 #endif -#if CONFIG_EXAMPLES_USBMSC_DEVMINOR1 != AT25_MINOR +#if CONFIG_SYSTEM_USBMSC_DEVMINOR1 != AT25_MINOR # error Confusion in the assignment of minor device numbers # undef HAVE_AT25 #endif diff --git a/nuttx/configs/shenzhou/nsh/defconfig b/nuttx/configs/shenzhou/nsh/defconfig index 87809896a..fe861b7dc 100644 --- a/nuttx/configs/shenzhou/nsh/defconfig +++ b/nuttx/configs/shenzhou/nsh/defconfig @@ -556,7 +556,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WLAN is not set diff --git a/nuttx/configs/shenzhou/nxwm/defconfig b/nuttx/configs/shenzhou/nxwm/defconfig index ebd61b836..a55013458 100644 --- a/nuttx/configs/shenzhou/nxwm/defconfig +++ b/nuttx/configs/shenzhou/nxwm/defconfig @@ -682,7 +682,7 @@ CONFIG_HAVE_CXXINITIALIZE=y # CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WGET is not set diff --git a/nuttx/configs/shenzhou/src/up_usbmsc.c b/nuttx/configs/shenzhou/src/up_usbmsc.c index e2ca462d1..848b44bcb 100644 --- a/nuttx/configs/shenzhou/src/up_usbmsc.c +++ b/nuttx/configs/shenzhou/src/up_usbmsc.c @@ -52,8 +52,8 @@ ****************************************************************************/ /* Configuration ************************************************************/ -#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 -# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 +#ifndef CONFIG_SYSTEM_USBMSC_DEVMINOR1 +# define CONFIG_SYSTEM_USBMSC_DEVMINOR1 0 #endif /* Debug ********************************************************************/ @@ -90,13 +90,13 @@ int usbmsc_archinitialize(void) { - /* If examples/usbmsc is built as an NSH command, then SD slot should + /* If system/usbmsc is built as an NSH command, then SD slot should * already have been initized in nsh_archinitialize() (see up_nsh.c). In * this case, there is nothing further to be done here. */ #ifndef CONFIG_NSH_BUILTIN_APPS - return stm32_sdinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1); + return stm32_sdinitialize(CONFIG_SYSTEM_USBMSC_DEVMINOR1); #else return OK; #endif diff --git a/nuttx/configs/shenzhou/thttpd/defconfig b/nuttx/configs/shenzhou/thttpd/defconfig index 1f31ced60..41801d8df 100644 --- a/nuttx/configs/shenzhou/thttpd/defconfig +++ b/nuttx/configs/shenzhou/thttpd/defconfig @@ -706,7 +706,7 @@ CONFIG_EXAMPLES_NSH=y # # USB Mass Storage Class Example # -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # # USB Serial Terminal Example diff --git a/nuttx/configs/sim/cxxtest/defconfig b/nuttx/configs/sim/cxxtest/defconfig index 9c7caa54f..7df4ed57d 100644 --- a/nuttx/configs/sim/cxxtest/defconfig +++ b/nuttx/configs/sim/cxxtest/defconfig @@ -348,7 +348,7 @@ CONFIG_EXAMPLES_CXXTEST=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WLAN is not set diff --git a/nuttx/configs/sim/mtdpart/defconfig b/nuttx/configs/sim/mtdpart/defconfig index a76563498..16e1e007f 100644 --- a/nuttx/configs/sim/mtdpart/defconfig +++ b/nuttx/configs/sim/mtdpart/defconfig @@ -392,7 +392,7 @@ CONFIG_EXAMPLES_MTDPART_NPARTITIONS=3 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/sim/nsh/defconfig b/nuttx/configs/sim/nsh/defconfig index aafb95492..37089218b 100644 --- a/nuttx/configs/sim/nsh/defconfig +++ b/nuttx/configs/sim/nsh/defconfig @@ -370,7 +370,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/sim/nxffs/defconfig b/nuttx/configs/sim/nxffs/defconfig index 7c557cb6e..3ac2ba5a5 100644 --- a/nuttx/configs/sim/nxffs/defconfig +++ b/nuttx/configs/sim/nxffs/defconfig @@ -403,7 +403,7 @@ CONFIG_EXAMPLES_NXFFS_NLOOPS=100 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/sim/nxlines/defconfig b/nuttx/configs/sim/nxlines/defconfig index c2a7cfc3f..db0fc3153 100644 --- a/nuttx/configs/sim/nxlines/defconfig +++ b/nuttx/configs/sim/nxlines/defconfig @@ -430,7 +430,7 @@ CONFIG_EXAMPLES_NXLINES_BPP=32 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WLAN is not set diff --git a/nuttx/configs/sim/nxwm/defconfig b/nuttx/configs/sim/nxwm/defconfig index 3c3916520..0de438320 100644 --- a/nuttx/configs/sim/nxwm/defconfig +++ b/nuttx/configs/sim/nxwm/defconfig @@ -427,7 +427,7 @@ CONFIG_HAVE_CXX=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WLAN is not set diff --git a/nuttx/configs/sim/ostest/defconfig b/nuttx/configs/sim/ostest/defconfig index 0a47891a7..99612c8e4 100644 --- a/nuttx/configs/sim/ostest/defconfig +++ b/nuttx/configs/sim/ostest/defconfig @@ -385,7 +385,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/stm3210e-eval/README.txt b/nuttx/configs/stm3210e-eval/README.txt index 25f305d2f..ef04e337a 100644 --- a/nuttx/configs/stm3210e-eval/README.txt +++ b/nuttx/configs/stm3210e-eval/README.txt @@ -736,7 +736,7 @@ Where is one of the following: ----------- ----------------------- -------------------------------- Built-in None apps/examples/nx Apps apps/examples/nxhello - apps/examples/usbmsc (5) + apps/system/usbmsc (5) apps/system/i2c =========== ======================= ================================ @@ -961,7 +961,7 @@ Where is one of the following: usbmsc: ------- This configuration directory exercises the USB mass storage - class driver at examples/usbmsc. See examples/README.txt for + class driver at system/usbmsc. See examples/README.txt for more information. CONFIG_STM32_BUILDROOT=y : NuttX buildroot under Linux or Cygwin diff --git a/nuttx/configs/stm3210e-eval/RIDE/bigfatstub.c b/nuttx/configs/stm3210e-eval/RIDE/bigfatstub.c index 69d679fd8..8473ec19b 100644 --- a/nuttx/configs/stm3210e-eval/RIDE/bigfatstub.c +++ b/nuttx/configs/stm3210e-eval/RIDE/bigfatstub.c @@ -1,31 +1,31 @@ -#include -#include -#include "up_internal.h" - -void os_start(void) -{ - up_lowputc('X'); - up_lowputc('\n'); - for (;;); -} - -void up_assert(const uint8_t *filename, int lineno) -{ - up_lowputc('?'); - up_lowputc('\n'); - for (;;); -} - -int irq_attach(int irq, xcpt_t isr) -{ - up_lowputc('A'); - up_lowputc('\n'); - for (;;); -} - -uint32_t *up_doirq(int irq, uint32_t *regs) -{ - up_lowputc('I'); - up_lowputc('\n'); - for (;;); +#include +#include +#include "up_internal.h" + +void os_start(void) +{ + up_lowputc('X'); + up_lowputc('\n'); + for (;;); +} + +void up_assert(const uint8_t *filename, int lineno) +{ + up_lowputc('?'); + up_lowputc('\n'); + for (;;); +} + +int irq_attach(int irq, xcpt_t isr) +{ + up_lowputc('A'); + up_lowputc('\n'); + for (;;); +} + +uint32_t *up_doirq(int irq, uint32_t *regs) +{ + up_lowputc('I'); + up_lowputc('\n'); + for (;;); } \ No newline at end of file diff --git a/nuttx/configs/stm3210e-eval/composite/defconfig b/nuttx/configs/stm3210e-eval/composite/defconfig index c11a11080..87d3108fc 100755 --- a/nuttx/configs/stm3210e-eval/composite/defconfig +++ b/nuttx/configs/stm3210e-eval/composite/defconfig @@ -520,17 +520,17 @@ CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_DEBUGMM=n -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_DEBUGMM=n +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Settings for examples/composite diff --git a/nuttx/configs/stm3210e-eval/nsh2/appconfig b/nuttx/configs/stm3210e-eval/nsh2/appconfig index 6a9ea36ba..6bce66fd8 100644 --- a/nuttx/configs/stm3210e-eval/nsh2/appconfig +++ b/nuttx/configs/stm3210e-eval/nsh2/appconfig @@ -50,7 +50,7 @@ CONFIGURED_APPS += examples/nx CONFIGURED_APPS += examples/nxhello #CONFIGURED_APPS += examples/nxlines #CONFIGURED_APPS += examples/nxtext -CONFIGURED_APPS += examples/usbmsc +CONFIGURED_APPS += system/usbmsc ifeq ($(CONFIG_I2C),y) CONFIGURED_APPS += system/i2c diff --git a/nuttx/configs/stm3210e-eval/nsh2/defconfig b/nuttx/configs/stm3210e-eval/nsh2/defconfig index 27fc06616..c2e6ce603 100644 --- a/nuttx/configs/stm3210e-eval/nsh2/defconfig +++ b/nuttx/configs/stm3210e-eval/nsh2/defconfig @@ -693,17 +693,17 @@ CONFIG_EXAMPLES_NXLINES_BPP=16 CONFIG_EXAMPLES_NXLINES_EXTERNINIT=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_DEBUGMM=n -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_DEBUGMM=n +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Settings for examples/watchdog diff --git a/nuttx/configs/stm3210e-eval/nxconsole/appconfig b/nuttx/configs/stm3210e-eval/nxconsole/appconfig index b7d22bf0b..1c6ecfa86 100644 --- a/nuttx/configs/stm3210e-eval/nxconsole/appconfig +++ b/nuttx/configs/stm3210e-eval/nxconsole/appconfig @@ -43,7 +43,7 @@ CONFIGURED_APPS += nshlib # Optional built-in applications ifeq ($(CONFIG_USBDEV),y) -CONFIGURED_APPS += examples/usbmsc +CONFIGURED_APPS += system/usbmsc endif ifeq ($(CONFIG_I2C),y) diff --git a/nuttx/configs/stm3210e-eval/pm/appconfig b/nuttx/configs/stm3210e-eval/pm/appconfig index 07fb41bba..6fae050a7 100644 --- a/nuttx/configs/stm3210e-eval/pm/appconfig +++ b/nuttx/configs/stm3210e-eval/pm/appconfig @@ -50,7 +50,7 @@ CONFIGURED_APPS += examples/nx CONFIGURED_APPS += examples/nxhello #CONFIGURED_APPS += examples/nxlines #CONFIGURED_APPS += examples/nxtext -CONFIGURED_APPS += examples/usbmsc +CONFIGURED_APPS += system/usbmsc ifeq ($(CONFIG_I2C),y) CONFIGURED_APPS += system/i2c diff --git a/nuttx/configs/stm3210e-eval/pm/defconfig b/nuttx/configs/stm3210e-eval/pm/defconfig index 8dc0665bf..9377a0b3c 100644 --- a/nuttx/configs/stm3210e-eval/pm/defconfig +++ b/nuttx/configs/stm3210e-eval/pm/defconfig @@ -738,17 +738,17 @@ CONFIG_EXAMPLES_NXLINES_BPP=16 CONFIG_EXAMPLES_NXLINES_EXTERNINIT=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_DEBUGMM=n -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_DEBUGMM=n +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Settings for examples/watchdog diff --git a/nuttx/configs/stm3210e-eval/src/up_usbmsc.c b/nuttx/configs/stm3210e-eval/src/up_usbmsc.c index 5bca7bf1b..fe3cbb3ef 100644 --- a/nuttx/configs/stm3210e-eval/src/up_usbmsc.c +++ b/nuttx/configs/stm3210e-eval/src/up_usbmsc.c @@ -60,8 +60,8 @@ /* Configuration ************************************************************/ -#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 -# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 +#ifndef CONFIG_SYSTEM_USBMSC_DEVMINOR1 +# define CONFIG_SYSTEM_USBMSC_DEVMINOR1 0 #endif /* SLOT number(s) could depend on the board configuration */ @@ -109,7 +109,7 @@ int usbmsc_archinitialize(void) { - /* If examples/usbmsc is built as an NSH command, then SD slot should + /* If system/usbmsc is built as an NSH command, then SD slot should * already have been initized in nsh_archinitialize() (see up_nsh.c). In * this case, there is nothing further to be done here. */ @@ -136,9 +136,9 @@ int usbmsc_archinitialize(void) message("usbmsc_archinitialize: " "Bind SDIO to the MMC/SD driver, minor=%d\n", - CONFIG_EXAMPLES_USBMSC_DEVMINOR1); + CONFIG_SYSTEM_USBMSC_DEVMINOR1); - ret = mmcsd_slotinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1, sdio); + ret = mmcsd_slotinitialize(CONFIG_SYSTEM_USBMSC_DEVMINOR1, sdio); if (ret != OK) { message("usbmsc_archinitialize: " diff --git a/nuttx/configs/stm3210e-eval/usbmsc/appconfig b/nuttx/configs/stm3210e-eval/usbmsc/appconfig index 5b86cb0ec..911d31169 100644 --- a/nuttx/configs/stm3210e-eval/usbmsc/appconfig +++ b/nuttx/configs/stm3210e-eval/usbmsc/appconfig @@ -35,5 +35,5 @@ # Path to example in apps/examples containing the user_start entry point -CONFIGURED_APPS += examples/usbmsc +CONFIGURED_APPS += system/usbmsc diff --git a/nuttx/configs/stm3210e-eval/usbmsc/defconfig b/nuttx/configs/stm3210e-eval/usbmsc/defconfig index f9460bf3d..faef419fc 100755 --- a/nuttx/configs/stm3210e-eval/usbmsc/defconfig +++ b/nuttx/configs/stm3210e-eval/usbmsc/defconfig @@ -477,17 +477,17 @@ CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_DEBUGMM=n -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_DEBUGMM=n +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Settings for examples/watchdog diff --git a/nuttx/configs/stm3210e-eval/usbserial/defconfig b/nuttx/configs/stm3210e-eval/usbserial/defconfig index 53c16cae4..d3fe17c8d 100644 --- a/nuttx/configs/stm3210e-eval/usbserial/defconfig +++ b/nuttx/configs/stm3210e-eval/usbserial/defconfig @@ -578,7 +578,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set CONFIG_EXAMPLES_USBSERIAL=y -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/stm3220g-eval/nsh/defconfig b/nuttx/configs/stm3220g-eval/nsh/defconfig index e090427f7..601cd45b2 100644 --- a/nuttx/configs/stm3220g-eval/nsh/defconfig +++ b/nuttx/configs/stm3220g-eval/nsh/defconfig @@ -809,17 +809,17 @@ CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0" CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES=25 # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_DEBUGMM=n -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_DEBUGMM=n +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Settings for examples/watchdog diff --git a/nuttx/configs/stm3220g-eval/nsh2/defconfig b/nuttx/configs/stm3220g-eval/nsh2/defconfig index d0028b2a7..7b1573463 100644 --- a/nuttx/configs/stm3220g-eval/nsh2/defconfig +++ b/nuttx/configs/stm3220g-eval/nsh2/defconfig @@ -796,17 +796,17 @@ CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0" CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES=25 # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_DEBUGMM=n -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_DEBUGMM=n +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Settings for examples/watchdog diff --git a/nuttx/configs/stm3220g-eval/nxwm/defconfig b/nuttx/configs/stm3220g-eval/nxwm/defconfig index 59e93375b..b4297d940 100644 --- a/nuttx/configs/stm3220g-eval/nxwm/defconfig +++ b/nuttx/configs/stm3220g-eval/nxwm/defconfig @@ -711,7 +711,7 @@ CONFIG_HAVE_CXXINITIALIZE=y # CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WGET is not set diff --git a/nuttx/configs/stm3220g-eval/ostest/defconfig b/nuttx/configs/stm3220g-eval/ostest/defconfig index d26b7ccd6..155396b1e 100644 --- a/nuttx/configs/stm3220g-eval/ostest/defconfig +++ b/nuttx/configs/stm3220g-eval/ostest/defconfig @@ -697,17 +697,17 @@ CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_DEBUGMM=n -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_DEBUGMM=n +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Settings for examples/watchdog diff --git a/nuttx/configs/stm3240g-eval/discover/defconfig b/nuttx/configs/stm3240g-eval/discover/defconfig index 0b6b6d77a..884c95267 100644 --- a/nuttx/configs/stm3240g-eval/discover/defconfig +++ b/nuttx/configs/stm3240g-eval/discover/defconfig @@ -731,7 +731,7 @@ CONFIG_EXAMPLES_DISCOVER_NETMASK=0xffffff00 # # USB Mass Storage Class Example # -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # # USB Serial Terminal Example diff --git a/nuttx/configs/stm3240g-eval/nsh/defconfig b/nuttx/configs/stm3240g-eval/nsh/defconfig index 1b69df006..297ef6e01 100644 --- a/nuttx/configs/stm3240g-eval/nsh/defconfig +++ b/nuttx/configs/stm3240g-eval/nsh/defconfig @@ -809,17 +809,17 @@ CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0" CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES=25 # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_DEBUGMM=n -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_DEBUGMM=n +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Settings for examples/watchdog diff --git a/nuttx/configs/stm3240g-eval/nxconsole/defconfig b/nuttx/configs/stm3240g-eval/nxconsole/defconfig index 19d738085..2522d5e4a 100644 --- a/nuttx/configs/stm3240g-eval/nxconsole/defconfig +++ b/nuttx/configs/stm3240g-eval/nxconsole/defconfig @@ -768,17 +768,17 @@ CONFIG_EXAMPLES_NXLINES_BPP=16 CONFIG_EXAMPLES_NXLINES_EXTERNINIT=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_DEBUGMM=n -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_DEBUGMM=n +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Settings for examples/watchdog diff --git a/nuttx/configs/stm3240g-eval/nxwm/defconfig b/nuttx/configs/stm3240g-eval/nxwm/defconfig index 03534de40..18135b31b 100644 --- a/nuttx/configs/stm3240g-eval/nxwm/defconfig +++ b/nuttx/configs/stm3240g-eval/nxwm/defconfig @@ -836,17 +836,17 @@ CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0" CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES=25 # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_DEBUGMM=n -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_DEBUGMM=n +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Settings for examples/watchdog diff --git a/nuttx/configs/stm3240g-eval/ostest/defconfig b/nuttx/configs/stm3240g-eval/ostest/defconfig index 31fe51943..ce532e000 100644 --- a/nuttx/configs/stm3240g-eval/ostest/defconfig +++ b/nuttx/configs/stm3240g-eval/ostest/defconfig @@ -554,7 +554,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/stm3240g-eval/webserver/defconfig b/nuttx/configs/stm3240g-eval/webserver/defconfig index 8b7ba750b..56dedcb1d 100644 --- a/nuttx/configs/stm3240g-eval/webserver/defconfig +++ b/nuttx/configs/stm3240g-eval/webserver/defconfig @@ -804,17 +804,17 @@ CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0" CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES=25 # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_DEBUGMM=n -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_DEBUGMM=n +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Settings for examples/watchdog diff --git a/nuttx/configs/stm3240g-eval/xmlrpc/defconfig b/nuttx/configs/stm3240g-eval/xmlrpc/defconfig index e83f2e334..9d3c0a628 100644 --- a/nuttx/configs/stm3240g-eval/xmlrpc/defconfig +++ b/nuttx/configs/stm3240g-eval/xmlrpc/defconfig @@ -720,7 +720,7 @@ CONFIG_HAVE_CXXINITIALIZE=y # # USB Mass Storage Class Example # -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # # USB Serial Terminal Example diff --git a/nuttx/configs/stm32_tiny/nsh/defconfig b/nuttx/configs/stm32_tiny/nsh/defconfig index df9eb9e12..a748954f9 100644 --- a/nuttx/configs/stm32_tiny/nsh/defconfig +++ b/nuttx/configs/stm32_tiny/nsh/defconfig @@ -589,7 +589,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/stm32_tiny/usbnsh/defconfig b/nuttx/configs/stm32_tiny/usbnsh/defconfig index fd70c066b..f4a35dfe4 100644 --- a/nuttx/configs/stm32_tiny/usbnsh/defconfig +++ b/nuttx/configs/stm32_tiny/usbnsh/defconfig @@ -566,7 +566,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/stm32f100rc_generic/nsh/defconfig b/nuttx/configs/stm32f100rc_generic/nsh/defconfig index 162299056..099e72ca0 100644 --- a/nuttx/configs/stm32f100rc_generic/nsh/defconfig +++ b/nuttx/configs/stm32f100rc_generic/nsh/defconfig @@ -477,7 +477,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WLAN is not set diff --git a/nuttx/configs/stm32f100rc_generic/ostest/defconfig b/nuttx/configs/stm32f100rc_generic/ostest/defconfig index ada748730..db7f4f915 100644 --- a/nuttx/configs/stm32f100rc_generic/ostest/defconfig +++ b/nuttx/configs/stm32f100rc_generic/ostest/defconfig @@ -464,7 +464,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WLAN is not set diff --git a/nuttx/configs/stm32f3discovery/nsh/defconfig b/nuttx/configs/stm32f3discovery/nsh/defconfig index bcb94dbbb..933c82288 100644 --- a/nuttx/configs/stm32f3discovery/nsh/defconfig +++ b/nuttx/configs/stm32f3discovery/nsh/defconfig @@ -574,7 +574,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/stm32f3discovery/ostest/defconfig b/nuttx/configs/stm32f3discovery/ostest/defconfig index e48ec05c3..74d5724ae 100644 --- a/nuttx/configs/stm32f3discovery/ostest/defconfig +++ b/nuttx/configs/stm32f3discovery/ostest/defconfig @@ -525,7 +525,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/stm32f3discovery/usbnsh/defconfig b/nuttx/configs/stm32f3discovery/usbnsh/defconfig index c0a872bfc..5484db476 100644 --- a/nuttx/configs/stm32f3discovery/usbnsh/defconfig +++ b/nuttx/configs/stm32f3discovery/usbnsh/defconfig @@ -643,7 +643,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/stm32f4discovery/cxxtest/defconfig b/nuttx/configs/stm32f4discovery/cxxtest/defconfig index 289c19920..e7b0b55b7 100644 --- a/nuttx/configs/stm32f4discovery/cxxtest/defconfig +++ b/nuttx/configs/stm32f4discovery/cxxtest/defconfig @@ -477,7 +477,7 @@ CONFIG_EXAMPLES_CXXTEST_CXXINITIALIZE=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WLAN is not set diff --git a/nuttx/configs/stm32f4discovery/elf/defconfig b/nuttx/configs/stm32f4discovery/elf/defconfig index fa0d41490..5c6cd2475 100644 --- a/nuttx/configs/stm32f4discovery/elf/defconfig +++ b/nuttx/configs/stm32f4discovery/elf/defconfig @@ -543,7 +543,7 @@ CONFIG_EXAMPLES_ELF_DEVPATH="/dev/ram0" # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/stm32f4discovery/kostest/defconfig b/nuttx/configs/stm32f4discovery/kostest/defconfig index b9174a862..f79a54a27 100644 --- a/nuttx/configs/stm32f4discovery/kostest/defconfig +++ b/nuttx/configs/stm32f4discovery/kostest/defconfig @@ -564,7 +564,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/stm32f4discovery/nsh/defconfig b/nuttx/configs/stm32f4discovery/nsh/defconfig index c95b5cda0..37f5936f1 100644 --- a/nuttx/configs/stm32f4discovery/nsh/defconfig +++ b/nuttx/configs/stm32f4discovery/nsh/defconfig @@ -643,7 +643,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/stm32f4discovery/nxlines/defconfig b/nuttx/configs/stm32f4discovery/nxlines/defconfig index 7dfdae8af..aa1a595f7 100644 --- a/nuttx/configs/stm32f4discovery/nxlines/defconfig +++ b/nuttx/configs/stm32f4discovery/nxlines/defconfig @@ -659,7 +659,7 @@ CONFIG_EXAMPLES_NXLINES_BPP=16 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/stm32f4discovery/ostest/defconfig b/nuttx/configs/stm32f4discovery/ostest/defconfig index ce5adf9a8..10264c821 100644 --- a/nuttx/configs/stm32f4discovery/ostest/defconfig +++ b/nuttx/configs/stm32f4discovery/ostest/defconfig @@ -554,7 +554,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/stm32f4discovery/posix_spawn/defconfig b/nuttx/configs/stm32f4discovery/posix_spawn/defconfig index dd6b7b958..3261e4438 100644 --- a/nuttx/configs/stm32f4discovery/posix_spawn/defconfig +++ b/nuttx/configs/stm32f4discovery/posix_spawn/defconfig @@ -529,7 +529,7 @@ CONFIG_EXAMPLES_POSIXSPAWN_DEVPATH="/dev/ram0" # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/stm32f4discovery/usbnsh/defconfig b/nuttx/configs/stm32f4discovery/usbnsh/defconfig index 3c6dfaaea..23e60d470 100644 --- a/nuttx/configs/stm32f4discovery/usbnsh/defconfig +++ b/nuttx/configs/stm32f4discovery/usbnsh/defconfig @@ -587,7 +587,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/stm32f4discovery/winbuild/defconfig b/nuttx/configs/stm32f4discovery/winbuild/defconfig index 2544dda6e..6d552aab6 100644 --- a/nuttx/configs/stm32f4discovery/winbuild/defconfig +++ b/nuttx/configs/stm32f4discovery/winbuild/defconfig @@ -484,7 +484,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WLAN is not set diff --git a/nuttx/configs/stm32ldiscovery/nsh/defconfig b/nuttx/configs/stm32ldiscovery/nsh/defconfig index 57ff9a13b..d2b3bbc5b 100644 --- a/nuttx/configs/stm32ldiscovery/nsh/defconfig +++ b/nuttx/configs/stm32ldiscovery/nsh/defconfig @@ -559,7 +559,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/sure-pic32mx/README.txt b/nuttx/configs/sure-pic32mx/README.txt index 000f13c13..7e482158e 100644 --- a/nuttx/configs/sure-pic32mx/README.txt +++ b/nuttx/configs/sure-pic32mx/README.txt @@ -735,7 +735,7 @@ Where is one of the following: Drivers->USB Device Driver Support CONFIG_CDCACM=y : Enable the CDCACM device - examples/usbmsc - There are some hooks in the appconfig file + system/usbmsc - There are some hooks in the appconfig file to enable the USB mass storage class (MSC)device. However, this device cannot work until support for the SD card is also incorporated. @@ -743,7 +743,7 @@ Where is one of the following: CONFIG_USBMSC=y : Enables the USB MSC class Application Configuration->Examples: - CONFIG_EXAMPLES_USBMSC=y : Enhables apps/examples/usbmsc + CONFIG_SYSTEM_USBMSC=y : Enhables apps/system/usbmsc 3. SD Card Support. diff --git a/nuttx/configs/sure-pic32mx/nsh/defconfig b/nuttx/configs/sure-pic32mx/nsh/defconfig index 85f27ed6b..a30837662 100644 --- a/nuttx/configs/sure-pic32mx/nsh/defconfig +++ b/nuttx/configs/sure-pic32mx/nsh/defconfig @@ -568,7 +568,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/sure-pic32mx/ostest/defconfig b/nuttx/configs/sure-pic32mx/ostest/defconfig index 11ed18e38..4296da096 100644 --- a/nuttx/configs/sure-pic32mx/ostest/defconfig +++ b/nuttx/configs/sure-pic32mx/ostest/defconfig @@ -563,7 +563,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/sure-pic32mx/usbnsh/defconfig b/nuttx/configs/sure-pic32mx/usbnsh/defconfig index 488345ec3..31843a6cb 100644 --- a/nuttx/configs/sure-pic32mx/usbnsh/defconfig +++ b/nuttx/configs/sure-pic32mx/usbnsh/defconfig @@ -617,7 +617,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/teensy/README.txt b/nuttx/configs/teensy/README.txt index 897d3b234..b76d6b3b3 100644 --- a/nuttx/configs/teensy/README.txt +++ b/nuttx/configs/teensy/README.txt @@ -538,7 +538,7 @@ Where is one of the following: usbmsc: This configuration directory exercises the USB mass storage - class driver at apps/examples/usbmsc. See apps/examples/README.txt + class driver at apps/system/usbmsc. See apps/examples/README.txt for more information. NOTE: THIS CONFIGURATION HAS NOT YET BEEN DEBUGGED AND DOES NOT WORK!!! ISSUES: (1) THE SPI DRIVER IS UNTESTED, (2) THE USB DRIVER IS UNTESTED, AND (3) THE RAM USAGE MIGHT BE EXCESSIVE. diff --git a/nuttx/configs/teensy/hello/defconfig b/nuttx/configs/teensy/hello/defconfig index 1cb97f3cd..a6eba19c9 100644 --- a/nuttx/configs/teensy/hello/defconfig +++ b/nuttx/configs/teensy/hello/defconfig @@ -393,16 +393,16 @@ CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Stack and heap information diff --git a/nuttx/configs/teensy/src/up_usbmsc.c b/nuttx/configs/teensy/src/up_usbmsc.c index 2743dfbfb..daed5d13d 100644 --- a/nuttx/configs/teensy/src/up_usbmsc.c +++ b/nuttx/configs/teensy/src/up_usbmsc.c @@ -58,8 +58,8 @@ /* Configuration ************************************************************/ -#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 -# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 +#ifndef CONFIG_SYSTEM_USBMSC_DEVMINOR1 +# define CONFIG_SYSTEM_USBMSC_DEVMINOR1 0 #endif /* PORT and SLOT number probably depend on the board configuration */ @@ -126,7 +126,7 @@ int usbmsc_archinitialize(void) message("Binding SPI port to MMC/SD slot\n"); - ret = mmcsd_spislotinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1, AVR_MMCSDSLOTNO, spi); + ret = mmcsd_spislotinitialize(CONFIG_SYSTEM_USBMSC_DEVMINOR1, AVR_MMCSDSLOTNO, spi); if (ret < 0) { message("mmcsd_spislotinitialize failed: %d\n", ret); diff --git a/nuttx/configs/teensy/usbmsc/appconfig b/nuttx/configs/teensy/usbmsc/appconfig index 0e5057ce4..15316f014 100644 --- a/nuttx/configs/teensy/usbmsc/appconfig +++ b/nuttx/configs/teensy/usbmsc/appconfig @@ -35,5 +35,5 @@ # Path to example in apps/examples containing the user_start entry point -CONFIGURED_APPS += examples/usbmsc +CONFIGURED_APPS += system/usbmsc diff --git a/nuttx/configs/teensy/usbmsc/defconfig b/nuttx/configs/teensy/usbmsc/defconfig index adc626bc4..b00d7448e 100755 --- a/nuttx/configs/teensy/usbmsc/defconfig +++ b/nuttx/configs/teensy/usbmsc/defconfig @@ -412,16 +412,16 @@ CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Stack and heap information diff --git a/nuttx/configs/twr-k60n512/nsh/defconfig b/nuttx/configs/twr-k60n512/nsh/defconfig index 4d4bdb854..d702839f0 100644 --- a/nuttx/configs/twr-k60n512/nsh/defconfig +++ b/nuttx/configs/twr-k60n512/nsh/defconfig @@ -491,7 +491,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/twr-k60n512/ostest/defconfig b/nuttx/configs/twr-k60n512/ostest/defconfig index e6dbb8a0a..e5123cec4 100644 --- a/nuttx/configs/twr-k60n512/ostest/defconfig +++ b/nuttx/configs/twr-k60n512/ostest/defconfig @@ -485,7 +485,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/twr-k60n512/src/up_usbmsc.c b/nuttx/configs/twr-k60n512/src/up_usbmsc.c index 41a21beaa..d0e7f66c2 100644 --- a/nuttx/configs/twr-k60n512/src/up_usbmsc.c +++ b/nuttx/configs/twr-k60n512/src/up_usbmsc.c @@ -56,8 +56,8 @@ /* Configuration ************************************************************/ -#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 -# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 +#ifndef CONFIG_SYSTEM_USBMSC_DEVMINOR1 +# define CONFIG_SYSTEM_USBMSC_DEVMINOR1 0 #endif /* SLOT number(s) could depend on the board configuration */ @@ -105,7 +105,7 @@ int usbmsc_archinitialize(void) { - /* If examples/usbmsc is built as an NSH command, then SD slot should + /* If system/usbmsc is built as an NSH command, then SD slot should * already have been initized in nsh_archinitialize() (see up_nsh.c). In * this case, there is nothing further to be done here. */ diff --git a/nuttx/configs/ubw32/nsh/appconfig b/nuttx/configs/ubw32/nsh/appconfig index 5760a5b4a..7faea9c80 100644 --- a/nuttx/configs/ubw32/nsh/appconfig +++ b/nuttx/configs/ubw32/nsh/appconfig @@ -55,8 +55,8 @@ ifeq ($(CONFIG_PIC32MX_USBDEV),y) # USB Mass Storage Class device configurations ifeq ($(CONFIG_USBMSC),y) -# Uncomment to enable the examples/usbmsc built-in -# CONFIGURED_APPS += examples/usbmsc +# Uncomment to enable the system/usbmsc built-in +# CONFIGURED_APPS += system/usbmsc endif # USB CDC/ACM serial device configurations diff --git a/nuttx/configs/ubw32/nsh/defconfig b/nuttx/configs/ubw32/nsh/defconfig index 3aba8ab51..3d1eba7f0 100644 --- a/nuttx/configs/ubw32/nsh/defconfig +++ b/nuttx/configs/ubw32/nsh/defconfig @@ -470,16 +470,16 @@ CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # -# Settings for examples/usbmsc -# -CONFIG_EXAMPLES_USBMSC_NLUNS=1 -CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0 -CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0" -CONFIG_EXAMPLES_USBMSC_TRACEINIT=n -CONFIG_EXAMPLES_USBMSC_TRACECLASS=n -CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n -CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n -CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n +# Settings for system/usbmsc +# +CONFIG_SYSTEM_USBMSC_NLUNS=1 +CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 +CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0" +CONFIG_SYSTEM_USBMSC_TRACEINIT=n +CONFIG_SYSTEM_USBMSC_TRACECLASS=n +CONFIG_SYSTEM_USBMSC_TRACETRANSFERS=n +CONFIG_SYSTEM_USBMSC_TRACECONTROLLER=n +CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS=n # # Settings for examples/cdcacm diff --git a/nuttx/configs/ubw32/ostest/defconfig b/nuttx/configs/ubw32/ostest/defconfig index 1d1fe25f6..7e8284068 100644 --- a/nuttx/configs/ubw32/ostest/defconfig +++ b/nuttx/configs/ubw32/ostest/defconfig @@ -543,7 +543,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set diff --git a/nuttx/configs/vsn/src/usbmsc.c b/nuttx/configs/vsn/src/usbmsc.c index 198e27dea..df263afd3 100644 --- a/nuttx/configs/vsn/src/usbmsc.c +++ b/nuttx/configs/vsn/src/usbmsc.c @@ -61,8 +61,8 @@ /* Configuration ************************************************************/ -#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 -# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 +#ifndef CONFIG_SYSTEM_USBMSC_DEVMINOR1 +# define CONFIG_SYSTEM_USBMSC_DEVMINOR1 0 #endif /* SLOT number(s) could depend on the board configuration */ @@ -131,9 +131,9 @@ int usbmsc_archinitialize(void) message("usbmsc_archinitialize: " "Bind SDIO to the MMC/SD driver, minor=%d\n", - CONFIG_EXAMPLES_USBMSC_DEVMINOR1); + CONFIG_SYSTEM_USBMSC_DEVMINOR1); - ret = mmcsd_slotinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1, sdio); + ret = mmcsd_slotinitialize(CONFIG_SYSTEM_USBMSC_DEVMINOR1, sdio); if (ret != OK) { message("usbmsc_archinitialize: " diff --git a/nuttx/configs/xtrs/nsh/defconfig b/nuttx/configs/xtrs/nsh/defconfig index 8113ba158..436edef42 100644 --- a/nuttx/configs/xtrs/nsh/defconfig +++ b/nuttx/configs/xtrs/nsh/defconfig @@ -353,7 +353,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WLAN is not set diff --git a/nuttx/configs/xtrs/ostest/defconfig b/nuttx/configs/xtrs/ostest/defconfig index d3b908e7d..966411e11 100644 --- a/nuttx/configs/xtrs/ostest/defconfig +++ b/nuttx/configs/xtrs/ostest/defconfig @@ -357,7 +357,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WLAN is not set diff --git a/nuttx/configs/xtrs/pashello/defconfig b/nuttx/configs/xtrs/pashello/defconfig index d6d2831ce..c723e78ae 100644 --- a/nuttx/configs/xtrs/pashello/defconfig +++ b/nuttx/configs/xtrs/pashello/defconfig @@ -353,7 +353,7 @@ CONFIG_EXAMPLES_PASHELLO=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WLAN is not set diff --git a/nuttx/configs/z16f2800100zcog/ostest/defconfig b/nuttx/configs/z16f2800100zcog/ostest/defconfig index 083887eda..40d2a4018 100644 --- a/nuttx/configs/z16f2800100zcog/ostest/defconfig +++ b/nuttx/configs/z16f2800100zcog/ostest/defconfig @@ -396,7 +396,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WLAN is not set diff --git a/nuttx/configs/z16f2800100zcog/pashello/defconfig b/nuttx/configs/z16f2800100zcog/pashello/defconfig index 9a2986c0c..f02ddaff9 100644 --- a/nuttx/configs/z16f2800100zcog/pashello/defconfig +++ b/nuttx/configs/z16f2800100zcog/pashello/defconfig @@ -391,7 +391,7 @@ CONFIG_EXAMPLES_PASHELLO=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WLAN is not set diff --git a/nuttx/configs/z80sim/nsh/defconfig b/nuttx/configs/z80sim/nsh/defconfig index 82d258195..e77f949a7 100644 --- a/nuttx/configs/z80sim/nsh/defconfig +++ b/nuttx/configs/z80sim/nsh/defconfig @@ -353,7 +353,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WLAN is not set diff --git a/nuttx/configs/z80sim/ostest/defconfig b/nuttx/configs/z80sim/ostest/defconfig index 365000410..9004cd4d0 100644 --- a/nuttx/configs/z80sim/ostest/defconfig +++ b/nuttx/configs/z80sim/ostest/defconfig @@ -357,7 +357,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WLAN is not set diff --git a/nuttx/configs/z80sim/pashello/defconfig b/nuttx/configs/z80sim/pashello/defconfig index 82f9ac96c..c3780e4a8 100644 --- a/nuttx/configs/z80sim/pashello/defconfig +++ b/nuttx/configs/z80sim/pashello/defconfig @@ -352,7 +352,7 @@ CONFIG_EXAMPLES_PASHELLO=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WLAN is not set diff --git a/nuttx/configs/z8encore000zco/ostest/defconfig b/nuttx/configs/z8encore000zco/ostest/defconfig index 7c22455e2..a7646d3f4 100644 --- a/nuttx/configs/z8encore000zco/ostest/defconfig +++ b/nuttx/configs/z8encore000zco/ostest/defconfig @@ -383,7 +383,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WLAN is not set diff --git a/nuttx/configs/z8f64200100kit/ostest/defconfig b/nuttx/configs/z8f64200100kit/ostest/defconfig index cc70ced61..c9a8094e9 100644 --- a/nuttx/configs/z8f64200100kit/ostest/defconfig +++ b/nuttx/configs/z8f64200100kit/ostest/defconfig @@ -383,7 +383,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WLAN is not set diff --git a/nuttx/configs/zkit-arm-1769/hello/defconfig b/nuttx/configs/zkit-arm-1769/hello/defconfig index cd01e3ced..d9cd932c6 100644 --- a/nuttx/configs/zkit-arm-1769/hello/defconfig +++ b/nuttx/configs/zkit-arm-1769/hello/defconfig @@ -552,7 +552,7 @@ CONFIG_EXAMPLES_HELLO=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WGET is not set diff --git a/nuttx/configs/zkit-arm-1769/nsh/defconfig b/nuttx/configs/zkit-arm-1769/nsh/defconfig index 2b3da6e47..730ea2d1d 100644 --- a/nuttx/configs/zkit-arm-1769/nsh/defconfig +++ b/nuttx/configs/zkit-arm-1769/nsh/defconfig @@ -617,7 +617,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WGET is not set diff --git a/nuttx/configs/zkit-arm-1769/nxhello/defconfig b/nuttx/configs/zkit-arm-1769/nxhello/defconfig index b20eadf26..ee8877db1 100644 --- a/nuttx/configs/zkit-arm-1769/nxhello/defconfig +++ b/nuttx/configs/zkit-arm-1769/nxhello/defconfig @@ -659,7 +659,7 @@ CONFIG_EXAMPLES_NXHELLO_FONTCOLOR=0xFF # CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WGET is not set diff --git a/nuttx/configs/zkit-arm-1769/src/up_usbmsc.c b/nuttx/configs/zkit-arm-1769/src/up_usbmsc.c index d6a9430da..9a4862fd5 100644 --- a/nuttx/configs/zkit-arm-1769/src/up_usbmsc.c +++ b/nuttx/configs/zkit-arm-1769/src/up_usbmsc.c @@ -62,8 +62,8 @@ /* Configuration ************************************************************/ -#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 -# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 +#ifndef CONFIG_SYSTEM_USBMSC_DEVMINOR1 +# define CONFIG_SYSTEM_USBMSC_DEVMINOR1 0 #endif /* PORT and SLOT number probably depend on the board configuration */ @@ -136,7 +136,7 @@ int usbmsc_archinitialize(void) message("usbmsc_archinitialize: Binding SPI port %d to MMC/SD slot %d\n", LPC17XX_MMCSDSPIPORTNO, LPC17XX_MMCSDSLOTNO); - ret = mmcsd_spislotinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1, LPC17XX_MMCSDSLOTNO, spi); + ret = mmcsd_spislotinitialize(CONFIG_SYSTEM_USBMSC_DEVMINOR1, LPC17XX_MMCSDSLOTNO, spi); if (ret < 0) { message("usbmsc_archinitialize: Failed to bind SPI port %d to MMC/SD slot %d: %d\n", diff --git a/nuttx/configs/zkit-arm-1769/thttpd/defconfig b/nuttx/configs/zkit-arm-1769/thttpd/defconfig index 606b9d53e..305621cbb 100644 --- a/nuttx/configs/zkit-arm-1769/thttpd/defconfig +++ b/nuttx/configs/zkit-arm-1769/thttpd/defconfig @@ -555,7 +555,7 @@ CONFIG_EXAMPLES_THTTPD_NETMASK=0xffffff00 # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WGET is not set diff --git a/nuttx/configs/zp214xpa/nsh/defconfig b/nuttx/configs/zp214xpa/nsh/defconfig index 0ccb3d40d..afbee451a 100644 --- a/nuttx/configs/zp214xpa/nsh/defconfig +++ b/nuttx/configs/zp214xpa/nsh/defconfig @@ -423,7 +423,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WLAN is not set diff --git a/nuttx/configs/zp214xpa/nxlines/defconfig b/nuttx/configs/zp214xpa/nxlines/defconfig index 83027ddef..c9adae9e4 100644 --- a/nuttx/configs/zp214xpa/nxlines/defconfig +++ b/nuttx/configs/zp214xpa/nxlines/defconfig @@ -508,7 +508,7 @@ CONFIG_EXAMPLES_NXLINES_EXTERNINIT=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WLAN is not set -- cgit v1.2.3