diff --git a/configs/pnev5180b/README.txt b/configs/pnev5180b/README.txt index cc2cf1f333..df85dd4d8e 100644 --- a/configs/pnev5180b/README.txt +++ b/configs/pnev5180b/README.txt @@ -85,7 +85,7 @@ selected as follow: Where 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 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. diff --git a/configs/pnev5180b/src/lpc17_bringup.c b/configs/pnev5180b/src/lpc17_bringup.c index a1a12d5638..689c21bb77 100644 --- a/configs/pnev5180b/src/lpc17_bringup.c +++ b/configs/pnev5180b/src/lpc17_bringup.c @@ -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; } diff --git a/configs/pnev5180b/usbnsh/defconfig b/configs/pnev5180b/usbnsh/defconfig new file mode 100644 index 0000000000..b3576fb717 --- /dev/null +++ b/configs/pnev5180b/usbnsh/defconfig @@ -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"