configs/pnev5180b: Add usbnsh configuration. This is basically the same as the 'nsh' defconfig, but uses CDC/ACM as the NuttShell console device.

This commit is contained in:
Michael Jung 2019-06-22 07:32:52 -06:00 committed by Gregory Nutt
parent 3505cce201
commit 393f5b96dd
3 changed files with 53 additions and 16 deletions

View File

@ -85,7 +85,7 @@ selected as follow:
Where <subdir> is one of the following:
nsh:
Configures the NuttShell (nsh) located at apps/examples/nsh. The
Configures the NuttShell (nsh) located at apps/system/nsh. The
Configuration enables the serial NSH interface.
NOTES:
@ -98,3 +98,7 @@ Where <subdir> is one of the following:
b. Execute 'make menuconfig' in nuttx/ in order to start the
reconfiguration process.
nsh-usbconsole:
Configures the NuttShell (nsh) located at apps/system/nsh. The
Configuration enables the CDC/ACM based NSH interface on /dev/ttyACM0.

View File

@ -114,14 +114,29 @@ int pnev5180b_bringup(void)
{
int ret = OK;
#ifdef CONFIG_CDCACM
#ifndef CONFIG_BOARDCTL_USBDEVCTRL
# ifdef CONFIG_CDCACM
ret = cdcacm_initialize(0, NULL);
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: cdcacm_initialize() failed: %d\n", ret);
goto done;
}
#endif
# endif
# if defined(CONFIG_NET_CDCECM) && !defined(CONFIG_CDCECM_COMPOSITE)
ret = cdcecm_initialize(0, NULL);
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: cdcecm_initialize() failed: %d\n", ret);
goto done;
}
# endif
# if defined(CONFIG_CDCECM_COMPOSITE)
board_composite_connect(0, 0);
# endif
#endif /* CONFIG_BOARDCTL_USBDEVCTRL */
#ifdef CONFIG_USBMONITOR
ret = usbmonitor_start();
@ -132,19 +147,6 @@ int pnev5180b_bringup(void)
}
#endif
#if defined(CONFIG_NET_CDCECM) && !defined(CONFIG_CDCECM_COMPOSITE)
ret = cdcecm_initialize(0, NULL);
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: cdcecm_initialize() failed: %d\n", ret);
goto done;
}
#endif
#if defined(CONFIG_CDCECM_COMPOSITE)
board_composite_connect(0, 0);
#endif
#ifdef CONFIG_ELF
ret = elf_initialize();
if (ret < 0)
@ -167,6 +169,10 @@ int pnev5180b_bringup(void)
exec_setsymtab(lpc17_exports, lpc17_nexports);
#endif
/* To avoid 'unused label' compiler warnings in specific configuration. */
goto done;
done:
return ret;
}

View File

@ -0,0 +1,27 @@
#
# 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_CDCACM=y
CONFIG_CDCACM_EPBULKIN=5
CONFIG_CDCACM_EPBULKOUT=2
CONFIG_LPC17_UART0=y
CONFIG_LPC17_USBDEV=y
CONFIG_LPC17_USBDEV_NOVBUS=y
CONFIG_MM_REGIONS=2
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_USBCONSOLE=y
CONFIG_RAM_SIZE=32768
CONFIG_RAM_START=0x10000000
CONFIG_SYSTEM_NSH=y
CONFIG_UART0_SERIAL_CONSOLE=y
CONFIG_USER_ENTRYPOINT="nsh_main"