From 3c44ece6be1f1f021dedb02dbeb638c45f42ce0d Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 31 Mar 2015 10:21:31 -0600 Subject: Rename arch_nshinitialize() to board_app_initialize() --- nuttx/Documentation/NuttShell.html | 6 +++--- nuttx/configs/Kconfig | 4 ++++ nuttx/configs/arduino-due/src/sam_nsh.c | 8 +++++--- nuttx/configs/cc3200-launchpad/src/cc3200_boot.c | 5 +++-- nuttx/configs/cloudctrl/src/stm32_nsh.c | 6 ++++-- nuttx/configs/cloudctrl/src/stm32_usbmsc.c | 4 ++-- nuttx/configs/demo9s12ne64/src/m9s12_nsh.c | 6 ++++-- nuttx/configs/dk-tm4c129x/src/tm4c_nsh.c | 6 ++++-- nuttx/configs/ea3131/src/lpc31_nsh.c | 6 ++++-- nuttx/configs/ea3152/src/lpc31_nsh.c | 6 ++++-- nuttx/configs/eagle100/src/lm_nsh.c | 5 +++-- nuttx/configs/ekk-lm3s9b96/src/lm_nsh.c | 6 ++++-- nuttx/configs/fire-stm32v2/src/stm32_composite.c | 4 ++-- nuttx/configs/fire-stm32v2/src/stm32_nsh.c | 6 ++++-- nuttx/configs/fire-stm32v2/src/stm32_usbmsc.c | 4 ++-- nuttx/configs/freedom-kl25z/src/kl_boardinitialize.c | 2 +- nuttx/configs/freedom-kl25z/src/kl_nsh.c | 6 ++++-- nuttx/configs/freedom-kl26z/src/kl_boardinitialize.c | 2 +- nuttx/configs/freedom-kl26z/src/kl_nsh.c | 6 ++++-- nuttx/configs/hymini-stm32v/src/stm32_nsh.c | 6 ++++-- nuttx/configs/hymini-stm32v/src/stm32_usbmsc.c | 4 ++-- nuttx/configs/kwikstik-k40/src/k40_nsh.c | 6 ++++-- nuttx/configs/kwikstik-k40/src/k40_usbmsc.c | 4 ++-- nuttx/configs/lincoln60/src/lpc17_nsh.c | 5 +++-- nuttx/configs/lm3s6432-s2e/src/lm_nsh.c | 5 +++-- nuttx/configs/lm3s6965-ek/src/lm_nsh.c | 5 +++-- nuttx/configs/lm3s8962-ek/src/lm_nsh.c | 5 +++-- nuttx/configs/lm4f120-launchpad/src/lm4f_nsh.c | 5 +++-- nuttx/configs/lpc4330-xplorer/src/lpc43_nsh.c | 6 ++++-- nuttx/configs/lpc4357-evb/src/lpc43_nsh.c | 6 ++++-- nuttx/configs/lpcxpresso-lpc1768/src/lpc17_nsh.c | 5 +++-- nuttx/configs/mbed/src/lpc17_nsh.c | 5 +++-- nuttx/configs/mcu123-lpc214x/src/lpc2148_composite.c | 4 ++-- nuttx/configs/mcu123-lpc214x/src/lpc2148_nsh.c | 5 +++-- nuttx/configs/mikroe-stm32f4/src/stm32_nsh.c | 5 +++-- nuttx/configs/mirtoo/src/pic32_nsh.c | 6 ++++-- nuttx/configs/ne64badge/src/m9s12_nsh.c | 6 ++++-- nuttx/configs/nucleo-f4x1re/src/stm32_boot.c | 2 +- nuttx/configs/nucleo-f4x1re/src/stm32_nsh.c | 5 +++-- nuttx/configs/nucleus2g/src/lpc17_nsh.c | 5 +++-- nuttx/configs/olimex-lpc-h3131/src/lpc31_nsh.c | 6 ++++-- nuttx/configs/olimex-lpc1766stk/src/lpc17_nsh.c | 5 +++-- nuttx/configs/olimex-lpc2378/src/lpc2378_nsh.c | 5 +++-- .../configs/olimex-stm32-h405/src/olimex-stm32-h405.h | 19 ------------------- nuttx/configs/olimex-stm32-h405/src/stm32_boot.c | 2 +- nuttx/configs/olimex-stm32-h405/src/stm32_nsh.c | 6 ++++-- .../configs/olimex-stm32-p207/src/olimex-stm32-p207.h | 19 ------------------- nuttx/configs/olimex-stm32-p207/src/stm32_boot.c | 2 +- nuttx/configs/olimex-stm32-p207/src/stm32_nsh.c | 6 ++++-- nuttx/configs/olimex-strp711/src/str71_nsh.c | 5 +++-- nuttx/configs/olimexino-stm32/src/olimexino-stm32.h | 19 ------------------- nuttx/configs/olimexino-stm32/src/stm32_boot.c | 2 +- nuttx/configs/olimexino-stm32/src/stm32_composite.c | 2 +- nuttx/configs/olimexino-stm32/src/stm32_nsh.c | 5 +++-- nuttx/configs/olimexino-stm32/src/stm32_usbmsc.c | 2 +- nuttx/configs/open1788/src/lpc17_boardinitialize.c | 2 +- nuttx/configs/open1788/src/lpc17_nsh.c | 5 +++-- nuttx/configs/open1788/src/open1788.h | 19 ------------------- nuttx/configs/pcblogic-pic32mx/src/pic32mx_nsh.c | 5 +++-- nuttx/configs/pcduino-a10/src/a1x_boot.c | 2 +- nuttx/configs/pcduino-a10/src/pcduino_a10.h | 19 ------------------- nuttx/configs/pic32mx-starterkit/src/pic32mx_nsh.c | 5 +++-- nuttx/configs/pic32mx-starterkit/src/pic32mx_usbmsc.c | 4 ++-- .../configs/pic32mx-starterkit/src/pic32mx_usbterm.c | 2 +- nuttx/configs/pic32mx7mmb/src/pic32_nsh.c | 5 +++-- nuttx/configs/pic32mx7mmb/src/pic32_usbmsc.c | 4 ++-- nuttx/configs/pic32mx7mmb/src/pic32_usbterm.c | 2 +- nuttx/configs/pic32mz-starterkit/src/pic32mz_nsh.c | 6 ++++-- nuttx/configs/sam3u-ek/src/sam_nsh.c | 5 +++-- nuttx/configs/sam4e-ek/src/sam_boot.c | 2 +- nuttx/configs/sam4e-ek/src/sam_nsh.c | 6 ++++-- nuttx/configs/sam4l-xplained/src/sam_nsh.c | 6 ++++-- nuttx/configs/sam4s-xplained-pro/src/sam_nsh.c | 5 +++-- nuttx/configs/sama5d3-xplained/src/sam_boot.c | 2 +- nuttx/configs/sama5d3-xplained/src/sam_nsh.c | 6 ++++-- nuttx/configs/sama5d3-xplained/src/sama5d3-xplained.h | 18 ------------------ nuttx/configs/sama5d3x-ek/src/sam_boot.c | 2 +- nuttx/configs/sama5d3x-ek/src/sam_nsh.c | 6 ++++-- nuttx/configs/sama5d3x-ek/src/sama5d3x-ek.h | 18 ------------------ nuttx/configs/sama5d4-ek/src/sam_nsh.c | 6 ++++-- nuttx/configs/sama5d4-ek/src/sama5d4-ek.h | 18 ------------------ nuttx/configs/samd20-xplained/src/sam_nsh.c | 6 ++++-- nuttx/configs/samv71-xult/src/sam_nsh.c | 6 ++++-- nuttx/configs/shenzhou/src/stm32_composite.c | 4 ++-- nuttx/configs/shenzhou/src/stm32_nsh.c | 6 ++++-- nuttx/configs/shenzhou/src/stm32_usbmsc.c | 4 ++-- nuttx/configs/spark/include/board.h | 19 ------------------- nuttx/configs/spark/src/stm32_boot.c | 2 +- nuttx/configs/spark/src/stm32_composite.c | 2 +- nuttx/configs/spark/src/stm32_nsh.c | 7 ++++--- nuttx/configs/stm3210e-eval/src/stm32_composite.c | 4 ++-- nuttx/configs/stm3210e-eval/src/stm32_nsh.c | 6 ++++-- nuttx/configs/stm3210e-eval/src/stm32_usbmsc.c | 4 ++-- nuttx/configs/stm3220g-eval/src/stm32_nsh.c | 6 ++++-- nuttx/configs/stm3240g-eval/src/stm3240g-eval.h | 19 ------------------- nuttx/configs/stm3240g-eval/src/stm32_boot.c | 4 ++-- nuttx/configs/stm3240g-eval/src/stm32_nsh.c | 6 ++++-- nuttx/configs/stm32_tiny/src/stm32_nsh.c | 6 ++++-- nuttx/configs/stm32f3discovery/src/stm32_nsh.c | 6 ++++-- nuttx/configs/stm32f429i-disco/src/stm32_boot.c | 2 +- nuttx/configs/stm32f429i-disco/src/stm32_nsh.c | 5 +++-- nuttx/configs/stm32f429i-disco/src/stm32f429i-disco.h | 19 ------------------- nuttx/configs/stm32f4discovery/src/stm32_nsh.c | 6 ++++-- nuttx/configs/stm32ldiscovery/src/stm32_nsh.c | 5 +++-- nuttx/configs/sure-pic32mx/src/pic32mx_nsh.c | 5 +++-- nuttx/configs/sure-pic32mx/src/pic32mx_usbterm.c | 2 +- nuttx/configs/tm4c123g-launchpad/src/tm4c_nsh.c | 7 ++++--- nuttx/configs/tm4c1294-launchpad/src/tm4c_nsh.c | 6 ++++-- nuttx/configs/twr-k60n512/src/k60_nsh.c | 6 ++++-- nuttx/configs/twr-k60n512/src/k60_usbmsc.c | 4 ++-- nuttx/configs/ubw32/src/pic32_nsh.c | 6 ++++-- nuttx/configs/ubw32/src/pic32_usbterm.c | 2 +- nuttx/configs/viewtool-stm32f107/src/stm32_nsh.c | 6 ++++-- nuttx/configs/viewtool-stm32f107/src/stm32_usbmsc.c | 4 ++-- nuttx/configs/zkit-arm-1769/src/lpc17_nsh.c | 10 ++++++---- nuttx/include/nuttx/board.h | 14 ++++++++++++++ 116 files changed, 316 insertions(+), 398 deletions(-) (limited to 'nuttx') diff --git a/nuttx/Documentation/NuttShell.html b/nuttx/Documentation/NuttShell.html index 2f1fd333a..ff55c0655 100644 --- a/nuttx/Documentation/NuttShell.html +++ b/nuttx/Documentation/NuttShell.html @@ -3100,7 +3100,7 @@ set FOOBAR ABC_${FOO}_${BAR} CONFIG_NSH_ARCHINIT Set CONFIG_NSH_ARCHINIT if your board provides architecture - specific initialization via the board-specific function nsh_archinitialize(). + specific initialization via the board-specific function board_app_initialize(). This function will be called early in NSH initialization to allow board logic to do such things as configure MMC/SD slots. @@ -3498,7 +3498,7 @@ mount -t vfat /dev/ram1 /tmp

  • - nsh_archinitialize(): + board_app_initialize(): Next any architecture-specific NSH initialization will be performed (if any). For the STM3240G-EVAL, this architecture specific initialization can be found at configs/stm3240g-eval/src/up_nsh.c. This it does things like: (1) Initialize SPI devices, (2) Initialize SDIO, and (3) mount any SD cards that may be inserted. @@ -4144,6 +4144,7 @@ mount -t vfat /dev/ram1 /tmp

  • Background commands
  • Background command priority
  • binfs
  • +
  • board_app_initialize()
  • break
  • Built-In applications
  • Built-In application start-up main()
  • @@ -4268,7 +4269,6 @@ mount -t vfat /dev/ram1 /tmp
  • nice
  • NSH library (nshlib)
  • NSH library (nshlib)
  • -
  • nsh_archinitialize()
  • nsh_consolemain()
  • nsh_initialize()
  • nsh_main()
  • diff --git a/nuttx/configs/Kconfig b/nuttx/configs/Kconfig index 746a766af..403002594 100644 --- a/nuttx/configs/Kconfig +++ b/nuttx/configs/Kconfig @@ -1581,3 +1581,7 @@ endif if ARCH_BOARD_SIM source "configs/sim/Kconfig" endif + +config LIB_BOARDCTL + bool "Enabled boardctl() interface" + default n diff --git a/nuttx/configs/arduino-due/src/sam_nsh.c b/nuttx/configs/arduino-due/src/sam_nsh.c index e6ef08aa3..61acc2fab 100644 --- a/nuttx/configs/arduino-due/src/sam_nsh.c +++ b/nuttx/configs/arduino-due/src/sam_nsh.c @@ -42,6 +42,8 @@ #include #include +#include + #include "arduino-due.h" /**************************************************************************** @@ -71,14 +73,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #if defined(CONFIG_ARDUINO_ITHEAD_TFT) && defined(CONFIG_SPI_BITBANG) && \ defined(CONFIG_MMCSD_SPI) @@ -89,7 +91,7 @@ int nsh_archinitialize(void) if (ret < 0) { syslog(LOG_ERR, - "nsh_archinitialize: Failed to initialize MMC/SD slot: %d\n", + "board_app_initialize: Failed to initialize MMC/SD slot: %d\n", ret); return ret; } diff --git a/nuttx/configs/cc3200-launchpad/src/cc3200_boot.c b/nuttx/configs/cc3200-launchpad/src/cc3200_boot.c index 7d1e8fa5b..af11afdc7 100644 --- a/nuttx/configs/cc3200-launchpad/src/cc3200_boot.c +++ b/nuttx/configs/cc3200-launchpad/src/cc3200_boot.c @@ -45,6 +45,7 @@ #include #include +#include #include #include #include @@ -67,7 +68,7 @@ * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization @@ -81,7 +82,7 @@ * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { return OK; } diff --git a/nuttx/configs/cloudctrl/src/stm32_nsh.c b/nuttx/configs/cloudctrl/src/stm32_nsh.c index 61964d441..7d8c7e751 100644 --- a/nuttx/configs/cloudctrl/src/stm32_nsh.c +++ b/nuttx/configs/cloudctrl/src/stm32_nsh.c @@ -45,6 +45,8 @@ #include #include +#include + #include "stm32.h" #include "cloudctrl-internal.h" @@ -101,14 +103,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #if defined(HAVE_USBHOST) || defined(HAVE_W25) int ret; diff --git a/nuttx/configs/cloudctrl/src/stm32_usbmsc.c b/nuttx/configs/cloudctrl/src/stm32_usbmsc.c index 15641387b..c9ed8b897 100644 --- a/nuttx/configs/cloudctrl/src/stm32_usbmsc.c +++ b/nuttx/configs/cloudctrl/src/stm32_usbmsc.c @@ -72,8 +72,8 @@ int usbmsc_archinitialize(void) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initized in nsh_archinitialize() (see up_nsh.c). In - * this case, there is nothing further to be done here. + * already have been initized in board_app_initialize() (see stm32_nsh.c). + * In this case, there is nothing further to be done here. */ #ifndef CONFIG_NSH_BUILTIN_APPS diff --git a/nuttx/configs/demo9s12ne64/src/m9s12_nsh.c b/nuttx/configs/demo9s12ne64/src/m9s12_nsh.c index b33a933a6..bf6b003c3 100644 --- a/nuttx/configs/demo9s12ne64/src/m9s12_nsh.c +++ b/nuttx/configs/demo9s12ne64/src/m9s12_nsh.c @@ -43,6 +43,8 @@ #include #include +#include + #include "demo9s12ne64.h" /**************************************************************************** @@ -54,14 +56,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { /* Configure SPI-based devices */ diff --git a/nuttx/configs/dk-tm4c129x/src/tm4c_nsh.c b/nuttx/configs/dk-tm4c129x/src/tm4c_nsh.c index c78cf57e4..25cfaa21a 100644 --- a/nuttx/configs/dk-tm4c129x/src/tm4c_nsh.c +++ b/nuttx/configs/dk-tm4c129x/src/tm4c_nsh.c @@ -39,6 +39,8 @@ #include +#include + #include "dk-tm4c129x.h" /**************************************************************************** @@ -50,14 +52,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { /* If CONFIG_BOARD_INITIALIZE is selected then board initialization was * already performed in board_initialize. diff --git a/nuttx/configs/ea3131/src/lpc31_nsh.c b/nuttx/configs/ea3131/src/lpc31_nsh.c index 534bd106a..5322d3f1d 100644 --- a/nuttx/configs/ea3131/src/lpc31_nsh.c +++ b/nuttx/configs/ea3131/src/lpc31_nsh.c @@ -44,6 +44,8 @@ #include #include +#include + #ifdef CONFIG_LPC31_MCI # include # include @@ -100,14 +102,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #ifdef NSH_HAVEMMCSD FAR struct sdio_dev_s *sdio; diff --git a/nuttx/configs/ea3152/src/lpc31_nsh.c b/nuttx/configs/ea3152/src/lpc31_nsh.c index 4d3ccd5d8..a52b44927 100644 --- a/nuttx/configs/ea3152/src/lpc31_nsh.c +++ b/nuttx/configs/ea3152/src/lpc31_nsh.c @@ -44,6 +44,8 @@ #include #include +#include + #ifdef CONFIG_LPC31_MCI # include # include @@ -100,14 +102,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #ifdef NSH_HAVEMMCSD FAR struct sdio_dev_s *sdio; diff --git a/nuttx/configs/eagle100/src/lm_nsh.c b/nuttx/configs/eagle100/src/lm_nsh.c index f5a011582..7b10d950c 100644 --- a/nuttx/configs/eagle100/src/lm_nsh.c +++ b/nuttx/configs/eagle100/src/lm_nsh.c @@ -43,6 +43,7 @@ #include #include +#include #include #include @@ -95,14 +96,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { FAR struct spi_dev_s *spi; int ret; diff --git a/nuttx/configs/ekk-lm3s9b96/src/lm_nsh.c b/nuttx/configs/ekk-lm3s9b96/src/lm_nsh.c index 9f04e3efb..59745b520 100644 --- a/nuttx/configs/ekk-lm3s9b96/src/lm_nsh.c +++ b/nuttx/configs/ekk-lm3s9b96/src/lm_nsh.c @@ -44,6 +44,8 @@ #include #include +#include + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -53,14 +55,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { return OK; } diff --git a/nuttx/configs/fire-stm32v2/src/stm32_composite.c b/nuttx/configs/fire-stm32v2/src/stm32_composite.c index 6d4455b91..28912b926 100644 --- a/nuttx/configs/fire-stm32v2/src/stm32_composite.c +++ b/nuttx/configs/fire-stm32v2/src/stm32_composite.c @@ -70,8 +70,8 @@ int composite_archinitialize(void) { /* If system/composite is built as an NSH command, then SD slot should - * already have been initized in nsh_archinitialize() (see up_nsh.c). In - * this case, there is nothing further to be done here. + * already have been initialized in board_app_initialize() (see stm32_nsh.c). + * In this case, there is nothing further to be done here. * * NOTE: CONFIG_NSH_BUILTIN_APPS is not a fool-proof indication that NSH * was built. diff --git a/nuttx/configs/fire-stm32v2/src/stm32_nsh.c b/nuttx/configs/fire-stm32v2/src/stm32_nsh.c index a7f79b9d6..b4dd0b8cf 100644 --- a/nuttx/configs/fire-stm32v2/src/stm32_nsh.c +++ b/nuttx/configs/fire-stm32v2/src/stm32_nsh.c @@ -44,6 +44,8 @@ #include #include +#include + #include "stm32.h" #include "fire-internal.h" @@ -127,14 +129,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #if defined(HAVE_MMCSD) || defined(HAVE_W25) int ret; diff --git a/nuttx/configs/fire-stm32v2/src/stm32_usbmsc.c b/nuttx/configs/fire-stm32v2/src/stm32_usbmsc.c index efb84bc0c..1d34a6008 100644 --- a/nuttx/configs/fire-stm32v2/src/stm32_usbmsc.c +++ b/nuttx/configs/fire-stm32v2/src/stm32_usbmsc.c @@ -71,8 +71,8 @@ int usbmsc_archinitialize(void) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initized in nsh_archinitialize() (see up_nsh.c). In - * this case, there is nothing further to be done here. + * already have been initialized in board_app_initialize() (see stm32_nsh.c). + * In this case, there is nothing further to be done here. */ #ifndef CONFIG_NSH_BUILTIN_APPS diff --git a/nuttx/configs/freedom-kl25z/src/kl_boardinitialize.c b/nuttx/configs/freedom-kl25z/src/kl_boardinitialize.c index abe1f0114..106ed8e9c 100644 --- a/nuttx/configs/freedom-kl25z/src/kl_boardinitialize.c +++ b/nuttx/configs/freedom-kl25z/src/kl_boardinitialize.c @@ -125,7 +125,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT) - (void)nsh_archinitialize(); + (void)board_app_initialize(); #endif /* CC3000 wireless initialization */ diff --git a/nuttx/configs/freedom-kl25z/src/kl_nsh.c b/nuttx/configs/freedom-kl25z/src/kl_nsh.c index a191eba53..4dd539e27 100644 --- a/nuttx/configs/freedom-kl25z/src/kl_nsh.c +++ b/nuttx/configs/freedom-kl25z/src/kl_nsh.c @@ -43,6 +43,8 @@ #include #include +#include + #ifdef CONFIG_NSH_LIBRARY /**************************************************************************** @@ -54,7 +56,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization @@ -68,7 +70,7 @@ * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #if defined(CONFIG_SENSORS_ADXL345) int ret; diff --git a/nuttx/configs/freedom-kl26z/src/kl_boardinitialize.c b/nuttx/configs/freedom-kl26z/src/kl_boardinitialize.c index a57c04b55..fe64c7d80 100644 --- a/nuttx/configs/freedom-kl26z/src/kl_boardinitialize.c +++ b/nuttx/configs/freedom-kl26z/src/kl_boardinitialize.c @@ -124,7 +124,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT) - (void)nsh_archinitialize(); + (void)board_app_initialize(); #endif } #endif diff --git a/nuttx/configs/freedom-kl26z/src/kl_nsh.c b/nuttx/configs/freedom-kl26z/src/kl_nsh.c index 3db0871e9..f7f1a595d 100644 --- a/nuttx/configs/freedom-kl26z/src/kl_nsh.c +++ b/nuttx/configs/freedom-kl26z/src/kl_nsh.c @@ -43,6 +43,8 @@ #include #include +#include + #ifdef CONFIG_NSH_LIBRARY /**************************************************************************** @@ -54,7 +56,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization @@ -68,7 +70,7 @@ * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { return OK; } diff --git a/nuttx/configs/hymini-stm32v/src/stm32_nsh.c b/nuttx/configs/hymini-stm32v/src/stm32_nsh.c index 8c903dbfc..32ac875ca 100644 --- a/nuttx/configs/hymini-stm32v/src/stm32_nsh.c +++ b/nuttx/configs/hymini-stm32v/src/stm32_nsh.c @@ -44,6 +44,8 @@ #include #include +#include + #ifdef CONFIG_STM32_SPI1 # include # include @@ -144,14 +146,14 @@ static int nsh_cdinterrupt(int irq, FAR void *context) ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #ifdef NSH_HAVEMMCSD int ret; diff --git a/nuttx/configs/hymini-stm32v/src/stm32_usbmsc.c b/nuttx/configs/hymini-stm32v/src/stm32_usbmsc.c index e0fa30ccb..94302b0f4 100644 --- a/nuttx/configs/hymini-stm32v/src/stm32_usbmsc.c +++ b/nuttx/configs/hymini-stm32v/src/stm32_usbmsc.c @@ -89,8 +89,8 @@ int usbmsc_archinitialize(void) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initialized in nsh_archinitialize() (see up_nsh.c). In - * this case, there is nothing further to be done here. + * already have been initialized in board_app_initialize() (see stm32_nsh.c). + * In this case, there is nothing further to be done here. */ #ifndef CONFIG_NSH_BUILTIN_APPS diff --git a/nuttx/configs/kwikstik-k40/src/k40_nsh.c b/nuttx/configs/kwikstik-k40/src/k40_nsh.c index ec7de573d..773647c9b 100644 --- a/nuttx/configs/kwikstik-k40/src/k40_nsh.c +++ b/nuttx/configs/kwikstik-k40/src/k40_nsh.c @@ -44,6 +44,8 @@ #include #include +#include + #ifdef CONFIG_KINETIS_SDHC # include # include @@ -178,14 +180,14 @@ static int kinetis_cdinterrupt(int irq, FAR void *context) ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #ifdef NSH_HAVEMMCSD int ret; diff --git a/nuttx/configs/kwikstik-k40/src/k40_usbmsc.c b/nuttx/configs/kwikstik-k40/src/k40_usbmsc.c index 1eeaad407..c1fe39ec1 100644 --- a/nuttx/configs/kwikstik-k40/src/k40_usbmsc.c +++ b/nuttx/configs/kwikstik-k40/src/k40_usbmsc.c @@ -85,8 +85,8 @@ int usbmsc_archinitialize(void) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initized in nsh_archinitialize() (see up_nsh.c). In - * this case, there is nothing further to be done here. + * already have been initialized in board_app_initialize() (see k40_nsh.c). + * In this case, there is nothing further to be done here. */ #ifndef CONFIG_NSH_BUILTIN_APPS diff --git a/nuttx/configs/lincoln60/src/lpc17_nsh.c b/nuttx/configs/lincoln60/src/lpc17_nsh.c index 041a3345a..9ad00a0b6 100644 --- a/nuttx/configs/lincoln60/src/lpc17_nsh.c +++ b/nuttx/configs/lincoln60/src/lpc17_nsh.c @@ -43,6 +43,7 @@ #include #include +#include #include #include @@ -55,14 +56,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { return OK; } diff --git a/nuttx/configs/lm3s6432-s2e/src/lm_nsh.c b/nuttx/configs/lm3s6432-s2e/src/lm_nsh.c index 193875a10..fd4a62e59 100644 --- a/nuttx/configs/lm3s6432-s2e/src/lm_nsh.c +++ b/nuttx/configs/lm3s6432-s2e/src/lm_nsh.c @@ -43,6 +43,7 @@ #include #include +#include #include #include @@ -55,14 +56,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { return OK; } diff --git a/nuttx/configs/lm3s6965-ek/src/lm_nsh.c b/nuttx/configs/lm3s6965-ek/src/lm_nsh.c index 47a001ae5..59855defc 100644 --- a/nuttx/configs/lm3s6965-ek/src/lm_nsh.c +++ b/nuttx/configs/lm3s6965-ek/src/lm_nsh.c @@ -43,6 +43,7 @@ #include #include +#include #include #include @@ -95,14 +96,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { FAR struct spi_dev_s *spi; int ret; diff --git a/nuttx/configs/lm3s8962-ek/src/lm_nsh.c b/nuttx/configs/lm3s8962-ek/src/lm_nsh.c index 6c4938f70..247ef834b 100644 --- a/nuttx/configs/lm3s8962-ek/src/lm_nsh.c +++ b/nuttx/configs/lm3s8962-ek/src/lm_nsh.c @@ -43,6 +43,7 @@ #include #include +#include #include #include @@ -95,14 +96,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { FAR struct spi_dev_s *spi; int ret; diff --git a/nuttx/configs/lm4f120-launchpad/src/lm4f_nsh.c b/nuttx/configs/lm4f120-launchpad/src/lm4f_nsh.c index f3eed743b..b5b534d79 100644 --- a/nuttx/configs/lm4f120-launchpad/src/lm4f_nsh.c +++ b/nuttx/configs/lm4f120-launchpad/src/lm4f_nsh.c @@ -44,6 +44,7 @@ #include #include +#include #include #include @@ -73,14 +74,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { return OK; } diff --git a/nuttx/configs/lpc4330-xplorer/src/lpc43_nsh.c b/nuttx/configs/lpc4330-xplorer/src/lpc43_nsh.c index dbad88b31..bccc3e5bf 100644 --- a/nuttx/configs/lpc4330-xplorer/src/lpc43_nsh.c +++ b/nuttx/configs/lpc4330-xplorer/src/lpc43_nsh.c @@ -43,6 +43,8 @@ #include #include +#include + #include "chip.h" #ifdef CONFIG_LPC43_SPIFI @@ -132,14 +134,14 @@ static int nsh_spifi_initialize(void) ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { /* Initialize the SPIFI block device */ diff --git a/nuttx/configs/lpc4357-evb/src/lpc43_nsh.c b/nuttx/configs/lpc4357-evb/src/lpc43_nsh.c index 0064ec9e5..259bb6ab4 100644 --- a/nuttx/configs/lpc4357-evb/src/lpc43_nsh.c +++ b/nuttx/configs/lpc4357-evb/src/lpc43_nsh.c @@ -43,6 +43,8 @@ #include #include +#include + #include "chip.h" #ifdef CONFIG_LPC43_SPIFI @@ -132,14 +134,14 @@ static int nsh_spifi_initialize(void) ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { /* Initialize the SPIFI block device */ diff --git a/nuttx/configs/lpcxpresso-lpc1768/src/lpc17_nsh.c b/nuttx/configs/lpcxpresso-lpc1768/src/lpc17_nsh.c index 3ebc486ad..382b7a911 100644 --- a/nuttx/configs/lpcxpresso-lpc1768/src/lpc17_nsh.c +++ b/nuttx/configs/lpcxpresso-lpc1768/src/lpc17_nsh.c @@ -43,6 +43,7 @@ #include #include +#include #include #include @@ -111,14 +112,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #ifdef NSH_HAVEMMCSD FAR struct spi_dev_s *ssp; diff --git a/nuttx/configs/mbed/src/lpc17_nsh.c b/nuttx/configs/mbed/src/lpc17_nsh.c index b8c3e9078..6bbb16d5e 100644 --- a/nuttx/configs/mbed/src/lpc17_nsh.c +++ b/nuttx/configs/mbed/src/lpc17_nsh.c @@ -43,6 +43,7 @@ #include #include +#include #include #include @@ -72,14 +73,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { return OK; } diff --git a/nuttx/configs/mcu123-lpc214x/src/lpc2148_composite.c b/nuttx/configs/mcu123-lpc214x/src/lpc2148_composite.c index b6ea46f22..6bfdb0de7 100644 --- a/nuttx/configs/mcu123-lpc214x/src/lpc2148_composite.c +++ b/nuttx/configs/mcu123-lpc214x/src/lpc2148_composite.c @@ -86,8 +86,8 @@ int composite_archinitialize(void) { /* If system/composite is built as an NSH command, then SD slot should - * already have been initized in nsh_archinitialize() (see up_nsh.c). In - * this case, there is nothing further to be done here. + * already have been initialized in board_app_initialize() (see lpc2148_nsh.c). + * In this case, there is nothing further to be done here. * * NOTE: CONFIG_NSH_BUILTIN_APPS is not a fool-proof indication that NSH * was built. diff --git a/nuttx/configs/mcu123-lpc214x/src/lpc2148_nsh.c b/nuttx/configs/mcu123-lpc214x/src/lpc2148_nsh.c index 37cfe5a32..3285a835a 100644 --- a/nuttx/configs/mcu123-lpc214x/src/lpc2148_nsh.c +++ b/nuttx/configs/mcu123-lpc214x/src/lpc2148_nsh.c @@ -43,6 +43,7 @@ #include #include +#include #include #include @@ -95,14 +96,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { FAR struct spi_dev_s *spi; int ret; diff --git a/nuttx/configs/mikroe-stm32f4/src/stm32_nsh.c b/nuttx/configs/mikroe-stm32f4/src/stm32_nsh.c index 086ed7b0e..836b4273e 100644 --- a/nuttx/configs/mikroe-stm32f4/src/stm32_nsh.c +++ b/nuttx/configs/mikroe-stm32f4/src/stm32_nsh.c @@ -44,6 +44,7 @@ #include #include +#include #include #ifdef CONFIG_STM32_SPI3 @@ -155,14 +156,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #ifdef CONFIG_STM32_SPI3 FAR struct spi_dev_s *spi; diff --git a/nuttx/configs/mirtoo/src/pic32_nsh.c b/nuttx/configs/mirtoo/src/pic32_nsh.c index 677f54fc0..6ad975212 100644 --- a/nuttx/configs/mirtoo/src/pic32_nsh.c +++ b/nuttx/configs/mirtoo/src/pic32_nsh.c @@ -46,6 +46,8 @@ #include #include +#include + #ifdef CONFIG_PIC32MX_SPI2 # include # include @@ -89,14 +91,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #ifdef HAVE_SST25 FAR struct spi_dev_s *spi; diff --git a/nuttx/configs/ne64badge/src/m9s12_nsh.c b/nuttx/configs/ne64badge/src/m9s12_nsh.c index 0ccc7295a..ac7d8ebe5 100644 --- a/nuttx/configs/ne64badge/src/m9s12_nsh.c +++ b/nuttx/configs/ne64badge/src/m9s12_nsh.c @@ -43,6 +43,8 @@ #include #include +#include + #include "ne64badge_internal.h" /**************************************************************************** @@ -54,14 +56,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { /* Configure SPI-based devices */ diff --git a/nuttx/configs/nucleo-f4x1re/src/stm32_boot.c b/nuttx/configs/nucleo-f4x1re/src/stm32_boot.c index 080bc8c9f..4738f2886 100644 --- a/nuttx/configs/nucleo-f4x1re/src/stm32_boot.c +++ b/nuttx/configs/nucleo-f4x1re/src/stm32_boot.c @@ -121,7 +121,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT) - nsh_archinitialize(); + board_app_initialize(); #endif /* CC3000 wireless initialization */ diff --git a/nuttx/configs/nucleo-f4x1re/src/stm32_nsh.c b/nuttx/configs/nucleo-f4x1re/src/stm32_nsh.c index 36337d41a..d3cb2e5d9 100644 --- a/nuttx/configs/nucleo-f4x1re/src/stm32_nsh.c +++ b/nuttx/configs/nucleo-f4x1re/src/stm32_nsh.c @@ -44,6 +44,7 @@ #include #include +#include #include #include @@ -85,14 +86,14 @@ void up_netinitialize(void) #endif /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #if defined(HAVE_MMCSD) || defined(CONFIG_AJOYSTICK) int ret; diff --git a/nuttx/configs/nucleus2g/src/lpc17_nsh.c b/nuttx/configs/nucleus2g/src/lpc17_nsh.c index 63dc234af..f9290cce1 100644 --- a/nuttx/configs/nucleus2g/src/lpc17_nsh.c +++ b/nuttx/configs/nucleus2g/src/lpc17_nsh.c @@ -43,6 +43,7 @@ #include #include +#include #include #include @@ -105,14 +106,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { FAR struct spi_dev_s *ssp; int ret; diff --git a/nuttx/configs/olimex-lpc-h3131/src/lpc31_nsh.c b/nuttx/configs/olimex-lpc-h3131/src/lpc31_nsh.c index f800a1220..e1867f442 100644 --- a/nuttx/configs/olimex-lpc-h3131/src/lpc31_nsh.c +++ b/nuttx/configs/olimex-lpc-h3131/src/lpc31_nsh.c @@ -44,6 +44,8 @@ #include #include +#include + #ifdef CONFIG_SYSTEM_USBMONITOR # include #endif @@ -74,14 +76,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #if defined(HAVE_MMCSD) || defined(HAVE_USBHOST) int ret; diff --git a/nuttx/configs/olimex-lpc1766stk/src/lpc17_nsh.c b/nuttx/configs/olimex-lpc1766stk/src/lpc17_nsh.c index c72817fd8..11c0fbdf4 100644 --- a/nuttx/configs/olimex-lpc1766stk/src/lpc17_nsh.c +++ b/nuttx/configs/olimex-lpc1766stk/src/lpc17_nsh.c @@ -44,6 +44,7 @@ #include #include +#include #include #include #include @@ -280,14 +281,14 @@ static int nsh_usbhostinitialize(void) ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { int ret; diff --git a/nuttx/configs/olimex-lpc2378/src/lpc2378_nsh.c b/nuttx/configs/olimex-lpc2378/src/lpc2378_nsh.c index 4b3ed84ca..683f17aad 100644 --- a/nuttx/configs/olimex-lpc2378/src/lpc2378_nsh.c +++ b/nuttx/configs/olimex-lpc2378/src/lpc2378_nsh.c @@ -49,6 +49,7 @@ #include #include +#include #include #include @@ -84,14 +85,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { return OK; } diff --git a/nuttx/configs/olimex-stm32-h405/src/olimex-stm32-h405.h b/nuttx/configs/olimex-stm32-h405/src/olimex-stm32-h405.h index 7200f7c91..ada54f5e6 100644 --- a/nuttx/configs/olimex-stm32-h405/src/olimex-stm32-h405.h +++ b/nuttx/configs/olimex-stm32-h405/src/olimex-stm32-h405.h @@ -88,25 +88,6 @@ void weak_function stm32_usbinitialize(void); #endif -/************************************************************************************ - * Name: nsh_archinitialize - * - * Description: - * Perform architecture specific initialization for NSH. - * - * CONFIG_NSH_ARCHINIT=y : - * Called from the NSH library - * - * CONFIG_BOARD_INITIALIZE=y, CONFIG_NSH_LIBRARY=y, && - * CONFIG_NSH_ARCHINIT=n : - * Called from board_initialize(). - * - ************************************************************************************/ - -#ifdef CONFIG_NSH_LIBRARY -int nsh_archinitialize(void); -#endif - /************************************************************************************ * Name: stm32_adc_initialize * diff --git a/nuttx/configs/olimex-stm32-h405/src/stm32_boot.c b/nuttx/configs/olimex-stm32-h405/src/stm32_boot.c index 373e3d7d5..b70bf11c7 100644 --- a/nuttx/configs/olimex-stm32-h405/src/stm32_boot.c +++ b/nuttx/configs/olimex-stm32-h405/src/stm32_boot.c @@ -118,7 +118,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT) - nsh_archinitialize(); + board_app_initialize(); #endif } #endif diff --git a/nuttx/configs/olimex-stm32-h405/src/stm32_nsh.c b/nuttx/configs/olimex-stm32-h405/src/stm32_nsh.c index d5a65abd4..ea2867e06 100644 --- a/nuttx/configs/olimex-stm32-h405/src/stm32_nsh.c +++ b/nuttx/configs/olimex-stm32-h405/src/stm32_nsh.c @@ -44,6 +44,8 @@ #include #include +#include + #ifdef CONFIG_SYSTEM_USBMONITOR # include #endif @@ -68,7 +70,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization @@ -82,7 +84,7 @@ * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #if defined(CONFIG_CAN) || defined(CONFIG_ADC) int ret; diff --git a/nuttx/configs/olimex-stm32-p207/src/olimex-stm32-p207.h b/nuttx/configs/olimex-stm32-p207/src/olimex-stm32-p207.h index 09aeacd1d..15ab0aeb5 100644 --- a/nuttx/configs/olimex-stm32-p207/src/olimex-stm32-p207.h +++ b/nuttx/configs/olimex-stm32-p207/src/olimex-stm32-p207.h @@ -124,25 +124,6 @@ void weak_function stm32_usbinitialize(void); int stm32_usbhost_initialize(void); #endif -/************************************************************************************ - * Name: nsh_archinitialize - * - * Description: - * Perform architecture specific initialization for NSH. - * - * CONFIG_NSH_ARCHINIT=y : - * Called from the NSH library - * - * CONFIG_BOARD_INITIALIZE=y, CONFIG_NSH_LIBRARY=y, && - * CONFIG_NSH_ARCHINIT=n : - * Called from board_initialize(). - * - ************************************************************************************/ - -#ifdef CONFIG_NSH_LIBRARY -int nsh_archinitialize(void); -#endif - /************************************************************************************ * Name: stm32_adc_initialize * diff --git a/nuttx/configs/olimex-stm32-p207/src/stm32_boot.c b/nuttx/configs/olimex-stm32-p207/src/stm32_boot.c index 447c85c31..6a50218b6 100644 --- a/nuttx/configs/olimex-stm32-p207/src/stm32_boot.c +++ b/nuttx/configs/olimex-stm32-p207/src/stm32_boot.c @@ -119,7 +119,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT) - nsh_archinitialize(); + board_app_initialize(); #endif } #endif diff --git a/nuttx/configs/olimex-stm32-p207/src/stm32_nsh.c b/nuttx/configs/olimex-stm32-p207/src/stm32_nsh.c index 83bf35d4d..d11e940e9 100644 --- a/nuttx/configs/olimex-stm32-p207/src/stm32_nsh.c +++ b/nuttx/configs/olimex-stm32-p207/src/stm32_nsh.c @@ -44,6 +44,8 @@ #include #include +#include + #ifdef CONFIG_SYSTEM_USBMONITOR # include #endif @@ -97,7 +99,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization @@ -111,7 +113,7 @@ * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #if defined(HAVE_USBHOST) || defined(HAVE_USBMONITOR) || defined(CONFIG_ADC) int ret; diff --git a/nuttx/configs/olimex-strp711/src/str71_nsh.c b/nuttx/configs/olimex-strp711/src/str71_nsh.c index 993c7a206..90f140f44 100644 --- a/nuttx/configs/olimex-strp711/src/str71_nsh.c +++ b/nuttx/configs/olimex-strp711/src/str71_nsh.c @@ -43,6 +43,7 @@ #include #include +#include #include #include @@ -99,14 +100,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #ifdef NSH_HAVEMMCSD FAR struct spi_dev_s *spi; diff --git a/nuttx/configs/olimexino-stm32/src/olimexino-stm32.h b/nuttx/configs/olimexino-stm32/src/olimexino-stm32.h index a4db2e768..da4ab9496 100644 --- a/nuttx/configs/olimexino-stm32/src/olimexino-stm32.h +++ b/nuttx/configs/olimexino-stm32/src/olimexino-stm32.h @@ -171,25 +171,6 @@ void stm32_usbinitialize(void); void stm32_usb_set_pwr_callback(xcpt_t pwr_changed_handler); -/************************************************************************************ - * Name: nsh_archinitialize - * - * Description: - * Perform architecture specific initialization for NSH. - * - * CONFIG_NSH_ARCHINIT=y : - * Called from the NSH library - * - * CONFIG_BOARD_INITIALIZE=y, CONFIG_NSH_LIBRARY=y, && - * CONFIG_NSH_ARCHINIT=n : - * Called from board_initialize(). - * - ************************************************************************************/ - -#ifdef CONFIG_NSH_LIBRARY -int nsh_archinitialize(void); -#endif - /**************************************************************************** * Name: stm32_led_initialize * diff --git a/nuttx/configs/olimexino-stm32/src/stm32_boot.c b/nuttx/configs/olimexino-stm32/src/stm32_boot.c index de3cb31c4..2c05dfb4a 100644 --- a/nuttx/configs/olimexino-stm32/src/stm32_boot.c +++ b/nuttx/configs/olimexino-stm32/src/stm32_boot.c @@ -136,7 +136,7 @@ void board_initialize(void) * space but the initialization function must run in kernel space. */ - nsh_archinitialize(); + board_app_initialize(); #endif #if defined(CONFIG_USBDEV) diff --git a/nuttx/configs/olimexino-stm32/src/stm32_composite.c b/nuttx/configs/olimexino-stm32/src/stm32_composite.c index 970717869..03a35c316 100644 --- a/nuttx/configs/olimexino-stm32/src/stm32_composite.c +++ b/nuttx/configs/olimexino-stm32/src/stm32_composite.c @@ -91,7 +91,7 @@ int composite_archinitialize(void) { /* If system/composite is built as an NSH command, then SD slot should - * already have been initialized in nsh_archinitialize() (see stm32_nsh.c). + * already have been initialized in board_app_initialize() (see stm32_nsh.c). * In this case, there is nothing further to be done here. */ diff --git a/nuttx/configs/olimexino-stm32/src/stm32_nsh.c b/nuttx/configs/olimexino-stm32/src/stm32_nsh.c index c439ace73..934ff06bd 100644 --- a/nuttx/configs/olimexino-stm32/src/stm32_nsh.c +++ b/nuttx/configs/olimexino-stm32/src/stm32_nsh.c @@ -45,6 +45,7 @@ #include #include +#include #include #include @@ -75,14 +76,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { int ret = OK; diff --git a/nuttx/configs/olimexino-stm32/src/stm32_usbmsc.c b/nuttx/configs/olimexino-stm32/src/stm32_usbmsc.c index d794d09a6..62ce2d1e7 100644 --- a/nuttx/configs/olimexino-stm32/src/stm32_usbmsc.c +++ b/nuttx/configs/olimexino-stm32/src/stm32_usbmsc.c @@ -93,7 +93,7 @@ int usbmsc_archinitialize(void) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initialized in nsh_archinitialize() (see stm32_nsh.c). + * already have been initialized in board_app_initialize() (see stm32_nsh.c). * In this case, there is nothing further to be done here. */ diff --git a/nuttx/configs/open1788/src/lpc17_boardinitialize.c b/nuttx/configs/open1788/src/lpc17_boardinitialize.c index 2373ee684..04c3a9eb2 100644 --- a/nuttx/configs/open1788/src/lpc17_boardinitialize.c +++ b/nuttx/configs/open1788/src/lpc17_boardinitialize.c @@ -136,7 +136,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT) - (void)nsh_archinitialize(); + (void)board_app_initialize(); #endif } #endif diff --git a/nuttx/configs/open1788/src/lpc17_nsh.c b/nuttx/configs/open1788/src/lpc17_nsh.c index 9cb7570c9..dc479a97f 100644 --- a/nuttx/configs/open1788/src/lpc17_nsh.c +++ b/nuttx/configs/open1788/src/lpc17_nsh.c @@ -46,6 +46,7 @@ #include #include +#include #include #include #include @@ -343,7 +344,7 @@ static int nsh_usbhostinitialize(void) ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization for NSH. @@ -357,7 +358,7 @@ static int nsh_usbhostinitialize(void) * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { int ret; diff --git a/nuttx/configs/open1788/src/open1788.h b/nuttx/configs/open1788/src/open1788.h index 7e63a44bc..2ba723882 100644 --- a/nuttx/configs/open1788/src/open1788.h +++ b/nuttx/configs/open1788/src/open1788.h @@ -225,24 +225,5 @@ void open1788_nand_initialize(void); void open1788_lcd_initialize(void); #endif -/************************************************************************************ - * Name: nsh_archinitialize - * - * Description: - * Perform architecture specific initialization for NSH. - * - * CONFIG_NSH_ARCHINIT=y : - * Called from the NSH library - * - * CONFIG_BOARD_INITIALIZE=y, CONFIG_NSH_LIBRARY=y, && - * CONFIG_NSH_ARCHINIT=n: - * Called from board_initialize(). - * - ************************************************************************************/ - -#ifdef CONFIG_NSH_LIBRARY -int nsh_archinitialize(void); -#endif - #endif /* __ASSEMBLY__ */ #endif /* _CONFIGS_OPEN1788_SRC_OPEN1788_H */ diff --git a/nuttx/configs/pcblogic-pic32mx/src/pic32mx_nsh.c b/nuttx/configs/pcblogic-pic32mx/src/pic32mx_nsh.c index e30001ef3..e11e3cafa 100644 --- a/nuttx/configs/pcblogic-pic32mx/src/pic32mx_nsh.c +++ b/nuttx/configs/pcblogic-pic32mx/src/pic32mx_nsh.c @@ -41,6 +41,7 @@ #include +#include #include #include @@ -61,14 +62,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { int ret = OK; diff --git a/nuttx/configs/pcduino-a10/src/a1x_boot.c b/nuttx/configs/pcduino-a10/src/a1x_boot.c index a8dceb6e9..2f99f56af 100644 --- a/nuttx/configs/pcduino-a10/src/a1x_boot.c +++ b/nuttx/configs/pcduino-a10/src/a1x_boot.c @@ -96,7 +96,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT) - (void)nsh_archinitialize(); + (void)board_app_initialize(); #endif } #endif /* CONFIG_BOARD_INITIALIZE */ diff --git a/nuttx/configs/pcduino-a10/src/pcduino_a10.h b/nuttx/configs/pcduino-a10/src/pcduino_a10.h index fc853ebce..16dd0bc61 100644 --- a/nuttx/configs/pcduino-a10/src/pcduino_a10.h +++ b/nuttx/configs/pcduino-a10/src/pcduino_a10.h @@ -155,24 +155,5 @@ void a1x_led_initialize(void); -/************************************************************************************ - * Name: nsh_archinitialize - * - * Description: - * Perform architecture specific initialization for NSH. - * - * CONFIG_NSH_ARCHINIT=y : - * Called from the NSH library - * - * CONFIG_BOARD_INITIALIZE=y, CONFIG_NSH_LIBRARY=y, && CONFIG_NSH_ARCHINIT=n : - * Called from board_initialize(). - * - ************************************************************************************/ - -#ifdef CONFIG_NSH_LIBRARY -int nsh_archinitialize(void); -#endif - #endif /* __ASSEMBLY__ */ #endif /* __CONFIGS_PCDUINO_A10_PCDUINO_A10_H */ - diff --git a/nuttx/configs/pic32mx-starterkit/src/pic32mx_nsh.c b/nuttx/configs/pic32mx-starterkit/src/pic32mx_nsh.c index d092182df..ea3b66082 100644 --- a/nuttx/configs/pic32mx-starterkit/src/pic32mx_nsh.c +++ b/nuttx/configs/pic32mx-starterkit/src/pic32mx_nsh.c @@ -44,6 +44,7 @@ #include #include +#include #include #include #include @@ -330,14 +331,14 @@ static int nsh_usbdevinitialize(void) ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { int ret; diff --git a/nuttx/configs/pic32mx-starterkit/src/pic32mx_usbmsc.c b/nuttx/configs/pic32mx-starterkit/src/pic32mx_usbmsc.c index c76196304..956d97b56 100644 --- a/nuttx/configs/pic32mx-starterkit/src/pic32mx_usbmsc.c +++ b/nuttx/configs/pic32mx-starterkit/src/pic32mx_usbmsc.c @@ -61,8 +61,8 @@ int usbmsc_archinitialize(void) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initized in nsh_archinitialize() (see up_nsh.c). In - * this case, there is nothing further to be done here. + * already have been initialized in board_app_initialize() (see + * pic32mx_nsh.c). In this case, there is nothing further to be done here. */ #ifndef CONFIG_NSH_BUILTIN_APPS diff --git a/nuttx/configs/pic32mx-starterkit/src/pic32mx_usbterm.c b/nuttx/configs/pic32mx-starterkit/src/pic32mx_usbterm.c index 80a4ce4b5..e86e376b3 100644 --- a/nuttx/configs/pic32mx-starterkit/src/pic32mx_usbterm.c +++ b/nuttx/configs/pic32mx-starterkit/src/pic32mx_usbterm.c @@ -76,7 +76,7 @@ int usbterm_devinit(void) * we will fake it and tell the USB driver that the USB is connected now. * * If examples/usbterm is built as an NSH built-in application, then - * pic32mx_usbattach() will be called in nsh_archinitialize(). + * pic32mx_usbattach() will be called in board_app_initialize(). */ #ifndef CONFIG_NSH_BUILTIN_APPS diff --git a/nuttx/configs/pic32mx7mmb/src/pic32_nsh.c b/nuttx/configs/pic32mx7mmb/src/pic32_nsh.c index dba613e27..452349fa5 100644 --- a/nuttx/configs/pic32mx7mmb/src/pic32_nsh.c +++ b/nuttx/configs/pic32mx7mmb/src/pic32_nsh.c @@ -44,6 +44,7 @@ #include #include +#include #include #include #include @@ -340,14 +341,14 @@ static int nsh_usbdevinitialize(void) ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { int ret; diff --git a/nuttx/configs/pic32mx7mmb/src/pic32_usbmsc.c b/nuttx/configs/pic32mx7mmb/src/pic32_usbmsc.c index a8ed56be0..8782af012 100644 --- a/nuttx/configs/pic32mx7mmb/src/pic32_usbmsc.c +++ b/nuttx/configs/pic32mx7mmb/src/pic32_usbmsc.c @@ -61,8 +61,8 @@ int usbmsc_archinitialize(void) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initized in nsh_archinitialize() (see up_nsh.c). In - * this case, there is nothing further to be done here. + * already have been initialized in board_app_initialize() (see pic32_nsh.c). + * In this case, there is nothing further to be done here. */ #ifndef CONFIG_NSH_BUILTIN_APPS diff --git a/nuttx/configs/pic32mx7mmb/src/pic32_usbterm.c b/nuttx/configs/pic32mx7mmb/src/pic32_usbterm.c index 686089598..9fcd22e8e 100644 --- a/nuttx/configs/pic32mx7mmb/src/pic32_usbterm.c +++ b/nuttx/configs/pic32mx7mmb/src/pic32_usbterm.c @@ -77,7 +77,7 @@ int usbterm_devinit(void) * connected now. * * If examples/usbterm is built as an NSH built-in application, then - * pic32mx_usbattach() will be called in nsh_archinitialize(). + * pic32mx_usbattach() will be called in board_app_initialize(). */ #ifndef CONFIG_NSH_BUILTIN_APPS diff --git a/nuttx/configs/pic32mz-starterkit/src/pic32mz_nsh.c b/nuttx/configs/pic32mz-starterkit/src/pic32mz_nsh.c index 9b235d43a..3cbc502f2 100644 --- a/nuttx/configs/pic32mz-starterkit/src/pic32mz_nsh.c +++ b/nuttx/configs/pic32mz-starterkit/src/pic32mz_nsh.c @@ -39,6 +39,8 @@ #include +#include + #include "pic32mz-starterkit.h" #ifdef CONFIG_NSH_ARCHINIT @@ -48,14 +50,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { /* If CONFIG_BOARD_INITIALIZE is selected then board initialization was * already performed in board_initialize. diff --git a/nuttx/configs/sam3u-ek/src/sam_nsh.c b/nuttx/configs/sam3u-ek/src/sam_nsh.c index 52da9e6d9..74a61e6a7 100644 --- a/nuttx/configs/sam3u-ek/src/sam_nsh.c +++ b/nuttx/configs/sam3u-ek/src/sam_nsh.c @@ -44,6 +44,7 @@ #include #include +#include #include #include @@ -101,14 +102,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #ifdef NSH_HAVE_MMCSD FAR struct sdio_dev_s *sdio; diff --git a/nuttx/configs/sam4e-ek/src/sam_boot.c b/nuttx/configs/sam4e-ek/src/sam_boot.c index 9c759b71e..9b05f9aac 100644 --- a/nuttx/configs/sam4e-ek/src/sam_boot.c +++ b/nuttx/configs/sam4e-ek/src/sam_boot.c @@ -152,7 +152,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT) - (void)nsh_archinitialize(); + (void)board_app_initialize(); #endif } #endif /* CONFIG_BOARD_INITIALIZE */ diff --git a/nuttx/configs/sam4e-ek/src/sam_nsh.c b/nuttx/configs/sam4e-ek/src/sam_nsh.c index c567eedf0..747328896 100644 --- a/nuttx/configs/sam4e-ek/src/sam_nsh.c +++ b/nuttx/configs/sam4e-ek/src/sam_nsh.c @@ -46,6 +46,8 @@ #include #include +#include + #ifdef CONFIG_SYSTEM_USBMONITOR # include #endif @@ -61,14 +63,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #if defined(HAVE_AT25) || defined(HAVE_HSMCI) || defined(HAVE_USBMONITOR) int ret; diff --git a/nuttx/configs/sam4l-xplained/src/sam_nsh.c b/nuttx/configs/sam4l-xplained/src/sam_nsh.c index ac60b39cf..58c75aa60 100644 --- a/nuttx/configs/sam4l-xplained/src/sam_nsh.c +++ b/nuttx/configs/sam4l-xplained/src/sam_nsh.c @@ -42,6 +42,8 @@ #include #include +#include + #include "sam4l-xplained.h" /**************************************************************************** @@ -74,14 +76,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #if defined(CONFIG_SAM34_LCDCA) && defined(CONFIG_SAM4L_XPLAINED_SLCD1MODULE) /* Initialize the SLCD and register the SLCD device as /dev/slcd */ diff --git a/nuttx/configs/sam4s-xplained-pro/src/sam_nsh.c b/nuttx/configs/sam4s-xplained-pro/src/sam_nsh.c index 7353dd29d..8c9293455 100644 --- a/nuttx/configs/sam4s-xplained-pro/src/sam_nsh.c +++ b/nuttx/configs/sam4s-xplained-pro/src/sam_nsh.c @@ -49,6 +49,7 @@ #include #include +#include #ifdef CONFIG_CDCACM # include @@ -77,14 +78,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #if defined (HAVE_USBDEV) || defined(HAVE_HSMCI) || defined (HAVE_PROC) || \ defined(HAVE_USBMONITOR) diff --git a/nuttx/configs/sama5d3-xplained/src/sam_boot.c b/nuttx/configs/sama5d3-xplained/src/sam_boot.c index be66c51b8..a85cb7904 100644 --- a/nuttx/configs/sama5d3-xplained/src/sam_boot.c +++ b/nuttx/configs/sama5d3-xplained/src/sam_boot.c @@ -153,7 +153,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT) - (void)nsh_archinitialize(); + (void)board_app_initialize(); #endif } #endif /* CONFIG_BOARD_INITIALIZE */ diff --git a/nuttx/configs/sama5d3-xplained/src/sam_nsh.c b/nuttx/configs/sama5d3-xplained/src/sam_nsh.c index 9f71b59f3..30a84d4de 100644 --- a/nuttx/configs/sama5d3-xplained/src/sam_nsh.c +++ b/nuttx/configs/sama5d3-xplained/src/sam_nsh.c @@ -46,6 +46,8 @@ #include #include +#include + #ifdef CONFIG_SYSTEM_USBMONITOR # include #endif @@ -61,14 +63,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #if defined(HAVE_NAND) || defined(HAVE_AT25) || defined(HAVE_HSMCI) || \ defined(HAVE_USBHOST) || defined(HAVE_USBMONITOR) || defined(CONFIG_AJOYSTICK) diff --git a/nuttx/configs/sama5d3-xplained/src/sama5d3-xplained.h b/nuttx/configs/sama5d3-xplained/src/sama5d3-xplained.h index 7d201888b..42a4ed125 100644 --- a/nuttx/configs/sama5d3-xplained/src/sama5d3-xplained.h +++ b/nuttx/configs/sama5d3-xplained/src/sama5d3-xplained.h @@ -733,24 +733,6 @@ int sam_usbhost_initialize(void); void weak_function sam_netinitialize(void); #endif -/************************************************************************************ - * Name: nsh_archinitialize - * - * Description: - * Perform architecture specific initialization for NSH. - * - * CONFIG_NSH_ARCHINIT=y : - * Called from the NSH library - * - * CONFIG_BOARD_INITIALIZE=y, CONFIG_NSH_LIBRARY=y, && CONFIG_NSH_ARCHINIT=n : - * Called from board_initialize(). - * - ************************************************************************************/ - -#ifdef CONFIG_NSH_LIBRARY -int nsh_archinitialize(void); -#endif - /************************************************************************************ * Name: board_adc_initialize * diff --git a/nuttx/configs/sama5d3x-ek/src/sam_boot.c b/nuttx/configs/sama5d3x-ek/src/sam_boot.c index 1189ad631..969016e0d 100644 --- a/nuttx/configs/sama5d3x-ek/src/sam_boot.c +++ b/nuttx/configs/sama5d3x-ek/src/sam_boot.c @@ -153,7 +153,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT) - (void)nsh_archinitialize(); + (void)board_app_initialize(); #endif } #endif /* CONFIG_BOARD_INITIALIZE */ diff --git a/nuttx/configs/sama5d3x-ek/src/sam_nsh.c b/nuttx/configs/sama5d3x-ek/src/sam_nsh.c index deaaf53d1..df2435038 100644 --- a/nuttx/configs/sama5d3x-ek/src/sam_nsh.c +++ b/nuttx/configs/sama5d3x-ek/src/sam_nsh.c @@ -46,6 +46,8 @@ #include #include +#include + #ifdef CONFIG_SYSTEM_USBMONITOR # include #endif @@ -61,14 +63,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #if defined(HAVE_NAND) || defined(HAVE_AT25) || defined(HAVE_AT24) || \ defined(HAVE_HSMCI) || defined(HAVE_USBHOST) || defined(HAVE_USBMONITOR) ||\ diff --git a/nuttx/configs/sama5d3x-ek/src/sama5d3x-ek.h b/nuttx/configs/sama5d3x-ek/src/sama5d3x-ek.h index 2990cc533..5b4e55da6 100644 --- a/nuttx/configs/sama5d3x-ek/src/sama5d3x-ek.h +++ b/nuttx/configs/sama5d3x-ek/src/sama5d3x-ek.h @@ -843,24 +843,6 @@ void weak_function sam_netinitialize(void); int sam_wm8904_initialize(int minor); #endif /* HAVE_WM8904 */ -/************************************************************************************ - * Name: nsh_archinitialize - * - * Description: - * Perform architecture specific initialization for NSH. - * - * CONFIG_NSH_ARCHINIT=y : - * Called from the NSH library - * - * CONFIG_BOARD_INITIALIZE=y, CONFIG_NSH_LIBRARY=y, && CONFIG_NSH_ARCHINIT=n : - * Called from board_initialize(). - * - ************************************************************************************/ - -#ifdef CONFIG_NSH_LIBRARY -int nsh_archinitialize(void); -#endif - #endif /* __ASSEMBLY__ */ #endif /* __CONFIGS_SAMA5D3X_EK_SRC_SAMA5D3X_EK_H */ diff --git a/nuttx/configs/sama5d4-ek/src/sam_nsh.c b/nuttx/configs/sama5d4-ek/src/sam_nsh.c index 37fb34498..939655682 100644 --- a/nuttx/configs/sama5d4-ek/src/sam_nsh.c +++ b/nuttx/configs/sama5d4-ek/src/sam_nsh.c @@ -39,6 +39,8 @@ #include +#include + #include "sama5d4-ek.h" #ifndef CONFIG_BUILD_KERNEL @@ -52,14 +54,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #ifndef CONFIG_BOARD_INITIALIZE /* Perform board initialization */ diff --git a/nuttx/configs/sama5d4-ek/src/sama5d4-ek.h b/nuttx/configs/sama5d4-ek/src/sama5d4-ek.h index b2f03a711..79c068ca3 100644 --- a/nuttx/configs/sama5d4-ek/src/sama5d4-ek.h +++ b/nuttx/configs/sama5d4-ek/src/sama5d4-ek.h @@ -1068,24 +1068,6 @@ int sam_usbhost_initialize(void); void weak_function sam_netinitialize(void); #endif -/************************************************************************************ - * Name: nsh_archinitialize - * - * Description: - * Perform architecture specific initialization for NSH. - * - * CONFIG_NSH_ARCHINIT=y : - * Called from the NSH library - * - * CONFIG_BOARD_INITIALIZE=y, CONFIG_NSH_LIBRARY=y, && CONFIG_NSH_ARCHINIT=n : - * Called from board_initialize(). - * - ************************************************************************************/ - -#ifdef CONFIG_NSH_LIBRARY -int nsh_archinitialize(void); -#endif - /**************************************************************************** * Name: sam_wm8904_initialize * diff --git a/nuttx/configs/samd20-xplained/src/sam_nsh.c b/nuttx/configs/samd20-xplained/src/sam_nsh.c index e2b69b53d..5b8356f5c 100644 --- a/nuttx/configs/samd20-xplained/src/sam_nsh.c +++ b/nuttx/configs/samd20-xplained/src/sam_nsh.c @@ -42,6 +42,8 @@ #include #include +#include + #include "sam_config.h" #include "samd20-xplained.h" @@ -96,14 +98,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #if defined(SAMD_HAVE_SPI0) && defined(CONFIG_SAMD20_XPLAINED_IOMODULE) /* Initialize the SPI-based MMC/SD slot */ diff --git a/nuttx/configs/samv71-xult/src/sam_nsh.c b/nuttx/configs/samv71-xult/src/sam_nsh.c index c618200d6..bc3668032 100644 --- a/nuttx/configs/samv71-xult/src/sam_nsh.c +++ b/nuttx/configs/samv71-xult/src/sam_nsh.c @@ -39,6 +39,8 @@ #include +#include + #include "samv71-xult.h" #if defined(CONFIG_NSH_ARCHINIT) && !defined(CONFIG_BUILD_KERNEL) @@ -52,14 +54,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #ifndef CONFIG_BOARD_INITIALIZE /* Perform board initialization */ diff --git a/nuttx/configs/shenzhou/src/stm32_composite.c b/nuttx/configs/shenzhou/src/stm32_composite.c index 97fe9fca7..c5c156717 100644 --- a/nuttx/configs/shenzhou/src/stm32_composite.c +++ b/nuttx/configs/shenzhou/src/stm32_composite.c @@ -70,8 +70,8 @@ int composite_archinitialize(void) { /* If system/composite is built as an NSH command, then SD slot should - * already have been initized in nsh_archinitialize() (see up_nsh.c). In - * this case, there is nothing further to be done here. + * already have been initialized in board_app_initialize() (see + * stm32_nsh.c). In this case, there is nothing further to be done here. * * NOTE: CONFIG_NSH_BUILTIN_APPS is not a fool-proof indication that NSH * was built. diff --git a/nuttx/configs/shenzhou/src/stm32_nsh.c b/nuttx/configs/shenzhou/src/stm32_nsh.c index aebe00461..60454dccf 100644 --- a/nuttx/configs/shenzhou/src/stm32_nsh.c +++ b/nuttx/configs/shenzhou/src/stm32_nsh.c @@ -44,6 +44,8 @@ #include #include +#include + #include "stm32.h" #include "shenzhou-internal.h" @@ -149,14 +151,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #if defined(HAVE_MMCSD) || defined(HAVE_USBHOST) || defined(HAVE_W25) int ret; diff --git a/nuttx/configs/shenzhou/src/stm32_usbmsc.c b/nuttx/configs/shenzhou/src/stm32_usbmsc.c index 6f4ea9caf..b7ce927e9 100644 --- a/nuttx/configs/shenzhou/src/stm32_usbmsc.c +++ b/nuttx/configs/shenzhou/src/stm32_usbmsc.c @@ -71,8 +71,8 @@ int usbmsc_archinitialize(void) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initized in nsh_archinitialize() (see up_nsh.c). In - * this case, there is nothing further to be done here. + * already have been initialized in board_app_initialize() (see + * stm32_nsh.c). In this case, there is nothing further to be done here. */ #ifndef CONFIG_NSH_BUILTIN_APPS diff --git a/nuttx/configs/spark/include/board.h b/nuttx/configs/spark/include/board.h index a753766bd..dbbbd123d 100644 --- a/nuttx/configs/spark/include/board.h +++ b/nuttx/configs/spark/include/board.h @@ -255,25 +255,6 @@ void up_setleds(uint8_t ledset, uint8_t led_states_set); void stm32_boardinitialize(void); -/************************************************************************************ - * Name: nsh_archinitialize - * - * Description: - * Perform architecture specific initialization for NSH. - * - * CONFIG_NSH_ARCHINIT=y : - * Called from the NSH library - * - * CONFIG_BOARD_INITIALIZE=y, CONFIG_NSH_LIBRARY=y, && - * CONFIG_NSH_ARCHINIT=n: - * Called from board_initialize(). - * - ************************************************************************************/ - -#ifdef CONFIG_NSH_LIBRARY -int nsh_archinitialize(void); -#endif - #undef EXTERN #if defined(__cplusplus) } diff --git a/nuttx/configs/spark/src/stm32_boot.c b/nuttx/configs/spark/src/stm32_boot.c index dc3afe126..c1e0c0bf4 100644 --- a/nuttx/configs/spark/src/stm32_boot.c +++ b/nuttx/configs/spark/src/stm32_boot.c @@ -125,7 +125,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT) - nsh_archinitialize(); + board_app_initialize(); #endif /* CC3000 wireless initialization diff --git a/nuttx/configs/spark/src/stm32_composite.c b/nuttx/configs/spark/src/stm32_composite.c index 15e4879e9..3f48bd304 100644 --- a/nuttx/configs/spark/src/stm32_composite.c +++ b/nuttx/configs/spark/src/stm32_composite.c @@ -282,7 +282,7 @@ static int do_composite_archinitialize(void) ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization diff --git a/nuttx/configs/spark/src/stm32_nsh.c b/nuttx/configs/spark/src/stm32_nsh.c index b9af15fcc..1a893c6cc 100644 --- a/nuttx/configs/spark/src/stm32_nsh.c +++ b/nuttx/configs/spark/src/stm32_nsh.c @@ -45,6 +45,7 @@ #include #include +#include #include #ifdef CONFIG_MTD_SST25 @@ -124,14 +125,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #ifdef HAVE_SST25 FAR struct spi_dev_s *spi; @@ -289,6 +290,6 @@ int usbmsc_archinitialize(void) #if defined(CONFIG_NSH_ARCHINIT) return OK; #else - return nsh_archinitialize(); + return board_app_initialize(); #endif } diff --git a/nuttx/configs/stm3210e-eval/src/stm32_composite.c b/nuttx/configs/stm3210e-eval/src/stm32_composite.c index 33118ee58..60eaa5d6a 100644 --- a/nuttx/configs/stm3210e-eval/src/stm32_composite.c +++ b/nuttx/configs/stm3210e-eval/src/stm32_composite.c @@ -90,8 +90,8 @@ int composite_archinitialize(void) { /* If system/composite is built as an NSH command, then SD slot should - * already have been initialized in nsh_archinitialize() (see stm32_nsh.c). In - * this case, there is nothing further to be done here. + * already have been initialized in board_app_initialize() (see + * stm32_nsh.c). In this case, there is nothing further to be done here. * * NOTE: CONFIG_NSH_BUILTIN_APPS is not a fool-proof indication that NSH * was built. diff --git a/nuttx/configs/stm3210e-eval/src/stm32_nsh.c b/nuttx/configs/stm3210e-eval/src/stm32_nsh.c index a16128bec..5cae274d7 100644 --- a/nuttx/configs/stm3210e-eval/src/stm32_nsh.c +++ b/nuttx/configs/stm3210e-eval/src/stm32_nsh.c @@ -44,6 +44,8 @@ #include #include +#include + #ifdef CONFIG_STM32_SPI1 # include # include @@ -109,14 +111,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #ifdef CONFIG_STM32_SPI1 FAR struct spi_dev_s *spi; diff --git a/nuttx/configs/stm3210e-eval/src/stm32_usbmsc.c b/nuttx/configs/stm3210e-eval/src/stm32_usbmsc.c index d5c11ba4b..045304eb7 100644 --- a/nuttx/configs/stm3210e-eval/src/stm32_usbmsc.c +++ b/nuttx/configs/stm3210e-eval/src/stm32_usbmsc.c @@ -89,8 +89,8 @@ int usbmsc_archinitialize(void) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initialized in nsh_archinitialize() (see up_nsh.c). In - * this case, there is nothing further to be done here. + * already have been initialized in board_app_initialize() (see up_nsh.c). + * In this case, there is nothing further to be done here. */ #ifndef CONFIG_NSH_BUILTIN_APPS diff --git a/nuttx/configs/stm3220g-eval/src/stm32_nsh.c b/nuttx/configs/stm3220g-eval/src/stm32_nsh.c index f150b5cd0..010c3dd1b 100644 --- a/nuttx/configs/stm3220g-eval/src/stm32_nsh.c +++ b/nuttx/configs/stm3220g-eval/src/stm32_nsh.c @@ -44,6 +44,8 @@ #include #include +#include + #ifdef CONFIG_STM32_SPI1 # include # include @@ -122,14 +124,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #ifdef CONFIG_STM32_SPI1 FAR struct spi_dev_s *spi; diff --git a/nuttx/configs/stm3240g-eval/src/stm3240g-eval.h b/nuttx/configs/stm3240g-eval/src/stm3240g-eval.h index 845e139a6..5c8790d0e 100644 --- a/nuttx/configs/stm3240g-eval/src/stm3240g-eval.h +++ b/nuttx/configs/stm3240g-eval/src/stm3240g-eval.h @@ -380,24 +380,5 @@ void stm32_selectlcd(void); void stm32_deselectlcd(void); #endif -/**************************************************************************** - * Name: nsh_archinitialize - * - * Description: - * Perform architecture specific initialization for NSH. - * - * CONFIG_NSH_ARCHINIT=y : - * Called from the NSH library - * - * CONFIG_BOARD_INITIALIZE=y, CONFIG_NSH_LIBRARY=y, && - * CONFIG_NSH_ARCHINIT=n : - * Called from board_initialize(). - * - ****************************************************************************/ - -#ifdef CONFIG_NSH_LIBRARY -int nsh_archinitialize(void); -#endif - #endif /* __ASSEMBLY__ */ #endif /* __CONFIGS_STM3240G_EVAL_SRC_STM3240G_EVAL_H */ diff --git a/nuttx/configs/stm3240g-eval/src/stm32_boot.c b/nuttx/configs/stm3240g-eval/src/stm32_boot.c index 47515d64e..d6d14e50a 100644 --- a/nuttx/configs/stm3240g-eval/src/stm32_boot.c +++ b/nuttx/configs/stm3240g-eval/src/stm32_boot.c @@ -161,10 +161,10 @@ static int board_initthread(int argc, char *argv[]) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT) - ret = nsh_archinitialize(); + ret = board_app_initialize(); if (ret < 0) { - gdbg("ERROR: nsh_archinitialize failed: %d\n", ret); + gdbg("ERROR: board_app_initialize failed: %d\n", ret); } #endif diff --git a/nuttx/configs/stm3240g-eval/src/stm32_nsh.c b/nuttx/configs/stm3240g-eval/src/stm32_nsh.c index 963f03a21..e221b2a25 100644 --- a/nuttx/configs/stm3240g-eval/src/stm32_nsh.c +++ b/nuttx/configs/stm3240g-eval/src/stm32_nsh.c @@ -44,6 +44,8 @@ #include #include +#include + #ifdef CONFIG_STM32_SPI1 # include # include @@ -128,14 +130,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #ifdef CONFIG_STM32_SPI1 FAR struct spi_dev_s *spi; diff --git a/nuttx/configs/stm32_tiny/src/stm32_nsh.c b/nuttx/configs/stm32_tiny/src/stm32_nsh.c index 1e22dfd8a..6b62a2d40 100644 --- a/nuttx/configs/stm32_tiny/src/stm32_nsh.c +++ b/nuttx/configs/stm32_tiny/src/stm32_nsh.c @@ -44,6 +44,8 @@ #include #include +#include + #include "stm32.h" #include "stm32_tiny-internal.h" @@ -56,14 +58,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #if defined(CONFIG_WL_NRF24L01) syslog(LOG_INFO, "Register the nRF24L01 module"); diff --git a/nuttx/configs/stm32f3discovery/src/stm32_nsh.c b/nuttx/configs/stm32f3discovery/src/stm32_nsh.c index e57934c44..6563100c5 100644 --- a/nuttx/configs/stm32f3discovery/src/stm32_nsh.c +++ b/nuttx/configs/stm32f3discovery/src/stm32_nsh.c @@ -44,6 +44,8 @@ #include #include +#include + #ifdef CONFIG_SYSTEM_USBMONITOR # include #endif @@ -87,14 +89,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #ifdef HAVE_USBMONITOR int ret; diff --git a/nuttx/configs/stm32f429i-disco/src/stm32_boot.c b/nuttx/configs/stm32f429i-disco/src/stm32_boot.c index 3615d167d..cc72295bc 100644 --- a/nuttx/configs/stm32f429i-disco/src/stm32_boot.c +++ b/nuttx/configs/stm32f429i-disco/src/stm32_boot.c @@ -133,7 +133,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT) - (void)nsh_archinitialize(); + (void)board_app_initialize(); #endif } #endif diff --git a/nuttx/configs/stm32f429i-disco/src/stm32_nsh.c b/nuttx/configs/stm32f429i-disco/src/stm32_nsh.c index 9cff689c7..13c82cfed 100644 --- a/nuttx/configs/stm32f429i-disco/src/stm32_nsh.c +++ b/nuttx/configs/stm32f429i-disco/src/stm32_nsh.c @@ -44,6 +44,7 @@ #include #include +#include #include #ifdef CONFIG_STM32_SPI4 @@ -117,7 +118,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization @@ -131,7 +132,7 @@ * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #if defined(HAVE_USBHOST) || defined(HAVE_USBMONITOR) int ret; diff --git a/nuttx/configs/stm32f429i-disco/src/stm32f429i-disco.h b/nuttx/configs/stm32f429i-disco/src/stm32f429i-disco.h index 9a0aaf794..156a2d0e3 100644 --- a/nuttx/configs/stm32f429i-disco/src/stm32f429i-disco.h +++ b/nuttx/configs/stm32f429i-disco/src/stm32f429i-disco.h @@ -220,25 +220,6 @@ void stm32_ledpminitialize(void); void stm32_pmbuttons(void); #endif -/**************************************************************************** - * Name: nsh_archinitialize - * - * Description: - * Perform architecture specific initialization for NSH. - * - * CONFIG_NSH_ARCHINIT=y : - * Called from the NSH library - * - * CONFIG_BOARD_INITIALIZE=y, CONFIG_NSH_LIBRARY=y, && - * CONFIG_NSH_ARCHINIT=n : - * Called from board_initialize(). - * - ****************************************************************************/ - -#ifdef CONFIG_NSH_LIBRARY -int nsh_archinitialize(void); -#endif - #ifdef CONFIG_STM32F429I_DISCO_ILI9341 /**************************************************************************** * Name: stm32_ili93414ws_initialize diff --git a/nuttx/configs/stm32f4discovery/src/stm32_nsh.c b/nuttx/configs/stm32f4discovery/src/stm32_nsh.c index 037fced44..64dd8b248 100644 --- a/nuttx/configs/stm32f4discovery/src/stm32_nsh.c +++ b/nuttx/configs/stm32f4discovery/src/stm32_nsh.c @@ -39,6 +39,8 @@ #include +#include + #include "stm32f4discovery.h" /**************************************************************************** @@ -54,7 +56,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture-specific initialization (if this was not already @@ -62,7 +64,7 @@ * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #ifdef CONFIG_BOARD_INITIALIZE /* Board initialization already performed by board_initialize() */ diff --git a/nuttx/configs/stm32ldiscovery/src/stm32_nsh.c b/nuttx/configs/stm32ldiscovery/src/stm32_nsh.c index b3bc54095..2d1666412 100644 --- a/nuttx/configs/stm32ldiscovery/src/stm32_nsh.c +++ b/nuttx/configs/stm32ldiscovery/src/stm32_nsh.c @@ -42,6 +42,7 @@ #include +#include #include #include "stm32ldiscovery.h" @@ -55,14 +56,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #ifdef CONFIG_STM32_LCD /* Initialize the SLCD and register the SLCD device as /dev/slcd */ diff --git a/nuttx/configs/sure-pic32mx/src/pic32mx_nsh.c b/nuttx/configs/sure-pic32mx/src/pic32mx_nsh.c index 6c89c1854..3d22edd2d 100644 --- a/nuttx/configs/sure-pic32mx/src/pic32mx_nsh.c +++ b/nuttx/configs/sure-pic32mx/src/pic32mx_nsh.c @@ -44,6 +44,7 @@ #include #include +#include #include #include #include @@ -332,14 +333,14 @@ static int nsh_usbdevinitialize(void) ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { int ret; diff --git a/nuttx/configs/sure-pic32mx/src/pic32mx_usbterm.c b/nuttx/configs/sure-pic32mx/src/pic32mx_usbterm.c index f8cb84dc4..616da1819 100644 --- a/nuttx/configs/sure-pic32mx/src/pic32mx_usbterm.c +++ b/nuttx/configs/sure-pic32mx/src/pic32mx_usbterm.c @@ -79,7 +79,7 @@ int usbterm_devinit(void) * will fake it and tell the USB driver that the USB is connected now. * * If examples/usbterm is built as an NSH built-in application, then - * pic32mx_usbattach() will be called in nsh_archinitialize(). + * pic32mx_usbattach() will be called in board_app_initialize(). */ #ifndef CONFIG_NSH_BUILTIN_APPS diff --git a/nuttx/configs/tm4c123g-launchpad/src/tm4c_nsh.c b/nuttx/configs/tm4c123g-launchpad/src/tm4c_nsh.c index 405373017..9e1280a4f 100644 --- a/nuttx/configs/tm4c123g-launchpad/src/tm4c_nsh.c +++ b/nuttx/configs/tm4c123g-launchpad/src/tm4c_nsh.c @@ -39,26 +39,27 @@ #include +#include + #include "tm4c123g-launchpad.h" /**************************************************************************** * Pre-Processor Definitions ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { /* If CONFIG_BOARD_INITIALIZE is selected then board initialization was * already performed in board_initialize. diff --git a/nuttx/configs/tm4c1294-launchpad/src/tm4c_nsh.c b/nuttx/configs/tm4c1294-launchpad/src/tm4c_nsh.c index 8df992b26..9dcff65cf 100644 --- a/nuttx/configs/tm4c1294-launchpad/src/tm4c_nsh.c +++ b/nuttx/configs/tm4c1294-launchpad/src/tm4c_nsh.c @@ -39,6 +39,8 @@ #include +#include + #include "tm4c1294-launchpad.h" /**************************************************************************** @@ -50,14 +52,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { /* If CONFIG_BOARD_INITIALIZE is selected then board initialization was * already performed in board_initialize. diff --git a/nuttx/configs/twr-k60n512/src/k60_nsh.c b/nuttx/configs/twr-k60n512/src/k60_nsh.c index 91124b627..1cc9c5f51 100644 --- a/nuttx/configs/twr-k60n512/src/k60_nsh.c +++ b/nuttx/configs/twr-k60n512/src/k60_nsh.c @@ -44,6 +44,8 @@ #include #include +#include + #ifdef CONFIG_KINETIS_SDHC # include # include @@ -188,14 +190,14 @@ static int kinetis_cdinterrupt(int irq, FAR void *context) ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #ifdef NSH_HAVEMMCSD int ret; diff --git a/nuttx/configs/twr-k60n512/src/k60_usbmsc.c b/nuttx/configs/twr-k60n512/src/k60_usbmsc.c index f5421b8fa..09771c3e6 100644 --- a/nuttx/configs/twr-k60n512/src/k60_usbmsc.c +++ b/nuttx/configs/twr-k60n512/src/k60_usbmsc.c @@ -85,8 +85,8 @@ int usbmsc_archinitialize(void) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initized in nsh_archinitialize() (see up_nsh.c). In - * this case, there is nothing further to be done here. + * already have been initialized in board_app_initialize() (see k60_nsh.c). + * In this case, there is nothing further to be done here. */ #ifndef CONFIG_NSH_BUILTIN_APPS diff --git a/nuttx/configs/ubw32/src/pic32_nsh.c b/nuttx/configs/ubw32/src/pic32_nsh.c index c64d8f5b8..98190459f 100644 --- a/nuttx/configs/ubw32/src/pic32_nsh.c +++ b/nuttx/configs/ubw32/src/pic32_nsh.c @@ -42,6 +42,8 @@ #include #include +#include + #include "pic32mx-internal.h" #include "ubw32-internal.h" @@ -84,14 +86,14 @@ static int nsh_usbdevinitialize(void) ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { int ret; diff --git a/nuttx/configs/ubw32/src/pic32_usbterm.c b/nuttx/configs/ubw32/src/pic32_usbterm.c index 6279f1ef6..fbae21c54 100644 --- a/nuttx/configs/ubw32/src/pic32_usbterm.c +++ b/nuttx/configs/ubw32/src/pic32_usbterm.c @@ -76,7 +76,7 @@ int usbterm_devinit(void) * it and tell the USB driver that the USB is connected now. * * If examples/usbterm is built as an NSH built-in application, then - * pic32mx_usbattach() will be called in nsh_archinitialize(). + * pic32mx_usbattach() will be called in board_app_initialize(). */ #ifndef CONFIG_NSH_BUILTIN_APPS diff --git a/nuttx/configs/viewtool-stm32f107/src/stm32_nsh.c b/nuttx/configs/viewtool-stm32f107/src/stm32_nsh.c index 7f860e989..6d8e2b694 100644 --- a/nuttx/configs/viewtool-stm32f107/src/stm32_nsh.c +++ b/nuttx/configs/viewtool-stm32f107/src/stm32_nsh.c @@ -42,6 +42,8 @@ #include #include +#include + #include "viewtool_stm32f107.h" /**************************************************************************** @@ -68,14 +70,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #ifdef CONFIG_MPL115A stm32_mpl115ainitialize("/dev/press"); diff --git a/nuttx/configs/viewtool-stm32f107/src/stm32_usbmsc.c b/nuttx/configs/viewtool-stm32f107/src/stm32_usbmsc.c index 3df657693..fdc42433b 100644 --- a/nuttx/configs/viewtool-stm32f107/src/stm32_usbmsc.c +++ b/nuttx/configs/viewtool-stm32f107/src/stm32_usbmsc.c @@ -72,8 +72,8 @@ int usbmsc_archinitialize(void) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initialized in nsh_archinitialize() (see up_nsh.c). In - * this case, there is nothing further to be done here. + * already have been initialized in board_app_initialize() (see stm32_nsh.c). + * In this case, there is nothing further to be done here. */ #if defined(HAVE_MMCSD) && !defined(CONFIG_NSH_BUILTIN_APPS) diff --git a/nuttx/configs/zkit-arm-1769/src/lpc17_nsh.c b/nuttx/configs/zkit-arm-1769/src/lpc17_nsh.c index 0799456ff..db1b81a0a 100644 --- a/nuttx/configs/zkit-arm-1769/src/lpc17_nsh.c +++ b/nuttx/configs/zkit-arm-1769/src/lpc17_nsh.c @@ -48,8 +48,10 @@ #include #include +#include #include #include + #include "lpc17_spi.h" /**************************************************************************** @@ -133,14 +135,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nsh_archinitialize + * Name: board_app_initialize * * Description: * Perform architecture specific initialization * ****************************************************************************/ -int nsh_archinitialize(void) +int board_app_initialize(void) { #ifdef CONFIG_NSH_HAVEMMCSD FAR struct spi_dev_s *spi; @@ -151,7 +153,7 @@ int nsh_archinitialize(void) spi = lpc17_spiinitialize(CONFIG_NSH_MMCSDSPIPORTNO); if (!spi) { - message("nsh_archinitialize: Failed to initialize SPI port %d\n", + message("board_app_initialize: Failed to initialize SPI port %d\n", CONFIG_NSH_MMCSDSPIPORTNO); return -ENODEV; } @@ -164,7 +166,7 @@ int nsh_archinitialize(void) ret = mmcsd_spislotinitialize(CONFIG_NSH_MMCSDMINOR, CONFIG_NSH_MMCSDSLOTNO, spi); if (ret < 0) { - message("nsh_archinitialize: Failed to bind SPI port %d to MMC/SD slot %d: %d\n", + message("board_app_initialize: Failed to bind SPI port %d to MMC/SD slot %d: %d\n", CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO, ret); return ret; } diff --git a/nuttx/include/nuttx/board.h b/nuttx/include/nuttx/board.h index 1a9508b3b..20966e684 100644 --- a/nuttx/include/nuttx/board.h +++ b/nuttx/include/nuttx/board.h @@ -130,6 +130,20 @@ void board_initialize(void); #endif +/**************************************************************************** + * Name: board_app_initialize + * + * Description: + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface + * + *****************************************************************************/ + +#ifdef CONFIG_LIB_BOARDCTL +int board_app_initialize(void); +#endif + /**************************************************************************** * Name: board_led_initialize * -- cgit v1.2.3