configs/pnev5180b/nsh-cdcecm: Adds NSH configuration with UART0 and eth0 via CDC/ECM on USB device.

This commit is contained in:
Michael Jung 2019-06-28 06:59:09 -06:00 committed by Gregory Nutt
parent 9a60350901
commit 157bf153fc
3 changed files with 63 additions and 1 deletions

View File

@ -99,6 +99,10 @@ Where <subdir> is one of the following:
b. Execute 'make menuconfig' in nuttx/ in order to start the
reconfiguration process.
nsh-usbconsole:
usbnsh:
Configures the NuttShell (nsh) located at apps/system/nsh. The
Configuration enables the CDC/ACM based NSH interface on /dev/ttyACM0.
nsh-cdcecm:
Configures the NuttShell (nsh) to provide a terminal on UART0. The
Configuration also provides network interface eth0 via CDC/ECM.

View File

@ -0,0 +1,37 @@
#
# This file is autogenerated: PLEASE DO NOT EDIT IT.
#
# You can use "make menuconfig" to make any modifications to the installed .config file.
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
# modifications.
#
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD="pnev5180b"
CONFIG_ARCH_BOARD_PNEV5180B=y
CONFIG_ARCH_CHIP_LPC1769=y
CONFIG_ARCH_CHIP_LPC17XX=y
CONFIG_BOARD_LOOPSPERMSEC=11992
CONFIG_BUILTIN=y
CONFIG_CDCECM_EPBULKIN=5
CONFIG_CDCECM_EPBULKOUT=2
CONFIG_FS_BINFS=y
CONFIG_FS_PROCFS=y
CONFIG_LPC17_UART0=y
CONFIG_LPC17_USBDEV=y
CONFIG_LPC17_USBDEV_NOVBUS=y
CONFIG_MM_REGIONS=2
CONFIG_NETINIT_NOMAC=y
CONFIG_NET_CDCECM=y
CONFIG_NET_ICMP=y
CONFIG_NET_ICMP_SOCKET=y
CONFIG_NET_SOCKOPTS=y
CONFIG_NET_TCP=y
CONFIG_NET_UDP=y
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_RAM_SIZE=32768
CONFIG_RAM_START=0x10000000
CONFIG_SYSTEM_NSH=y
CONFIG_SYSTEM_PING=y
CONFIG_UART0_SERIAL_CONSOLE=y
CONFIG_USER_ENTRYPOINT="nsh_main"

View File

@ -42,6 +42,7 @@
#include <stdio.h>
#include <syslog.h>
#include <errno.h>
#include <sys/mount.h>
#include <nuttx/board.h>
#include <nuttx/spi/spi.h>
@ -114,6 +115,26 @@ int pnev5180b_bringup(void)
{
int ret = OK;
#ifdef CONFIG_FS_PROCFS
ret = mount(NULL, "/proc", "procfs", 0, NULL);
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: Failed to mount the PROC filesystem: %d (%d)\n",
ret, errno);
goto done;
}
#endif
#ifdef CONFIG_FS_BINFS
ret = mount(NULL, "/bin", "binfs", 0, NULL);
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: Failed to mount the BIN filesystem: %d (%d)\n",
ret, errno);
goto done;
}
#endif
#ifndef CONFIG_BOARDCTL_USBDEVCTRL
# ifdef CONFIG_CDCACM
ret = cdcacm_initialize(0, NULL);