From 9c0441e2daeae9d668c4cd6c13abcf863f048543 Mon Sep 17 00:00:00 2001
From: Gregory Nutt
Date: Tue, 31 Mar 2015 10:21:31 -0600
Subject: [PATCH] Rename arch_nshinitialize() to board_app_initialize()
---
Documentation/NuttShell.html | 6 +++---
configs/Kconfig | 4 ++++
configs/arduino-due/src/sam_nsh.c | 8 +++++---
configs/cc3200-launchpad/src/cc3200_boot.c | 5 +++--
configs/cloudctrl/src/stm32_nsh.c | 6 ++++--
configs/cloudctrl/src/stm32_usbmsc.c | 4 ++--
configs/demo9s12ne64/src/m9s12_nsh.c | 6 ++++--
configs/dk-tm4c129x/src/tm4c_nsh.c | 6 ++++--
configs/ea3131/src/lpc31_nsh.c | 6 ++++--
configs/ea3152/src/lpc31_nsh.c | 6 ++++--
configs/eagle100/src/lm_nsh.c | 5 +++--
configs/ekk-lm3s9b96/src/lm_nsh.c | 6 ++++--
configs/fire-stm32v2/src/stm32_composite.c | 4 ++--
configs/fire-stm32v2/src/stm32_nsh.c | 6 ++++--
configs/fire-stm32v2/src/stm32_usbmsc.c | 4 ++--
.../freedom-kl25z/src/kl_boardinitialize.c | 2 +-
configs/freedom-kl25z/src/kl_nsh.c | 6 ++++--
.../freedom-kl26z/src/kl_boardinitialize.c | 2 +-
configs/freedom-kl26z/src/kl_nsh.c | 6 ++++--
configs/hymini-stm32v/src/stm32_nsh.c | 6 ++++--
configs/hymini-stm32v/src/stm32_usbmsc.c | 4 ++--
configs/kwikstik-k40/src/k40_nsh.c | 6 ++++--
configs/kwikstik-k40/src/k40_usbmsc.c | 4 ++--
configs/lincoln60/src/lpc17_nsh.c | 5 +++--
configs/lm3s6432-s2e/src/lm_nsh.c | 5 +++--
configs/lm3s6965-ek/src/lm_nsh.c | 5 +++--
configs/lm3s8962-ek/src/lm_nsh.c | 5 +++--
configs/lm4f120-launchpad/src/lm4f_nsh.c | 5 +++--
configs/lpc4330-xplorer/src/lpc43_nsh.c | 6 ++++--
configs/lpc4357-evb/src/lpc43_nsh.c | 6 ++++--
configs/lpcxpresso-lpc1768/src/lpc17_nsh.c | 5 +++--
configs/mbed/src/lpc17_nsh.c | 5 +++--
.../mcu123-lpc214x/src/lpc2148_composite.c | 4 ++--
configs/mcu123-lpc214x/src/lpc2148_nsh.c | 5 +++--
configs/mikroe-stm32f4/src/stm32_nsh.c | 5 +++--
configs/mirtoo/src/pic32_nsh.c | 6 ++++--
configs/ne64badge/src/m9s12_nsh.c | 6 ++++--
configs/nucleo-f4x1re/src/stm32_boot.c | 2 +-
configs/nucleo-f4x1re/src/stm32_nsh.c | 5 +++--
configs/nucleus2g/src/lpc17_nsh.c | 5 +++--
configs/olimex-lpc-h3131/src/lpc31_nsh.c | 6 ++++--
configs/olimex-lpc1766stk/src/lpc17_nsh.c | 5 +++--
configs/olimex-lpc2378/src/lpc2378_nsh.c | 5 +++--
.../olimex-stm32-h405/src/olimex-stm32-h405.h | 19 -------------------
configs/olimex-stm32-h405/src/stm32_boot.c | 2 +-
configs/olimex-stm32-h405/src/stm32_nsh.c | 6 ++++--
.../olimex-stm32-p207/src/olimex-stm32-p207.h | 19 -------------------
configs/olimex-stm32-p207/src/stm32_boot.c | 2 +-
configs/olimex-stm32-p207/src/stm32_nsh.c | 6 ++++--
configs/olimex-strp711/src/str71_nsh.c | 5 +++--
configs/olimexino-stm32/src/olimexino-stm32.h | 19 -------------------
configs/olimexino-stm32/src/stm32_boot.c | 2 +-
configs/olimexino-stm32/src/stm32_composite.c | 2 +-
configs/olimexino-stm32/src/stm32_nsh.c | 5 +++--
configs/olimexino-stm32/src/stm32_usbmsc.c | 2 +-
configs/open1788/src/lpc17_boardinitialize.c | 2 +-
configs/open1788/src/lpc17_nsh.c | 5 +++--
configs/open1788/src/open1788.h | 19 -------------------
configs/pcblogic-pic32mx/src/pic32mx_nsh.c | 5 +++--
configs/pcduino-a10/src/a1x_boot.c | 2 +-
configs/pcduino-a10/src/pcduino_a10.h | 19 -------------------
configs/pic32mx-starterkit/src/pic32mx_nsh.c | 5 +++--
.../pic32mx-starterkit/src/pic32mx_usbmsc.c | 4 ++--
.../pic32mx-starterkit/src/pic32mx_usbterm.c | 2 +-
configs/pic32mx7mmb/src/pic32_nsh.c | 5 +++--
configs/pic32mx7mmb/src/pic32_usbmsc.c | 4 ++--
configs/pic32mx7mmb/src/pic32_usbterm.c | 2 +-
configs/pic32mz-starterkit/src/pic32mz_nsh.c | 6 ++++--
configs/sam3u-ek/src/sam_nsh.c | 5 +++--
configs/sam4e-ek/src/sam_boot.c | 2 +-
configs/sam4e-ek/src/sam_nsh.c | 6 ++++--
configs/sam4l-xplained/src/sam_nsh.c | 6 ++++--
configs/sam4s-xplained-pro/src/sam_nsh.c | 5 +++--
configs/sama5d3-xplained/src/sam_boot.c | 2 +-
configs/sama5d3-xplained/src/sam_nsh.c | 6 ++++--
.../sama5d3-xplained/src/sama5d3-xplained.h | 18 ------------------
configs/sama5d3x-ek/src/sam_boot.c | 2 +-
configs/sama5d3x-ek/src/sam_nsh.c | 6 ++++--
configs/sama5d3x-ek/src/sama5d3x-ek.h | 18 ------------------
configs/sama5d4-ek/src/sam_nsh.c | 6 ++++--
configs/sama5d4-ek/src/sama5d4-ek.h | 18 ------------------
configs/samd20-xplained/src/sam_nsh.c | 6 ++++--
configs/samv71-xult/src/sam_nsh.c | 6 ++++--
configs/shenzhou/src/stm32_composite.c | 4 ++--
configs/shenzhou/src/stm32_nsh.c | 6 ++++--
configs/shenzhou/src/stm32_usbmsc.c | 4 ++--
configs/spark/include/board.h | 19 -------------------
configs/spark/src/stm32_boot.c | 2 +-
configs/spark/src/stm32_composite.c | 2 +-
configs/spark/src/stm32_nsh.c | 7 ++++---
configs/stm3210e-eval/src/stm32_composite.c | 4 ++--
configs/stm3210e-eval/src/stm32_nsh.c | 6 ++++--
configs/stm3210e-eval/src/stm32_usbmsc.c | 4 ++--
configs/stm3220g-eval/src/stm32_nsh.c | 6 ++++--
configs/stm3240g-eval/src/stm3240g-eval.h | 19 -------------------
configs/stm3240g-eval/src/stm32_boot.c | 4 ++--
configs/stm3240g-eval/src/stm32_nsh.c | 6 ++++--
configs/stm32_tiny/src/stm32_nsh.c | 6 ++++--
configs/stm32f3discovery/src/stm32_nsh.c | 6 ++++--
configs/stm32f429i-disco/src/stm32_boot.c | 2 +-
configs/stm32f429i-disco/src/stm32_nsh.c | 5 +++--
.../stm32f429i-disco/src/stm32f429i-disco.h | 19 -------------------
configs/stm32f4discovery/src/stm32_nsh.c | 6 ++++--
configs/stm32ldiscovery/src/stm32_nsh.c | 5 +++--
configs/sure-pic32mx/src/pic32mx_nsh.c | 5 +++--
configs/sure-pic32mx/src/pic32mx_usbterm.c | 2 +-
configs/tm4c123g-launchpad/src/tm4c_nsh.c | 7 ++++---
configs/tm4c1294-launchpad/src/tm4c_nsh.c | 6 ++++--
configs/twr-k60n512/src/k60_nsh.c | 6 ++++--
configs/twr-k60n512/src/k60_usbmsc.c | 4 ++--
configs/ubw32/src/pic32_nsh.c | 6 ++++--
configs/ubw32/src/pic32_usbterm.c | 2 +-
configs/viewtool-stm32f107/src/stm32_nsh.c | 6 ++++--
configs/viewtool-stm32f107/src/stm32_usbmsc.c | 4 ++--
configs/zkit-arm-1769/src/lpc17_nsh.c | 10 ++++++----
include/nuttx/board.h | 14 ++++++++++++++
116 files changed, 316 insertions(+), 398 deletions(-)
diff --git a/Documentation/NuttShell.html b/Documentation/NuttShell.html
index 2f1fd333a9..ff55c0655a 100644
--- a/Documentation/NuttShell.html
+++ b/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/configs/Kconfig b/configs/Kconfig
index 746a766aff..403002594b 100644
--- a/configs/Kconfig
+++ b/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/configs/arduino-due/src/sam_nsh.c b/configs/arduino-due/src/sam_nsh.c
index e6ef08aa3c..61acc2fab7 100644
--- a/configs/arduino-due/src/sam_nsh.c
+++ b/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/configs/cc3200-launchpad/src/cc3200_boot.c b/configs/cc3200-launchpad/src/cc3200_boot.c
index 7d1e8fa5bb..af11afdc7b 100644
--- a/configs/cc3200-launchpad/src/cc3200_boot.c
+++ b/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/configs/cloudctrl/src/stm32_nsh.c b/configs/cloudctrl/src/stm32_nsh.c
index 61964d4414..7d8c7e7512 100644
--- a/configs/cloudctrl/src/stm32_nsh.c
+++ b/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/configs/cloudctrl/src/stm32_usbmsc.c b/configs/cloudctrl/src/stm32_usbmsc.c
index 15641387b9..c9ed8b897d 100644
--- a/configs/cloudctrl/src/stm32_usbmsc.c
+++ b/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/configs/demo9s12ne64/src/m9s12_nsh.c b/configs/demo9s12ne64/src/m9s12_nsh.c
index b33a933a6b..bf6b003c3f 100644
--- a/configs/demo9s12ne64/src/m9s12_nsh.c
+++ b/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/configs/dk-tm4c129x/src/tm4c_nsh.c b/configs/dk-tm4c129x/src/tm4c_nsh.c
index c78cf57e4b..25cfaa21a3 100644
--- a/configs/dk-tm4c129x/src/tm4c_nsh.c
+++ b/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/configs/ea3131/src/lpc31_nsh.c b/configs/ea3131/src/lpc31_nsh.c
index 534bd106a9..5322d3f1d0 100644
--- a/configs/ea3131/src/lpc31_nsh.c
+++ b/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/configs/ea3152/src/lpc31_nsh.c b/configs/ea3152/src/lpc31_nsh.c
index 4d3ccd5d88..a52b449276 100644
--- a/configs/ea3152/src/lpc31_nsh.c
+++ b/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/configs/eagle100/src/lm_nsh.c b/configs/eagle100/src/lm_nsh.c
index f5a0115828..7b10d950c2 100644
--- a/configs/eagle100/src/lm_nsh.c
+++ b/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/configs/ekk-lm3s9b96/src/lm_nsh.c b/configs/ekk-lm3s9b96/src/lm_nsh.c
index 9f04e3efbf..59745b5208 100644
--- a/configs/ekk-lm3s9b96/src/lm_nsh.c
+++ b/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/configs/fire-stm32v2/src/stm32_composite.c b/configs/fire-stm32v2/src/stm32_composite.c
index 6d4455b917..28912b926a 100644
--- a/configs/fire-stm32v2/src/stm32_composite.c
+++ b/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/configs/fire-stm32v2/src/stm32_nsh.c b/configs/fire-stm32v2/src/stm32_nsh.c
index a7f79b9d6b..b4dd0b8cfc 100644
--- a/configs/fire-stm32v2/src/stm32_nsh.c
+++ b/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/configs/fire-stm32v2/src/stm32_usbmsc.c b/configs/fire-stm32v2/src/stm32_usbmsc.c
index efb84bc0ce..1d34a60083 100644
--- a/configs/fire-stm32v2/src/stm32_usbmsc.c
+++ b/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/configs/freedom-kl25z/src/kl_boardinitialize.c b/configs/freedom-kl25z/src/kl_boardinitialize.c
index abe1f0114e..106ed8e9c9 100644
--- a/configs/freedom-kl25z/src/kl_boardinitialize.c
+++ b/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/configs/freedom-kl25z/src/kl_nsh.c b/configs/freedom-kl25z/src/kl_nsh.c
index a191eba534..4dd539e275 100644
--- a/configs/freedom-kl25z/src/kl_nsh.c
+++ b/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/configs/freedom-kl26z/src/kl_boardinitialize.c b/configs/freedom-kl26z/src/kl_boardinitialize.c
index a57c04b55b..fe64c7d80e 100644
--- a/configs/freedom-kl26z/src/kl_boardinitialize.c
+++ b/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/configs/freedom-kl26z/src/kl_nsh.c b/configs/freedom-kl26z/src/kl_nsh.c
index 3db0871e99..f7f1a595d4 100644
--- a/configs/freedom-kl26z/src/kl_nsh.c
+++ b/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/configs/hymini-stm32v/src/stm32_nsh.c b/configs/hymini-stm32v/src/stm32_nsh.c
index 8c903dbfc8..32ac875cae 100644
--- a/configs/hymini-stm32v/src/stm32_nsh.c
+++ b/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/configs/hymini-stm32v/src/stm32_usbmsc.c b/configs/hymini-stm32v/src/stm32_usbmsc.c
index e0fa30ccb4..94302b0f43 100644
--- a/configs/hymini-stm32v/src/stm32_usbmsc.c
+++ b/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/configs/kwikstik-k40/src/k40_nsh.c b/configs/kwikstik-k40/src/k40_nsh.c
index ec7de573d8..773647c9b1 100644
--- a/configs/kwikstik-k40/src/k40_nsh.c
+++ b/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/configs/kwikstik-k40/src/k40_usbmsc.c b/configs/kwikstik-k40/src/k40_usbmsc.c
index 1eeaad4071..c1fe39ec1d 100644
--- a/configs/kwikstik-k40/src/k40_usbmsc.c
+++ b/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/configs/lincoln60/src/lpc17_nsh.c b/configs/lincoln60/src/lpc17_nsh.c
index 041a3345a1..9ad00a0b66 100644
--- a/configs/lincoln60/src/lpc17_nsh.c
+++ b/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/configs/lm3s6432-s2e/src/lm_nsh.c b/configs/lm3s6432-s2e/src/lm_nsh.c
index 193875a104..fd4a62e597 100644
--- a/configs/lm3s6432-s2e/src/lm_nsh.c
+++ b/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/configs/lm3s6965-ek/src/lm_nsh.c b/configs/lm3s6965-ek/src/lm_nsh.c
index 47a001ae50..59855defc4 100644
--- a/configs/lm3s6965-ek/src/lm_nsh.c
+++ b/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/configs/lm3s8962-ek/src/lm_nsh.c b/configs/lm3s8962-ek/src/lm_nsh.c
index 6c4938f706..247ef834b5 100644
--- a/configs/lm3s8962-ek/src/lm_nsh.c
+++ b/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/configs/lm4f120-launchpad/src/lm4f_nsh.c b/configs/lm4f120-launchpad/src/lm4f_nsh.c
index f3eed743b5..b5b534d792 100644
--- a/configs/lm4f120-launchpad/src/lm4f_nsh.c
+++ b/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/configs/lpc4330-xplorer/src/lpc43_nsh.c b/configs/lpc4330-xplorer/src/lpc43_nsh.c
index dbad88b31e..bccc3e5bfa 100644
--- a/configs/lpc4330-xplorer/src/lpc43_nsh.c
+++ b/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/configs/lpc4357-evb/src/lpc43_nsh.c b/configs/lpc4357-evb/src/lpc43_nsh.c
index 0064ec9e52..259bb6ab4e 100644
--- a/configs/lpc4357-evb/src/lpc43_nsh.c
+++ b/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/configs/lpcxpresso-lpc1768/src/lpc17_nsh.c b/configs/lpcxpresso-lpc1768/src/lpc17_nsh.c
index 3ebc486ad0..382b7a911d 100644
--- a/configs/lpcxpresso-lpc1768/src/lpc17_nsh.c
+++ b/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/configs/mbed/src/lpc17_nsh.c b/configs/mbed/src/lpc17_nsh.c
index b8c3e90785..6bbb16d5ed 100644
--- a/configs/mbed/src/lpc17_nsh.c
+++ b/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/configs/mcu123-lpc214x/src/lpc2148_composite.c b/configs/mcu123-lpc214x/src/lpc2148_composite.c
index b6ea46f222..6bfdb0de78 100644
--- a/configs/mcu123-lpc214x/src/lpc2148_composite.c
+++ b/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/configs/mcu123-lpc214x/src/lpc2148_nsh.c b/configs/mcu123-lpc214x/src/lpc2148_nsh.c
index 37cfe5a32d..3285a835af 100644
--- a/configs/mcu123-lpc214x/src/lpc2148_nsh.c
+++ b/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/configs/mikroe-stm32f4/src/stm32_nsh.c b/configs/mikroe-stm32f4/src/stm32_nsh.c
index 086ed7b0e5..836b4273e9 100644
--- a/configs/mikroe-stm32f4/src/stm32_nsh.c
+++ b/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/configs/mirtoo/src/pic32_nsh.c b/configs/mirtoo/src/pic32_nsh.c
index 677f54fc02..6ad9752122 100644
--- a/configs/mirtoo/src/pic32_nsh.c
+++ b/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/configs/ne64badge/src/m9s12_nsh.c b/configs/ne64badge/src/m9s12_nsh.c
index 0ccc7295a2..ac7d8ebe5c 100644
--- a/configs/ne64badge/src/m9s12_nsh.c
+++ b/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/configs/nucleo-f4x1re/src/stm32_boot.c b/configs/nucleo-f4x1re/src/stm32_boot.c
index 080bc8c9f8..4738f28863 100644
--- a/configs/nucleo-f4x1re/src/stm32_boot.c
+++ b/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/configs/nucleo-f4x1re/src/stm32_nsh.c b/configs/nucleo-f4x1re/src/stm32_nsh.c
index 36337d41ab..d3cb2e5d96 100644
--- a/configs/nucleo-f4x1re/src/stm32_nsh.c
+++ b/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/configs/nucleus2g/src/lpc17_nsh.c b/configs/nucleus2g/src/lpc17_nsh.c
index 63dc234af2..f9290cce11 100644
--- a/configs/nucleus2g/src/lpc17_nsh.c
+++ b/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/configs/olimex-lpc-h3131/src/lpc31_nsh.c b/configs/olimex-lpc-h3131/src/lpc31_nsh.c
index f800a12206..e1867f4424 100644
--- a/configs/olimex-lpc-h3131/src/lpc31_nsh.c
+++ b/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/configs/olimex-lpc1766stk/src/lpc17_nsh.c b/configs/olimex-lpc1766stk/src/lpc17_nsh.c
index c72817fd83..11c0fbdf4b 100644
--- a/configs/olimex-lpc1766stk/src/lpc17_nsh.c
+++ b/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/configs/olimex-lpc2378/src/lpc2378_nsh.c b/configs/olimex-lpc2378/src/lpc2378_nsh.c
index 4b3ed84ca9..683f17aadb 100644
--- a/configs/olimex-lpc2378/src/lpc2378_nsh.c
+++ b/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/configs/olimex-stm32-h405/src/olimex-stm32-h405.h b/configs/olimex-stm32-h405/src/olimex-stm32-h405.h
index 7200f7c912..ada54f5e6d 100644
--- a/configs/olimex-stm32-h405/src/olimex-stm32-h405.h
+++ b/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/configs/olimex-stm32-h405/src/stm32_boot.c b/configs/olimex-stm32-h405/src/stm32_boot.c
index 373e3d7d5b..b70bf11c78 100644
--- a/configs/olimex-stm32-h405/src/stm32_boot.c
+++ b/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/configs/olimex-stm32-h405/src/stm32_nsh.c b/configs/olimex-stm32-h405/src/stm32_nsh.c
index d5a65abd4c..ea2867e061 100644
--- a/configs/olimex-stm32-h405/src/stm32_nsh.c
+++ b/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/configs/olimex-stm32-p207/src/olimex-stm32-p207.h b/configs/olimex-stm32-p207/src/olimex-stm32-p207.h
index 09aeacd1df..15ab0aeb58 100644
--- a/configs/olimex-stm32-p207/src/olimex-stm32-p207.h
+++ b/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/configs/olimex-stm32-p207/src/stm32_boot.c b/configs/olimex-stm32-p207/src/stm32_boot.c
index 447c85c310..6a50218b66 100644
--- a/configs/olimex-stm32-p207/src/stm32_boot.c
+++ b/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/configs/olimex-stm32-p207/src/stm32_nsh.c b/configs/olimex-stm32-p207/src/stm32_nsh.c
index 83bf35d4d7..d11e940e93 100644
--- a/configs/olimex-stm32-p207/src/stm32_nsh.c
+++ b/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/configs/olimex-strp711/src/str71_nsh.c b/configs/olimex-strp711/src/str71_nsh.c
index 993c7a2065..90f140f444 100644
--- a/configs/olimex-strp711/src/str71_nsh.c
+++ b/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/configs/olimexino-stm32/src/olimexino-stm32.h b/configs/olimexino-stm32/src/olimexino-stm32.h
index a4db2e768a..da4ab9496c 100644
--- a/configs/olimexino-stm32/src/olimexino-stm32.h
+++ b/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/configs/olimexino-stm32/src/stm32_boot.c b/configs/olimexino-stm32/src/stm32_boot.c
index de3cb31c47..2c05dfb4a3 100644
--- a/configs/olimexino-stm32/src/stm32_boot.c
+++ b/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/configs/olimexino-stm32/src/stm32_composite.c b/configs/olimexino-stm32/src/stm32_composite.c
index 9707178696..03a35c3167 100644
--- a/configs/olimexino-stm32/src/stm32_composite.c
+++ b/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/configs/olimexino-stm32/src/stm32_nsh.c b/configs/olimexino-stm32/src/stm32_nsh.c
index c439ace73b..934ff06bd0 100644
--- a/configs/olimexino-stm32/src/stm32_nsh.c
+++ b/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/configs/olimexino-stm32/src/stm32_usbmsc.c b/configs/olimexino-stm32/src/stm32_usbmsc.c
index d794d09a6f..62ce2d1e74 100644
--- a/configs/olimexino-stm32/src/stm32_usbmsc.c
+++ b/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/configs/open1788/src/lpc17_boardinitialize.c b/configs/open1788/src/lpc17_boardinitialize.c
index 2373ee684f..04c3a9eb29 100644
--- a/configs/open1788/src/lpc17_boardinitialize.c
+++ b/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/configs/open1788/src/lpc17_nsh.c b/configs/open1788/src/lpc17_nsh.c
index 9cb7570c9e..dc479a97f7 100644
--- a/configs/open1788/src/lpc17_nsh.c
+++ b/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/configs/open1788/src/open1788.h b/configs/open1788/src/open1788.h
index 7e63a44bcf..2ba7238829 100644
--- a/configs/open1788/src/open1788.h
+++ b/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/configs/pcblogic-pic32mx/src/pic32mx_nsh.c b/configs/pcblogic-pic32mx/src/pic32mx_nsh.c
index e30001ef37..e11e3cafa9 100644
--- a/configs/pcblogic-pic32mx/src/pic32mx_nsh.c
+++ b/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/configs/pcduino-a10/src/a1x_boot.c b/configs/pcduino-a10/src/a1x_boot.c
index a8dceb6e95..2f99f56af0 100644
--- a/configs/pcduino-a10/src/a1x_boot.c
+++ b/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/configs/pcduino-a10/src/pcduino_a10.h b/configs/pcduino-a10/src/pcduino_a10.h
index fc853ebcee..16dd0bc61b 100644
--- a/configs/pcduino-a10/src/pcduino_a10.h
+++ b/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/configs/pic32mx-starterkit/src/pic32mx_nsh.c b/configs/pic32mx-starterkit/src/pic32mx_nsh.c
index d092182df6..ea3b66082d 100644
--- a/configs/pic32mx-starterkit/src/pic32mx_nsh.c
+++ b/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/configs/pic32mx-starterkit/src/pic32mx_usbmsc.c b/configs/pic32mx-starterkit/src/pic32mx_usbmsc.c
index c761963040..956d97b564 100644
--- a/configs/pic32mx-starterkit/src/pic32mx_usbmsc.c
+++ b/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/configs/pic32mx-starterkit/src/pic32mx_usbterm.c b/configs/pic32mx-starterkit/src/pic32mx_usbterm.c
index 80a4ce4b5d..e86e376b31 100644
--- a/configs/pic32mx-starterkit/src/pic32mx_usbterm.c
+++ b/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/configs/pic32mx7mmb/src/pic32_nsh.c b/configs/pic32mx7mmb/src/pic32_nsh.c
index dba613e27a..452349fa50 100644
--- a/configs/pic32mx7mmb/src/pic32_nsh.c
+++ b/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/configs/pic32mx7mmb/src/pic32_usbmsc.c b/configs/pic32mx7mmb/src/pic32_usbmsc.c
index a8ed56be02..8782af012a 100644
--- a/configs/pic32mx7mmb/src/pic32_usbmsc.c
+++ b/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/configs/pic32mx7mmb/src/pic32_usbterm.c b/configs/pic32mx7mmb/src/pic32_usbterm.c
index 6860895986..9fcd22e8ed 100644
--- a/configs/pic32mx7mmb/src/pic32_usbterm.c
+++ b/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/configs/pic32mz-starterkit/src/pic32mz_nsh.c b/configs/pic32mz-starterkit/src/pic32mz_nsh.c
index 9b235d43a5..3cbc502f2d 100644
--- a/configs/pic32mz-starterkit/src/pic32mz_nsh.c
+++ b/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/configs/sam3u-ek/src/sam_nsh.c b/configs/sam3u-ek/src/sam_nsh.c
index 52da9e6d9a..74a61e6a70 100644
--- a/configs/sam3u-ek/src/sam_nsh.c
+++ b/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/configs/sam4e-ek/src/sam_boot.c b/configs/sam4e-ek/src/sam_boot.c
index 9c759b71e9..9b05f9aacf 100644
--- a/configs/sam4e-ek/src/sam_boot.c
+++ b/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/configs/sam4e-ek/src/sam_nsh.c b/configs/sam4e-ek/src/sam_nsh.c
index c567eedf03..7473288965 100644
--- a/configs/sam4e-ek/src/sam_nsh.c
+++ b/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/configs/sam4l-xplained/src/sam_nsh.c b/configs/sam4l-xplained/src/sam_nsh.c
index ac60b39cfd..58c75aa606 100644
--- a/configs/sam4l-xplained/src/sam_nsh.c
+++ b/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/configs/sam4s-xplained-pro/src/sam_nsh.c b/configs/sam4s-xplained-pro/src/sam_nsh.c
index 7353dd29dc..8c9293455f 100644
--- a/configs/sam4s-xplained-pro/src/sam_nsh.c
+++ b/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/configs/sama5d3-xplained/src/sam_boot.c b/configs/sama5d3-xplained/src/sam_boot.c
index be66c51b8c..a85cb79048 100644
--- a/configs/sama5d3-xplained/src/sam_boot.c
+++ b/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/configs/sama5d3-xplained/src/sam_nsh.c b/configs/sama5d3-xplained/src/sam_nsh.c
index 9f71b59f3d..30a84d4de6 100644
--- a/configs/sama5d3-xplained/src/sam_nsh.c
+++ b/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/configs/sama5d3-xplained/src/sama5d3-xplained.h b/configs/sama5d3-xplained/src/sama5d3-xplained.h
index 7d201888b0..42a4ed1257 100644
--- a/configs/sama5d3-xplained/src/sama5d3-xplained.h
+++ b/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/configs/sama5d3x-ek/src/sam_boot.c b/configs/sama5d3x-ek/src/sam_boot.c
index 1189ad6314..969016e0d5 100644
--- a/configs/sama5d3x-ek/src/sam_boot.c
+++ b/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/configs/sama5d3x-ek/src/sam_nsh.c b/configs/sama5d3x-ek/src/sam_nsh.c
index deaaf53d18..df2435038d 100644
--- a/configs/sama5d3x-ek/src/sam_nsh.c
+++ b/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/configs/sama5d3x-ek/src/sama5d3x-ek.h b/configs/sama5d3x-ek/src/sama5d3x-ek.h
index 2990cc5338..5b4e55da68 100644
--- a/configs/sama5d3x-ek/src/sama5d3x-ek.h
+++ b/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/configs/sama5d4-ek/src/sam_nsh.c b/configs/sama5d4-ek/src/sam_nsh.c
index 37fb344988..939655682a 100644
--- a/configs/sama5d4-ek/src/sam_nsh.c
+++ b/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/configs/sama5d4-ek/src/sama5d4-ek.h b/configs/sama5d4-ek/src/sama5d4-ek.h
index b2f03a7113..79c068ca34 100644
--- a/configs/sama5d4-ek/src/sama5d4-ek.h
+++ b/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/configs/samd20-xplained/src/sam_nsh.c b/configs/samd20-xplained/src/sam_nsh.c
index e2b69b53df..5b8356f5cc 100644
--- a/configs/samd20-xplained/src/sam_nsh.c
+++ b/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/configs/samv71-xult/src/sam_nsh.c b/configs/samv71-xult/src/sam_nsh.c
index c618200d6e..bc3668032d 100644
--- a/configs/samv71-xult/src/sam_nsh.c
+++ b/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/configs/shenzhou/src/stm32_composite.c b/configs/shenzhou/src/stm32_composite.c
index 97fe9fca79..c5c156717b 100644
--- a/configs/shenzhou/src/stm32_composite.c
+++ b/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/configs/shenzhou/src/stm32_nsh.c b/configs/shenzhou/src/stm32_nsh.c
index aebe004612..60454dccf6 100644
--- a/configs/shenzhou/src/stm32_nsh.c
+++ b/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/configs/shenzhou/src/stm32_usbmsc.c b/configs/shenzhou/src/stm32_usbmsc.c
index 6f4ea9cafd..b7ce927e9a 100644
--- a/configs/shenzhou/src/stm32_usbmsc.c
+++ b/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/configs/spark/include/board.h b/configs/spark/include/board.h
index a753766bd4..dbbbd123da 100644
--- a/configs/spark/include/board.h
+++ b/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/configs/spark/src/stm32_boot.c b/configs/spark/src/stm32_boot.c
index dc3afe1266..c1e0c0bf4b 100644
--- a/configs/spark/src/stm32_boot.c
+++ b/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/configs/spark/src/stm32_composite.c b/configs/spark/src/stm32_composite.c
index 15e4879e9d..3f48bd3046 100644
--- a/configs/spark/src/stm32_composite.c
+++ b/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/configs/spark/src/stm32_nsh.c b/configs/spark/src/stm32_nsh.c
index b9af15fcc7..1a893c6ccf 100644
--- a/configs/spark/src/stm32_nsh.c
+++ b/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/configs/stm3210e-eval/src/stm32_composite.c b/configs/stm3210e-eval/src/stm32_composite.c
index 33118ee586..60eaa5d6a8 100644
--- a/configs/stm3210e-eval/src/stm32_composite.c
+++ b/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/configs/stm3210e-eval/src/stm32_nsh.c b/configs/stm3210e-eval/src/stm32_nsh.c
index a16128bec8..5cae274d70 100644
--- a/configs/stm3210e-eval/src/stm32_nsh.c
+++ b/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/configs/stm3210e-eval/src/stm32_usbmsc.c b/configs/stm3210e-eval/src/stm32_usbmsc.c
index d5c11ba4be..045304eb76 100644
--- a/configs/stm3210e-eval/src/stm32_usbmsc.c
+++ b/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/configs/stm3220g-eval/src/stm32_nsh.c b/configs/stm3220g-eval/src/stm32_nsh.c
index f150b5cd06..010c3dd1bb 100644
--- a/configs/stm3220g-eval/src/stm32_nsh.c
+++ b/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/configs/stm3240g-eval/src/stm3240g-eval.h b/configs/stm3240g-eval/src/stm3240g-eval.h
index 845e139a6e..5c8790d0ef 100644
--- a/configs/stm3240g-eval/src/stm3240g-eval.h
+++ b/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/configs/stm3240g-eval/src/stm32_boot.c b/configs/stm3240g-eval/src/stm32_boot.c
index 47515d64e2..d6d14e50a8 100644
--- a/configs/stm3240g-eval/src/stm32_boot.c
+++ b/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/configs/stm3240g-eval/src/stm32_nsh.c b/configs/stm3240g-eval/src/stm32_nsh.c
index 963f03a213..e221b2a25e 100644
--- a/configs/stm3240g-eval/src/stm32_nsh.c
+++ b/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/configs/stm32_tiny/src/stm32_nsh.c b/configs/stm32_tiny/src/stm32_nsh.c
index 1e22dfd8ab..6b62a2d405 100644
--- a/configs/stm32_tiny/src/stm32_nsh.c
+++ b/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/configs/stm32f3discovery/src/stm32_nsh.c b/configs/stm32f3discovery/src/stm32_nsh.c
index e57934c441..6563100c56 100644
--- a/configs/stm32f3discovery/src/stm32_nsh.c
+++ b/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/configs/stm32f429i-disco/src/stm32_boot.c b/configs/stm32f429i-disco/src/stm32_boot.c
index 3615d167d4..cc72295bc3 100644
--- a/configs/stm32f429i-disco/src/stm32_boot.c
+++ b/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/configs/stm32f429i-disco/src/stm32_nsh.c b/configs/stm32f429i-disco/src/stm32_nsh.c
index 9cff689c73..13c82cfed9 100644
--- a/configs/stm32f429i-disco/src/stm32_nsh.c
+++ b/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/configs/stm32f429i-disco/src/stm32f429i-disco.h b/configs/stm32f429i-disco/src/stm32f429i-disco.h
index 9a0aaf7942..156a2d0e33 100644
--- a/configs/stm32f429i-disco/src/stm32f429i-disco.h
+++ b/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/configs/stm32f4discovery/src/stm32_nsh.c b/configs/stm32f4discovery/src/stm32_nsh.c
index 037fced44d..64dd8b248f 100644
--- a/configs/stm32f4discovery/src/stm32_nsh.c
+++ b/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/configs/stm32ldiscovery/src/stm32_nsh.c b/configs/stm32ldiscovery/src/stm32_nsh.c
index b3bc54095c..2d16664129 100644
--- a/configs/stm32ldiscovery/src/stm32_nsh.c
+++ b/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/configs/sure-pic32mx/src/pic32mx_nsh.c b/configs/sure-pic32mx/src/pic32mx_nsh.c
index 6c89c1854c..3d22edd2d1 100644
--- a/configs/sure-pic32mx/src/pic32mx_nsh.c
+++ b/configs/sure-pic32mx/src/pic32mx_nsh.c
@@ -44,6 +44,7 @@
#include
#include
+#include
#include
#include
#include