Enable network and SD/MMC card support

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3145 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2010-11-28 17:26:08 +00:00
parent a51281d01e
commit b9264a2e31
8 changed files with 61 additions and 49 deletions

View File

@ -52,7 +52,7 @@
# CONFIG_DRAM_SIZE - Describes the installed DRAM.
# CONFIG_DRAM_START - The start address of DRAM (physical)
# CONFIG_DRAM_END - Last address+1 of installed RAM
# CONFIG_ARCH_IRQPRIO - The ST32F103Z supports interrupt prioritization
# CONFIG_ARCH_IRQPRIO - The LPC17xx supports interrupt prioritization
# CONFIG_ARCH_INTERRUPTSTACK - This architecture supports an interrupt
# stack. If defined, this symbol is the size of the interrupt
# stack in bytes. If not defined, the user task stacks will be
@ -102,6 +102,7 @@ CONFIG_LPC17_BUILDROOT=y
#
# Individual subsystems can be enabled:
# (MAINOSC, PLL0, PLL1 and FLASH are controlled in board.h)
#
CONFIG_LPC17_ETHERNET=y
CONFIG_LPC17_USBHOST=n
CONFIG_LPC17_USBOTG=n
@ -463,6 +464,7 @@ CONFIG_PREALLOC_TIMERS=8
# CONFIG_FS_FAT - Enable FAT filesystem support
# CONFIG_FAT_SECTORSIZE - Max supported sector size
# CONFIG_FS_ROMFS - Enable ROMFS filesystem support
#
CONFIG_FS_FAT=n
CONFIG_FS_ROMFS=n
@ -709,6 +711,7 @@ CONFIG_EXAMPLE_UIP_DHCPC=n
# CONFIG_EXAMPLE_NETTEST_NETMASK - Network mask
# CONFIG_EXAMPLE_NETTEST_CLIENTIP - IP address of the
# client side of the test (may be target or host)
#
CONFIG_EXAMPLE_NETTEST_SERVER=n
CONFIG_EXAMPLE_NETTEST_PERFORMANCE=n
CONFIG_EXAMPLE_NETTEST_NOMAC=y
@ -771,7 +774,7 @@ CONFIG_EXAMPLES_NSH_TELNET=n
CONFIG_EXAMPLES_NSH_ARCHINIT=n
CONFIG_EXAMPLES_NSH_IOBUFFER_SIZE=512
CONFIG_EXAMPLES_NSH_DHCPC=n
CONFIG_EXAMPLES_NSH_NOMAC=n
CONFIG_EXAMPLES_NSH_NOMAC=y
CONFIG_EXAMPLES_NSH_IPADDR=(10<<24|0<<16|0<<8|2)
CONFIG_EXAMPLES_NSH_DRIPADDR=(10<<24|0<<16|0<<8|1)
CONFIG_EXAMPLES_NSH_NETMASK=(255<<24|255<<16|255<<8|0)

View File

@ -52,7 +52,7 @@
# CONFIG_DRAM_SIZE - Describes the installed DRAM.
# CONFIG_DRAM_START - The start address of DRAM (physical)
# CONFIG_DRAM_END - Last address+1 of installed RAM
# CONFIG_ARCH_IRQPRIO - The ST32F103Z supports interrupt prioritization
# CONFIG_ARCH_IRQPRIO - The LPC17xx supports interrupt prioritization
# CONFIG_ARCH_INTERRUPTSTACK - This architecture supports an interrupt
# stack. If defined, this symbol is the size of the interrupt
# stack in bytes. If not defined, the user task stacks will be
@ -102,7 +102,8 @@ CONFIG_LPC17_BUILDROOT=y
#
# Individual subsystems can be enabled:
# (MAINOSC, PLL0, PLL1 and FLASH are controlled in board.h)
CONFIG_LPC17_ETHERNET=n
#
CONFIG_LPC17_ETHERNET=y
CONFIG_LPC17_USBHOST=n
CONFIG_LPC17_USBOTG=n
CONFIG_LPC17_USBDEV=n
@ -113,8 +114,8 @@ CONFIG_LPC17_UART3=n
CONFIG_LPC17_CAN1=n
CONFIG_LPC17_CAN2=n
CONFIG_LPC17_SPI=n
CONFIG_LPC17_SSP0=y
CONFIG_LPC17_SSP1=n
CONFIG_LPC17_SSP0=n
CONFIG_LPC17_SSP1=y
CONFIG_LPC17_I2C0=n
CONFIG_LPC17_I2C1=n
CONFIG_LPC17_I2S=n
@ -194,6 +195,8 @@ CONFIG_UART3_2STOP=0
# CONFIG_NET_PRIORITY - Ethernet interrupt priority. The is default is
# the higest priority.
# CONFIG_NET_WOL - Enable Wake-up on Lan (not fully implemented).
# CONFIG_NET_DUMPPACKET - Dump all received and transmitted packets.
# Also needs CONFIG_DEBUG.
# CONFIG_NET_REGDEBUG - Enabled low level register debug. Also needs
# CONFIG_DEBUG.
# CONFIG_NET_HASH - Enable receipt of near-perfect match frames.
@ -204,6 +207,10 @@ CONFIG_PHY_KS8721=y
CONFIG_PHY_AUTONEG=y
CONFIG_PHY_SPEED100=n
CONFIG_PHY_FDUPLEX=y
CONFIG_NET_EMACRAM_SIZE=8192
CONFIG_NET_NTXDESC=7
CONFIG_NET_NRXDESC=7
CONFIG_NET_REGDEBUG=n
#
# General build options
@ -456,6 +463,7 @@ CONFIG_PREALLOC_TIMERS=4
# CONFIG_FS_FAT - Enable FAT filesystem support
# CONFIG_FAT_SECTORSIZE - Max supported sector size
# CONFIG_FS_ROMFS - Enable ROMFS filesystem support
#
CONFIG_FS_FAT=y
CONFIG_FS_ROMFS=n
@ -525,19 +533,21 @@ CONFIG_MMCSD_HAVECARDDETECT=n
# CONFIG_NET_LLH_LEN - The link level header length
# CONFIG_NET_FWCACHE_SIZE - number of packets to remember when looking for duplicates
#
CONFIG_NET=n
CONFIG_NET=y
CONFIG_NET_IPv6=n
CONFIG_NSOCKET_DESCRIPTORS=0
CONFIG_NSOCKET_DESCRIPTORS=8
CONFIG_NET_SOCKOPTS=y
CONFIG_NET_BUFSIZE=420
CONFIG_NET_TCP=n
CONFIG_NET_TCP_CONNS=40
CONFIG_NET_MAX_LISTENPORTS=40
CONFIG_NET_UDP=n
CONFIG_NET_BUFSIZE=562
CONFIG_NET_TCP=y
CONFIG_NET_TCP_CONNS=8
CONFIG_NET_NTCP_READAHEAD_BUFFERS=16
CONFIG_NET_TCPBACKLOG=n
CONFIG_NET_MAX_LISTENPORTS=8
CONFIG_NET_UDP=y
CONFIG_NET_UDP_CHECKSUMS=y
#CONFIG_NET_UDP_CONNS=10
CONFIG_NET_ICMP=n
CONFIG_NET_ICMP_PING=n
#CONFIG_NET_UDP_CONNS=8
CONFIG_NET_ICMP=y
CONFIG_NET_ICMP_PING=y
#CONFIG_NET_PINGADDRCONF=0
CONFIG_NET_STATISTICS=y
#CONFIG_NET_RECEIVE_WINDOW=
@ -700,6 +710,7 @@ CONFIG_EXAMPLE_UIP_DHCPC=n
# CONFIG_EXAMPLE_NETTEST_NETMASK - Network mask
# CONFIG_EXAMPLE_NETTEST_CLIENTIP - IP address of the
# client side of the test (may be target or host)
#
CONFIG_EXAMPLE_NETTEST_SERVER=n
CONFIG_EXAMPLE_NETTEST_PERFORMANCE=n
CONFIG_EXAMPLE_NETTEST_NOMAC=y
@ -708,7 +719,6 @@ CONFIG_EXAMPLE_NETTEST_DRIPADDR=(10L<<24|0L<<16|0L<<8|1L)
CONFIG_EXAMPLE_NETTEST_NETMASK=(255L<<24|255L<<16|255L<<8|0L)
CONFIG_EXAMPLE_NETTEST_CLIENTIP=(10L<<24|0L<<16|0L<<8|1L)
#
#
# Settings for examples/ostest
#
@ -763,7 +773,7 @@ CONFIG_EXAMPLES_NSH_TELNET=n
CONFIG_EXAMPLES_NSH_ARCHINIT=y
CONFIG_EXAMPLES_NSH_IOBUFFER_SIZE=512
CONFIG_EXAMPLES_NSH_DHCPC=n
CONFIG_EXAMPLES_NSH_NOMAC=n
CONFIG_EXAMPLES_NSH_NOMAC=y
CONFIG_EXAMPLES_NSH_IPADDR=(10<<24|0<<16|0<<8|2)
CONFIG_EXAMPLES_NSH_DRIPADDR=(10<<24|0<<16|0<<8|1)
CONFIG_EXAMPLES_NSH_NETMASK=(255<<24|255<<16|255<<8|0)
@ -779,7 +789,7 @@ CONFIG_EXAMPLES_NSH_FATMOUNTPT=/tmp
#
# Architecture-specific NSH options
#
CONFIG_EXAMPLES_NSH_MMCSDSPIPORTNO=0
CONFIG_EXAMPLES_NSH_MMCSDSPIPORTNO=1
CONFIG_EXAMPLES_NSH_MMCSDSLOTNO=0
CONFIG_EXAMPLES_NSH_MMCSDMINOR=0

View File

@ -52,7 +52,7 @@
# CONFIG_DRAM_SIZE - Describes the installed DRAM.
# CONFIG_DRAM_START - The start address of DRAM (physical)
# CONFIG_DRAM_END - Last address+1 of installed RAM
# CONFIG_ARCH_IRQPRIO - The ST32F103Z supports interrupt prioritization
# CONFIG_ARCH_IRQPRIO - The LPC17xx supports interrupt prioritization
# CONFIG_ARCH_INTERRUPTSTACK - This architecture supports an interrupt
# stack. If defined, this symbol is the size of the interrupt
# stack in bytes. If not defined, the user task stacks will be
@ -102,6 +102,7 @@ CONFIG_LPC17_BUILDROOT=y
#
# Individual subsystems can be enabled:
# (MAINOSC, PLL0, PLL1 and FLASH are controlled in board.h)
#
CONFIG_LPC17_ETHERNET=n
CONFIG_LPC17_USBHOST=n
CONFIG_LPC17_USBOTG=n
@ -456,6 +457,7 @@ CONFIG_PREALLOC_TIMERS=4
# CONFIG_FS_FAT - Enable FAT filesystem support
# CONFIG_FAT_SECTORSIZE - Max supported sector size
# CONFIG_FS_ROMFS - Enable ROMFS filesystem support
#
CONFIG_FS_FAT=n
CONFIG_FS_ROMFS=n
@ -700,6 +702,7 @@ CONFIG_EXAMPLE_UIP_DHCPC=n
# CONFIG_EXAMPLE_NETTEST_NETMASK - Network mask
# CONFIG_EXAMPLE_NETTEST_CLIENTIP - IP address of the
# client side of the test (may be target or host)
#
CONFIG_EXAMPLE_NETTEST_SERVER=n
CONFIG_EXAMPLE_NETTEST_PERFORMANCE=n
CONFIG_EXAMPLE_NETTEST_NOMAC=y
@ -708,8 +711,6 @@ CONFIG_EXAMPLE_NETTEST_DRIPADDR=(10L<<24|0L<<16|0L<<8|1L)
CONFIG_EXAMPLE_NETTEST_NETMASK=(255L<<24|255L<<16|255L<<8|0L)
CONFIG_EXAMPLE_NETTEST_CLIENTIP=(10L<<24|0L<<16|0L<<8|1L)
#
#
# Settings for examples/ostest
#

View File

@ -56,33 +56,25 @@
/* PORT and SLOT number probably depend on the board configuration */
#ifdef CONFIG_ARCH_BOARD_LPC1766STK
# define CONFIG_EXAMPLES_NSH_HAVEUSBDEV 1
# define CONFIG_EXAMPLES_NSH_HAVEMMCSD 1
# if !defined(CONFIG_EXAMPLES_NSH_MMCSDSPIPORTNO) || CONFIG_EXAMPLES_NSH_MMCSDSPIPORTNO != 0
# error "The LPC1766-STK MMC/SD is on SSP0"
# if !defined(CONFIG_EXAMPLES_NSH_MMCSDSPIPORTNO) || CONFIG_EXAMPLES_NSH_MMCSDSPIPORTNO != 1
# error "The LPC1766-STK MMC/SD is on SSP1"
# undef CONFIG_EXAMPLES_NSH_MMCSDSPIPORTNO
# define CONFIG_EXAMPLES_NSH_MMCSDSPIPORTNO 0
# define CONFIG_EXAMPLES_NSH_MMCSDSPIPORTNO 1
# endif
# if !defined(CONFIG_EXAMPLES_NSH_MMCSDSLOTNO) || CONFIG_EXAMPLES_NSH_MMCSDSLOTNO != 0
# error "The LPC1766-STK MMC/SD is only one slot (0)"
# undef CONFIG_EXAMPLES_NSH_MMCSDSLOTNO
# define CONFIG_EXAMPLES_NSH_MMCSDSLOTNO 0
# endif
# ifndef CONFIG_LPC17_SSP0
# warning "CONFIG_LPC17_SSP0 is not enabled"
# ifndef CONFIG_LPC17_SSP1
# warning "CONFIG_LPC17_SSP1 is not enabled"
# endif
#else
# error "Unrecognized board"
# undef CONFIG_EXAMPLES_NSH_HAVEUSBDEV
# undef CONFIG_EXAMPLES_NSH_HAVEMMCSD
#endif
/* Can't support USB features if USB is not enabled */
#ifndef CONFIG_USBDEV
# undef CONFIG_EXAMPLES_NSH_HAVEUSBDEV
#endif
/* Can't support MMC/SD features if mountpoints are disabled */
#if defined(CONFIG_DISABLE_MOUNTPOINT)

View File

@ -52,8 +52,6 @@
#include "lpc17_internal.h"
#include "lpc1766stk_internal.h"
/* The LM3S6965 Eval Kit microSD CS is on SSI0 */
#if defined(CONFIG_LPC17_SSP0) || defined(CONFIG_LPC17_SSP1)
/************************************************************************************
@ -100,7 +98,7 @@
* Name: lpc17_sspinitialize
*
* Description:
* Called to configure SPI chip select GPIO pins for the LM3S6965 Eval Kit.
* Called to configure SPI chip select GPIO pins for the LPC1766-STK.
*
************************************************************************************/
@ -157,7 +155,7 @@ void lpc17_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sel
/* Assert/de-assert the CS pin to the card */
ssp_dumpssp0gpio("lpc17_ssp0select() Entry");
lm3s_gpiowrite(LPC1766STK_LCD_CS, !selected);
lpc17_gpiowrite(LPC1766STK_LCD_CS, !selected);
ssp_dumpssp0gpio("lpc17_ssp0select() Exit");
}
}
@ -178,7 +176,7 @@ void lpc17_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sel
/* Assert/de-assert the CS pin to the card */
ssp_dumpssp1gpio("lpc17_ssp1select() Entry");
lm3s_gpiowrite(LPC1766STK_MMC_CS, !selected);
lpc17_gpiowrite(LPC1766STK_MMC_CS, !selected);
ssp_dumpssp1gpio("lpc17_ssp1select() Exit");
}
}

View File

@ -52,7 +52,7 @@
# CONFIG_DRAM_SIZE - Describes the installed DRAM.
# CONFIG_DRAM_START - The start address of DRAM (physical)
# CONFIG_DRAM_END - Last address+1 of installed RAM
# CONFIG_ARCH_IRQPRIO - The ST32F103Z supports interrupt prioritization
# CONFIG_ARCH_IRQPRIO - The LPC17xx supports interrupt prioritization
# CONFIG_ARCH_INTERRUPTSTACK - This architecture supports an interrupt
# stack. If defined, this symbol is the size of the interrupt
# stack in bytes. If not defined, the user task stacks will be
@ -102,6 +102,7 @@ CONFIG_LPC17_BUILDROOT=y
#
# Individual subsystems can be enabled:
# (MAINOSC, PLL0, PLL1 and FLASH are controlled in board.h)
#
CONFIG_LPC17_ETHERNET=y
CONFIG_LPC17_USBHOST=n
CONFIG_LPC17_USBOTG=n
@ -472,6 +473,7 @@ CONFIG_PREALLOC_TIMERS=8
# CONFIG_FS_FAT - Enable FAT filesystem support
# CONFIG_FAT_SECTORSIZE - Max supported sector size
# CONFIG_FS_ROMFS - Enable ROMFS filesystem support
#
CONFIG_FS_FAT=n
CONFIG_FS_ROMFS=y
@ -753,6 +755,7 @@ CONFIG_USBSTRG_REMOVABLE=y
# CONFIG_THTTPD_GENERATE_INDICES
# CONFIG_THTTPD_URLPATTERN - If defined, then it will be used to match
# and verify referrers.
#
CONFIG_THTTPD_PORT=80
CONFIG_THTTPD_IPADDR=(10<<24|0<<16|0<<8|2)
CONFIG_THTTPD_SERVER_ADDRESS="http://www.nuttx.org"
@ -807,6 +810,7 @@ CONFIG_EXAMPLE_UIP_DHCPC=n
# CONFIG_EXAMPLE_NETTEST_NETMASK - Network mask
# CONFIG_EXAMPLE_NETTEST_CLIENTIP - IP address of the
# client side of the test (may be target or host)
#
CONFIG_EXAMPLE_NETTEST_SERVER=n
CONFIG_EXAMPLE_NETTEST_PERFORMANCE=n
CONFIG_EXAMPLE_NETTEST_NOMAC=y

View File

@ -52,7 +52,7 @@
# CONFIG_DRAM_SIZE - Describes the installed DRAM.
# CONFIG_DRAM_START - The start address of DRAM (physical)
# CONFIG_DRAM_END - Last address+1 of installed RAM
# CONFIG_ARCH_IRQPRIO - The ST32F103Z supports interrupt prioritization
# CONFIG_ARCH_IRQPRIO - The LPC17xx supports interrupt prioritization
# CONFIG_ARCH_INTERRUPTSTACK - This architecture supports an interrupt
# stack. If defined, this symbol is the size of the interrupt
# stack in bytes. If not defined, the user task stacks will be
@ -102,6 +102,7 @@ CONFIG_LPC17_BUILDROOT=y
#
# Individual subsystems can be enabled:
# (MAINOSC, PLL0, PLL1 and FLASH are controlled in board.h)
#
CONFIG_LPC17_ETHERNET=n
CONFIG_LPC17_USBHOST=n
CONFIG_LPC17_USBOTG=n
@ -457,6 +458,7 @@ CONFIG_PREALLOC_TIMERS=4
# CONFIG_FS_FAT - Enable FAT filesystem support
# CONFIG_FAT_SECTORSIZE - Max supported sector size
# CONFIG_FS_ROMFS - Enable ROMFS filesystem support
#
CONFIG_FS_FAT=n
CONFIG_FS_ROMFS=n
@ -701,6 +703,7 @@ CONFIG_EXAMPLE_UIP_DHCPC=n
# CONFIG_EXAMPLE_NETTEST_NETMASK - Network mask
# CONFIG_EXAMPLE_NETTEST_CLIENTIP - IP address of the
# client side of the test (may be target or host)
#
CONFIG_EXAMPLE_NETTEST_SERVER=n
CONFIG_EXAMPLE_NETTEST_PERFORMANCE=n
CONFIG_EXAMPLE_NETTEST_NOMAC=y
@ -709,8 +712,6 @@ CONFIG_EXAMPLE_NETTEST_DRIPADDR=(10L<<24|0L<<16|0L<<8|1L)
CONFIG_EXAMPLE_NETTEST_NETMASK=(255L<<24|255L<<16|255L<<8|0L)
CONFIG_EXAMPLE_NETTEST_CLIENTIP=(10L<<24|0L<<16|0L<<8|1L)
#
#
# Settings for examples/ostest
#
@ -842,6 +843,7 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
# Show controller events
# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
# Show interrupt-related events.
#
CONFIG_EXAMPLES_USBSTRG_NLUNS=1
CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/mmcsd0"

View File

@ -52,7 +52,7 @@
# CONFIG_DRAM_SIZE - Describes the installed DRAM.
# CONFIG_DRAM_START - The start address of DRAM (physical)
# CONFIG_DRAM_END - Last address+1 of installed RAM
# CONFIG_ARCH_IRQPRIO - The ST32F103Z supports interrupt prioritization
# CONFIG_ARCH_IRQPRIO - The LPC17xx supports interrupt prioritization
# CONFIG_ARCH_INTERRUPTSTACK - This architecture supports an interrupt
# stack. If defined, this symbol is the size of the interrupt
# stack in bytes. If not defined, the user task stacks will be
@ -102,6 +102,7 @@ CONFIG_LPC17_BUILDROOT=y
#
# Individual subsystems can be enabled:
# (MAINOSC, PLL0, PLL1 and FLASH are controlled in board.h)
#
CONFIG_LPC17_ETHERNET=n
CONFIG_LPC17_USBHOST=n
CONFIG_LPC17_USBOTG=n
@ -113,8 +114,8 @@ CONFIG_LPC17_UART3=n
CONFIG_LPC17_CAN1=n
CONFIG_LPC17_CAN2=n
CONFIG_LPC17_SPI=n
CONFIG_LPC17_SSP0=y
CONFIG_LPC17_SSP1=n
CONFIG_LPC17_SSP0=n
CONFIG_LPC17_SSP1=y
CONFIG_LPC17_I2C0=n
CONFIG_LPC17_I2C1=n
CONFIG_LPC17_I2S=n
@ -457,6 +458,7 @@ CONFIG_PREALLOC_TIMERS=4
# CONFIG_FS_FAT - Enable FAT filesystem support
# CONFIG_FAT_SECTORSIZE - Max supported sector size
# CONFIG_FS_ROMFS - Enable ROMFS filesystem support
#
CONFIG_FS_FAT=n
CONFIG_FS_ROMFS=n
@ -701,6 +703,7 @@ CONFIG_EXAMPLE_UIP_DHCPC=n
# CONFIG_EXAMPLE_NETTEST_NETMASK - Network mask
# CONFIG_EXAMPLE_NETTEST_CLIENTIP - IP address of the
# client side of the test (may be target or host)
#
CONFIG_EXAMPLE_NETTEST_SERVER=n
CONFIG_EXAMPLE_NETTEST_PERFORMANCE=n
CONFIG_EXAMPLE_NETTEST_NOMAC=y
@ -709,8 +712,6 @@ CONFIG_EXAMPLE_NETTEST_DRIPADDR=(10L<<24|0L<<16|0L<<8|1L)
CONFIG_EXAMPLE_NETTEST_NETMASK=(255L<<24|255L<<16|255L<<8|0L)
CONFIG_EXAMPLE_NETTEST_CLIENTIP=(10L<<24|0L<<16|0L<<8|1L)
#
#
# Settings for examples/ostest
#
@ -842,6 +843,7 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
# Show controller events
# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
# Show interrupt-related events.
#
CONFIG_EXAMPLES_USBSTRG_NLUNS=1
CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/mmcsd0"