configs/pic32mx7mmb/nsh converted to use the kconfig-frontends tools

This commit is contained in:
Gregory Nutt 2014-03-01 12:00:56 -06:00
parent b7d715f2d9
commit 317586c657
5 changed files with 1048 additions and 930 deletions

View File

@ -6718,3 +6718,6 @@
kconfig-frontends tools (2014-3-1).
* configs/pic32-starterkit/nsh2: Configuration converted to use the
kconfig-frontends tools (2014-3-1)
* configs/pic32mx7mmb/nsh: Configuration converted to use the
kconfig-frontends tools (2014-3-1).

View File

@ -482,7 +482,7 @@ config ARCH_BOARD_PIC32_STARTERKIT
(DM320004) with the Multimedia Expansion Board (MEB, DM320005).
See www.microchip.com for further information.
config ARCH_BOARD_PIC32_PIC32MX7MMB
config ARCH_BOARD_PIC32MX7MMB
bool "Mikroelektronika PIC32MX7 MMB"
depends on ARCH_CHIP_PIC32MX795F512L
select ARCH_HAVE_LEDS
@ -930,7 +930,7 @@ config ARCH_BOARD
default "pcblogic-pic32mx" if ARCH_BOARD_PCBLOGICPIC32MX
default "pcduino-a10" if ARCH_BOARD_PCDUINO_A10
default "pic32-starterkit" if ARCH_BOARD_PIC32_STARTERKIT
default "pic32mx7mmb" if ARCH_BOARD_PIC32_PIC32MX7MMB
default "pic32mx7mmb" if ARCH_BOARD_PIC32MX7MMB
default "pirelli_dpl10" if ARCH_BOARD_PIRELLI_DPL10
default "pjrc-8051" if ARCH_BOARD_PJRC_87C52
default "px4fmu-v2_upstream" if ARCH_BOARD_PX4FMU_V2
@ -1164,7 +1164,7 @@ endif
if ARCH_BOARD_PIC32_STARTERKIT
source "configs/pic32-starterkit/Kconfig"
endif
if ARCH_BOARD_PIC32_PIC32MX7MMB
if ARCH_BOARD_PIC32MX7MMB
source "configs/pic32mx7mmb/Kconfig"
endif
if ARCH_BOARD_PIRELLI_DPL10

View File

@ -610,215 +610,209 @@ selected as follow:
Where <subdir> is one of the following:
nsh:
====
Description.
------------
This is the NuttShell (NSH) using the NSH startup logic at
apps/examples/nsh.
Serial Output.
--------------
The OS test produces all of its test output on the serial console.
This configuration has UART1 enabled as a serial console.
SD Card Support
---------------
SD card support is built into this example by default:
CONFIG_PIC32MX_SPI1=y
CONFIG_NSH_ARCHINIT=y
The SD card can be mounted from the NSH command line as follows:
nsh> mount -t vfat /dev/mmcsd0 /mnt/sdcard
nsh> ls -l /mnt/sdcard
/mnt/sdcard:
-rw-rw-rw- 16 ATEST.TXT
-rw-rw-rw- 21170 TODO
-rw-rw-rw- 22 ANOTHER.TXT
-rw-rw-rw- 22 HI2148.TXT
-rw-rw-rw- 16 HiFromNotePad.txt
USB Configurations.
------------------
USB device support is enabled by default in this configuration.
The following settings are defined by default (and can be set
to 'n' to disabled USB device support).
CONFIG_USBDEV=y : Enable basic USB device support
CONFIG_PIC32MX_USBDEV=y : Enable PIC32 USB device support
CONFIG_USBMSC=y : USB supports a mass storage device.
In this configuration, NSH will support the following commands:
msconn : Connect the mass storage device, exportint the SD
card as the USB mass storage logical unit.
msdis : Disconnect the USB mass storage device
NOTE: The SD card should *not* be mounted under NSH *and* exported
by the mass storage device!!! That can result in corruption of the
SD card format. This is the sequence of commands that you should
use to work with the SD card safely:
mount -t vfat /dev/mmcsd0 /mnt/sdcard : Mount the SD card initially
...
umount /mnt/sdcard : Unmount the SD card before connecting
msconn : Connect the USB MSC
...
msdis : Disconnect the USB MSC
mount -t vfat /dev/mmcsd0 /mnt/sdcard : Re-mount the SD card
...
Other USB other device configurations can be enabled and
included as NSH built-in built in functions.
examples/usbterm - This option can be enabled by uncommenting
the following line in the appconfig file:
CONFIGURED_APPS += examples/usbterm
And by enabling one of the USB serial devices:
CONFIG_USBMSC=n : Disable USB mass storage device.
CONFIG_PL2303=y : Enable the Prolifics PL2303 emulation
CONFIG_CDCACM=y : or the CDC/ACM serial driver (not both)
system/cdcacm - The system/cdcacm program can be included as an
function by uncommenting the following line in the appconfig file:
CONFIGURED_APPS += system/cdcacm
and defining the following in your .config file:
CONFIG_USBMSC=n : Disable USB mass storage device.
CONFIG_CDCACM=y : Enable the CDCACM device
Networking Configurations.
--------------------------
Networking is enabled by default in this configuration:
CONFIG_NET=y : Enable networking support
CONFIG_PIC32MX_ETHERNET=y : Enable the PIC32 Ethernet driver
CONFIG_NSH_TELNET=y : Enable the Telnet NSH console (optional)
The default configuration has:
CONFIG_NSH_DHCPC=n : DHCP is disabled
CONFIG_NSH_IPADDR=(10<<24|0<<16|0<<8|2) : Target IP address 10.0.0.2
CONFIG_NSH_DRIPADDR=(10<<24|0<<16|0<<8|1) : Host IP address 10.0.0.1
This will probably need to be customized for your network.
NOTES:
1. This logic will assume that a network is connected. During its
initialization, it will try to negotiate the link speed. If you have
no network connected when you reset the board, there will be a long
delay (maybe 30 seconds?) before anything happens. That is the timeout
before the networking finally gives up and decides that no network is
available.
2. This example can support an FTP client. In order to build in FTP client
support simply uncomment the following lines in the appconfig file (before
configuring) or in the apps/.config file (after configuring):
1. This configuration uses the mconf-based configuration tool. To
change this configurations using that tool, you should:
#CONFIGURED_APPS += netutils/ftpc
#CONFIGURED_APPS += examples/ftpc
a. Build and install the kconfig-mconf tool. See nuttx/README.txt
and misc/tools/
3. This example can support an FTP server. In order to build in FTP server
support simply uncomment the following lines in the appconfig file (before
configuring) or in the apps/.config file (after configuring):
b. Execute 'make menuconfig' in nuttx/ in order to start the
reconfiguration process.
#CONFIGURED_APPS += netutils/ftpd
#CONFIGURED_APPS += examples/ftpd
2. Serial Output
And enable poll() support in the NuttX configuration file:
The OS test produces all of its test output on the serial console.
This configuration has UART1 enabled as a serial console.
CONFIG_DISABLE_POLL=n
3. SD Card Support
Using a RAM disk and the USB MSC device to the nsh configuration
----------------------------------------------------------------
Here is an experimental change to examples/nsh that will create a RAM
disk and attempt to export that RAM disk as a USB mass storage device.
1. Changes to nuttx/.config
a) Enable support for the PIC32 USB device
-CONFIG_PIC32MX_USBDEV=n
+CONFIG_PIC32MX_USBDEV=y
b) Enable NuttX USB device support
-CONFIG_USBDEV=n
+CONFIG_USBDEV=y
c) Enable the USB MSC class driver
-CONFIG_USBMSC=n
+CONFIG_USBMSC=y
d) Use a RAM disk (instead of an SD card) as the USB MSC logical unit:
-CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0"
+CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/ram0"
2. Changes to nuttx/.config.
a) Enable building of the system/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:
a) Create a 64Kb RAM disk at /dev/ram0:
nsh> mkrd -s 512 128
b) Put a FAT file system on the RAM disk:
SD card support is built into this example by default:
nsh> mkfatfs /dev/ram0
CONFIG_PIC32MX_SPI1=y
CONFIG_NSH_ARCHINIT=y
b) Now the 'msconn' command will connect to the host and
export /dev/ram0 as the USB logical unit:
The SD card can be mounted from the NSH command line as follows:
nsh> msconn
nsh> mount -t vfat /dev/mmcsd0 /mnt/sdcard
nsh> ls -l /mnt/sdcard
/mnt/sdcard:
-rw-rw-rw- 16 ATEST.TXT
-rw-rw-rw- 21170 TODO
-rw-rw-rw- 22 ANOTHER.TXT
-rw-rw-rw- 22 HI2148.TXT
-rw-rw-rw- 16 HiFromNotePad.txt
NOTE: This modification should be considered experimental. IN the
little testing I have done with it, it appears functional. But the
logic has not been stressed and there could still be lurking issues.
(There is a bug associated with this configuration listed in the
top-level TODO list).
4. USB Configurations
Adding LCD and graphics support to the nsh configuration:
--------------------------------------------------------
LCD support is already enabled in defconfig (nuttx/.config):
CONFIG_NX=y : Enable graphics suppport
CONFIG_PIC32MX_PMP=y : Enable parallel port support
CONFIG_LCD_MIO283QT2=y : MIO283QT2 LCD support
But you will have to enable a specific graphics example application
in order to see anything.
USB device support is enabled by default in this configuration.
The following settings are defined by default (and can be set
to 'n' to disabled USB device support).
appconfig (apps/.config): Enable the application configurations that you
want to use. Asexamples:
CONFIG_USBDEV=y : Enable basic USB device support
CONFIG_PIC32MX_USBDEV=y : Enable PIC32 USB device support
CONFIG_USBMSC=y : USB supports a mass storage device.
CONFIGURED_APPS += examples/nx : Pick one or more
CONFIGURED_APPS += examples/nxhello :
CONFIGURED_APPS += examples/nximage :
CONFIGURED_APPS += examples/nxlines :
In this configuration, NSH will support the following commands:
Enabling touch screen support in the nsh configuaration
-------------------------------------------------------
msconn : Connect the mass storage device, exportint the SD
card as the USB mass storage logical unit.
msdis : Disconnect the USB mass storage device
NOTE: The SD card should *not* be mounted under NSH *and* exported
by the mass storage device!!! That can result in corruption of the
SD card format. This is the sequence of commands that you should
use to work with the SD card safely:
In defconfig (or nuttx/.config), set:
mount -t vfat /dev/mmcsd0 /mnt/sdcard : Mount the SD card initially
...
umount /mnt/sdcard : Unmount the SD card before connecting
msconn : Connect the USB MSC
...
msdis : Disconnect the USB MSC
mount -t vfat /dev/mmcsd0 /mnt/sdcard : Re-mount the SD card
...
Other USB other device configurations can be enabled and
included as NSH built-in built in functions.
CONFIG_INPUT=y : Enable input device support
CONFIG_SCHED_WORKQUEUE=y : Work queue support needed
examples/usbterm - This option can be enabled by adding the
following to the NuttX configuration file:
In appconfig (or apps/.config), uncomment:
CONFIG_EXAMPLES_USBTERM=y
CONFIGURED_APPS += examples/touchscreen
And by enabling one of the USB serial devices:
CONFIG_USBMSC=n : Disable USB mass storage device.
CONFIG_PL2303=y : Enable the Prolifics PL2303 emulation
CONFIG_CDCACM=y : or the CDC/ACM serial driver (not both)
system/cdcacm - The system/cdcacm program can be included as an
function by adding the following to the NuttX configuration file:
CONFIG_SYSTEM_CDCACM=y
and defining the following in your .config file:
CONFIG_USBMSC=n : Disable USB mass storage device.
CONFIG_CDCACM=y : Enable the CDCACM device
5. Networking Configurations
Networking is enabled by default in this configuration:
CONFIG_NET=y : Enable networking support
CONFIG_PIC32MX_ETHERNET=y : Enable the PIC32 Ethernet driver
CONFIG_NSH_TELNET=y : Enable the Telnet NSH console (optional)
The default configuration has:
CONFIG_NSH_DHCPC=n : DHCP is disabled
CONFIG_NSH_IPADDR=(10<<24|0<<16|0<<8|2) : Target IP address 10.0.0.2
CONFIG_NSH_DRIPADDR=(10<<24|0<<16|0<<8|1) : Host IP address 10.0.0.1
This will probably need to be customized for your network.
NOTES:
a. This logic will assume that a network is connected. During its
initialization, it will try to negotiate the link speed. If you have
no network connected when you reset the board, there will be a long
delay (maybe 30 seconds?) before anything happens. That is the timeout
before the networking finally gives up and decides that no network is
available.
b. This example can support an FTP client. In order to build in FTP client
support simply add the following to the NuttX configuration file:
CONFIG_NETUTILS_FTPC=y
CONFIG_EXAMPLES_FTPC=y
3. This example can support an FTP server. In order to build in FTP server
support simply add the following to the NuttX configuration file:
CONFIG_NETUTILS_FTPD=y
CONFIG_SYSTEM_FTPD=y
And enable poll() support in the NuttX configuration file:
CONFIG_DISABLE_POLL=n
6. Using a RAM disk and the USB MSC device to the nsh configuration
Here is an experimental change to examples/nsh that will create a RAM
disk and attempt to export that RAM disk as a USB mass storage device.
1. Changes to nuttx/.config
a) Enable support for the PIC32 USB device
-CONFIG_PIC32MX_USBDEV=n
+CONFIG_PIC32MX_USBDEV=y
b) Enable NuttX USB device support
-CONFIG_USBDEV=n
+CONFIG_USBDEV=y
c) Enable the USB MSC class driver
-CONFIG_USBMSC=n
+CONFIG_USBMSC=y
d) Use a RAM disk (instead of an SD card) as the USB MSC logical unit:
-CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/mmcsd0"
+CONFIG_SYSTEM_USBMSC_DEVPATH1="/dev/ram0"
2. Changes to nuttx/.config.
a) Enable building of the system/usbmsc:
CONFIG_SYSTEM_USBMSC=y
3. When NSH first comes up, you must manually create the RAM disk
before exporting it:
a) Create a 64Kb RAM disk at /dev/ram0:
nsh> mkrd -s 512 128
b) Put a FAT file system on the RAM disk:
nsh> mkfatfs /dev/ram0
b) Now the 'msconn' command will connect to the host and
export /dev/ram0 as the USB logical unit:
nsh> msconn
NOTE: This modification should be considered experimental. IN the
little testing I have done with it, it appears functional. But the
logic has not been stressed and there could still be lurking issues.
(There is a bug associated with this configuration listed in the
top-level TODO list).
7. Adding LCD and graphics support to the nsh configuration
LCD support is already enabled in defconfig (nuttx/.config):
CONFIG_NX=y : Enable graphics suppport
CONFIG_PIC32MX_PMP=y : Enable parallel port support
CONFIG_LCD_MIO283QT2=y : MIO283QT2 LCD support
But you will have to enable a specific graphics example application
in the NuttX configuration file in order to see anything.
8. Enabling touch screen support in the nsh configuaration
In defconfig (or nuttx/.config), set:
CONFIG_INPUT=y : Enable input device support
CONFIG_SCHED_WORKQUEUE=y : Work queue support needed
CONFIG_EXAMPLES_TOUCHSCREEN=y : Touchscreen example code

View File

@ -1,132 +0,0 @@
############################################################################
# configs/pic32mx7mmb/nsh/appconfig
#
# Copyright (C) 2012 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# 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.
#
############################################################################
############################################################################
# Path to example in apps/examples containing the user_start entry point
############################################################################
CONFIGURED_APPS += examples/nsh
############################################################################
# The NSH application library
############################################################################
CONFIGURED_APPS += system/readline
CONFIGURED_APPS += nshlib
############################################################################
# USB device configurations
############################################################################
ifeq ($(CONFIG_PIC32MX_USBDEV),y)
# USB Mass Storage Class device configurations
ifeq ($(CONFIG_USBMSC),y)
CONFIGURED_APPS += system/usbmsc
else
# USB CDC/ACM serial device configurations
ifeq ($(CONFIG_CDCACM),y)
# Comment out to enable the examples/usbterm built-in
CONFIGURED_APPS += system/cdcacm
# Uncomment the following to enable the examples/usbterm built-in
# CONFIGURED_APPS += examples/usbterm
else
# Prolifics PL2303 emulation configurations
ifeq ($(CONFIG_PL2303),y)
# Uncomment the following to enable the examples/usbterm built-in
# CONFIGURED_APPS += examples/usbterm
endif # CONFIG_PL2303
endif # CONFIG_CDCACM
endif # CONFIG_USBMSC
endif # CONFIG_PIC32MX_USBDEV
############################################################################
# Networking configurations
############################################################################
# Networking libraries.
# Uncomment netutils/ftpc to include an FTP client library
# Uncomment netutils/ftpd to include an FTP server library
ifeq ($(CONFIG_NET),y)
CONFIGURED_APPS += netutils/uiplib
CONFIGURED_APPS += netutils/resolv
CONFIGURED_APPS += netutils/webclient
CONFIGURED_APPS += netutils/tftpc
#CONFIGURED_APPS += netutils/ftpc
#CONFIGURED_APPS += netutils/ftpd
ifeq ($(CONFIG_NSH_TELNET),y)
CONFIGURED_APPS += netutils/telnetd
endif
endif
# Networking applications configured as an NX built-in commands
# Uncomment examples/ftpc to include the FTP client example
# Uncomment examples/ftpd to include the FTP daemon example
ifeq ($(CONFIG_NET),y)
#CONFIGURED_APPS += examples/ftpc
#CONFIGURED_APPS += examples/ftpd
endif
############################################################################
# Other Applications that can be configured as an NX built-in commands
############################################################################
# The I2C tool
ifeq ($(CONFIG_I2C),y)
CONFIGURED_APPS += system/i2c
endif
# Uncomment to select a graphics example
ifeq ($(CONFIG_NX),y)
#CONFIGURED_APPS += examples/nx
#CONFIGURED_APPS += examples/nxhello
#CONFIGURED_APPS += examples/nximage
#CONFIGURED_APPS += examples/nxlines
endif
# Uncomment to enable the touchscreen test
ifeq ($(CONFIG_INPUT),y)
#CONFIGURED_APPS += examples/touchscreen
endif

File diff suppressed because it is too large Load Diff