summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/ChangeLog.txt12
-rw-r--r--apps/examples/README.txt52
-rw-r--r--apps/examples/cxxtest/Kconfig11
-rw-r--r--apps/examples/cxxtest/cxxtest_main.cxx79
-rw-r--r--apps/examples/helloxx/Kconfig11
-rw-r--r--apps/examples/helloxx/helloxx_main.cxx9
-rw-r--r--apps/examples/nsh/Kconfig12
-rw-r--r--apps/examples/nsh/nsh_main.c16
-rw-r--r--nuttx/ChangeLog7
-rwxr-xr-xnuttx/arch/arm/src/kl/kl_spi.c2
-rw-r--r--nuttx/configs/mikroe-stm32f4/fulldemo/defconfig2
-rw-r--r--nuttx/configs/mikroe-stm32f4/nsh/defconfig1
-rw-r--r--nuttx/configs/mikroe-stm32f4/usbnsh/defconfig1
-rw-r--r--nuttx/configs/rgmp/x86/cxxtest/defconfig4
-rw-r--r--nuttx/configs/rgmp/x86/helloxx/defconfig4
-rw-r--r--nuttx/configs/sam4l-xplained/nsh/defconfig1
-rw-r--r--nuttx/configs/sam4s-xplained/nsh/defconfig1
-rw-r--r--nuttx/configs/stm3220g-eval/nsh/defconfig5
-rw-r--r--nuttx/configs/stm3220g-eval/nsh2/defconfig5
-rw-r--r--nuttx/configs/stm3240g-eval/nsh/defconfig5
-rw-r--r--nuttx/configs/stm3240g-eval/nsh2/defconfig5
-rw-r--r--nuttx/configs/stm32f3discovery/nsh/defconfig1
-rw-r--r--nuttx/configs/stm32f3discovery/usbnsh/defconfig1
-rw-r--r--nuttx/configs/stm32f4discovery/cxxtest/defconfig1
-rw-r--r--nuttx/configs/stm32f4discovery/nsh/defconfig1
-rw-r--r--nuttx/configs/stm32f4discovery/pm/defconfig5
-rw-r--r--nuttx/configs/stm32f4discovery/usbnsh/defconfig1
27 files changed, 218 insertions, 37 deletions
diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt
index 814d58b96..96208f250 100644
--- a/apps/ChangeLog.txt
+++ b/apps/ChangeLog.txt
@@ -579,3 +579,15 @@
(2013-6-12).
6.29 2013-xx-xx Gregory Nutt <gnutt@nuttx.org>
+
+ * apps/examples/nsh, cxxtest, and helloxx: C++ initializers should be
+ set once and, preferably, in the context of the task that uses any C++
+ statically initialized classes. These only becomes an issue is cxxtest
+ or helloxx are built as NSH builtin applications. Then you want the
+ initialization done in cxxtext or helloxx and not in NSH (and certainly
+ not twice). Added configuration options to control who does the C++
+ initialization. NSH now does not do C++ initialization be default and
+ must be configured to do otherwise. Converserly, cxxtest and helloxx
+ will do C++ initialization unless configured do otherwise (2013-6-21).
+ * apps/examples/cxxtext: Add ostream test as provided by Michael
+ (2013-6-21).
diff --git a/apps/examples/README.txt b/apps/examples/README.txt
index 8ef6b4a10..c6f31b034 100644
--- a/apps/examples/README.txt
+++ b/apps/examples/README.txt
@@ -256,14 +256,6 @@ examples/cxxtest
is not included in the NuttX source tree by default, but must be installed
(see misc/uClibc++/README.txt for installation).
- The NuttX setting that are required include:
-
- CONFIG_HAVE_CXX=y
- CONFIG_HAVE_CXXINITIALIZE=y
- CONFIG_UCLIBCXX=y
-
- Additional uClibc++ settings may be required in your build environment.
-
The uClibc++ test includes simple test of:
- iostreams,
@@ -271,6 +263,25 @@ examples/cxxtest
- RTTI, and
- Exceptions
+ Example Configuration Options
+ -----------------------------
+ CONFIG_EXAMPLES_CXXTEST=y - Eanbles the example
+ CONFIG_EXAMPLES_CXXTEST_CXXINITIALIZE=y - By default, if CONFIG_HAVE_CXX
+ and CONFIG_HAVE_CXXINITIALIZE are defined, then this example
+ will call the NuttX function to initialize static C++ constructors.
+ This option may be disabled, however, if that static initialization
+ was performed elsewhere.
+
+ Other Required Configuration Settings
+ -------------------------------------
+ Other NuttX setting that are required include:
+
+ CONFIG_HAVE_CXX=y
+ CONFIG_HAVE_CXXINITIALIZE=y
+ CONFIG_UCLIBCXX=y
+
+ Additional uClibc++ settings may be required in your build environment.
+
examples/dhcpd
^^^^^^^^^^^^^^
@@ -539,6 +550,11 @@ examples/helloxx
"built-in" that can be executed from the NSH command line.
CONFIG_EXAMPLES_HELLOXX_NOSTACKCONST - Set if the system does not
support construction of objects on the stack.
+ CONFIG_EXAMPLES_HELLOXX_CXXINITIALIZE - By default, if CONFIG_HAVE_CXX
+ and CONFIG_HAVE_CXXINITIALIZE are defined, then this example
+ will call the NuttX function to initialize static C++ constructors.
+ This option may be disabled, however, if that static initialization
+ was performed elsewhere.
Also needed:
@@ -742,17 +758,23 @@ examples/nrf24l01_term
examples/nsh
^^^^^^^^^^^^
+ Basic Configuration
+ -------------------
This directory provides an example of how to configure and use
the NuttShell (NSH) application. NSH is a simple shell
application. NSH is described in its own README located at
- apps/nshlib/README.txt
+ apps/nshlib/README.txt. This function is enabled with:
+
+ CONFIG_EXAMPLES_NSH=y
Applications using this example will need to provide an defconfig
file in the configuration directory with instruction to build
- applicationslike:
+ the NSH library like:
CONFIG_NSH_LIBRARY=y
+ Other Configuration Requirements
+ --------------------------------
NOTE: If the NSH serial console is used, then following is also
required to build the readline() library:
@@ -779,6 +801,16 @@ examples/nsh
CONFIG_STDIO_BUFFER_SIZE - Some value >= 64
CONFIG_STDIO_LINEBUFFER=y
+ C++ Support
+ -----------
+ If CONFIG_HAVE_CXX=y and CONFIG_HAVE_CXXINITIALIZE=y, then this NSH
+ example can be configured to initialize C++ constructors when it
+ is started. NSH does not use C++ and, by default, assumes that
+ constructors are initialized elsewhere. However, you can force
+ NSH to initialize constructors by setting:
+
+ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y
+
examples/nx
^^^^^^^^^^^
diff --git a/apps/examples/cxxtest/Kconfig b/apps/examples/cxxtest/Kconfig
index e8aa3d8f1..c5d73d531 100644
--- a/apps/examples/cxxtest/Kconfig
+++ b/apps/examples/cxxtest/Kconfig
@@ -11,4 +11,15 @@ config EXAMPLES_CXXTEST
Enable the C++ test program
if EXAMPLES_CXXTEST
+
+config EXAMPLES_CXXTEST_CXXINITIALIZE
+ bool "C++ Initialization"
+ default y
+ depends on HAVE_CXX && HAVE_CXXINITIALIZE
+ ---help---
+ By default, if CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE are
+ defined, then this example will call the NuttX function to
+ initialize static C++ constructors. This option may be disabled,
+ however, if that static initialization was preformed elsewhere.
+
endif
diff --git a/apps/examples/cxxtest/cxxtest_main.cxx b/apps/examples/cxxtest/cxxtest_main.cxx
index 9c2974826..5feeaf5c8 100644
--- a/apps/examples/cxxtest/cxxtest_main.cxx
+++ b/apps/examples/cxxtest/cxxtest_main.cxx
@@ -41,6 +41,8 @@
#include <nuttx/init.h>
#include <nuttx/arch.h>
+#include <cstdio>
+#include <fstream>
#include <iostream>
#include <vector>
#include <map>
@@ -52,6 +54,13 @@ using namespace std;
//***************************************************************************
// Definitions
//***************************************************************************
+// Configuration ************************************************************
+// C++ initialization requires CXX initializer support
+
+#if !defined(CONFIG_HAVE_CXX) || !defined(CONFIG_HAVE_CXXINITIALIZE)
+# warning Support for static initializers is NOT enabled
+# undef CONFIG_EXAMPLES_CXXTEST_CXXINITIALIZE
+#endif
//***************************************************************************
// Private Classes
@@ -68,7 +77,7 @@ class Extend : public Base
public:
void printExtend(void)
{
- cout << "extend" << endl;
+ std::cout << "extend" << std::endl;
}
};
@@ -81,26 +90,55 @@ public:
//***************************************************************************
//***************************************************************************
+// Name: test_ostream
+//***************************************************************************/
+
+static void test_ofstream(void)
+{
+ std::ofstream ttyOut;
+
+ std::cout << "test ofstream===========================" << std::endl;
+ std::printf("printf: Starting test_ostream\n");
+ ttyOut.open ("/dev/console");
+ if (!ttyOut.good())
+ {
+ std::printf("printf: Failed opening /dev/console\n");
+ std::cout << "cout: Failed opening /dev/console" << std::endl;
+ std::cout << " good()=" << ttyOut.good();
+ std::cout << " eof()=" << ttyOut.eof();
+ std::cout << " fail()=" << ttyOut.fail();
+ std::cout << " bad()=" << ttyOut.bad() << std::endl;
+ }
+ else
+ {
+ std::printf("printf: Successfully opened /dev/console\n");
+ std::cout << "cout: Successfully opened /dev/console" << std::endl;
+ ttyOut << "Writing this to /dev/console\n";
+ ttyOut.close();
+ }
+}
+
+//***************************************************************************
// Name: test_iostream
//***************************************************************************/
static void test_iostream(void)
{
- cout << "test iostream===========================" << endl;
- cout << "Hello, this is only a test" << endl;
- cout << "Print an int: " << 190 << endl;
- cout << "Print a char: " << 'd' << endl;
+ std::cout << "test iostream===========================" << std::endl;
+ std::cout << "Hello, this is only a test" << std::endl;
+ std::cout << "Print an int: " << 190 << std::endl;
+ std::cout << "Print a char: " << 'd' << std::endl;
#if 0
int a;
string s;
- cout << "Please type in an int:" << endl;
- cin >> a;
- cout << "You type in: " << a << endl;
- cout << "Please type in a string:" << endl;
- cin >> s;
- cout << "You type in: " << s << endl;
+ std::cout << "Please type in an int:" << std::endl;
+ std::cin >> a;
+ std::cout << "You type in: " << a << std::endl;
+ std::cout << "Please type in a string:" << std::endl;
+ std::cin >> s;
+ std::cout << "You type in: " << s << std::endl;
#endif
}
@@ -110,7 +148,7 @@ static void test_iostream(void)
static void test_stl(void)
{
- cout << "test vector=============================" << endl;
+ std::cout << "test vector=============================" << std::endl;
vector<int> v1;
assert(v1.empty());
@@ -126,7 +164,7 @@ static void test_stl(void)
v1.pop_back();
assert(v1.size() == 3);
- cout << "v1=" << v1[0] << ' ' << v1[1] << ' ' << v1[2] << endl;
+ std::cout << "v1=" << v1[0] << ' ' << v1[1] << ' ' << v1[2] << std::endl;
assert(v1[2] == 3);
vector<int> v2 = v1;
@@ -137,13 +175,13 @@ static void test_stl(void)
vector<string>::iterator it;
for (it = v3.begin(); it != v3.end(); it++)
{
- cout << *it << ' ';
+ std::cout << *it << ' ';
}
- cout << endl;
+ std::cout << std::endl;
assert(v3[1] == "World");
- cout << "test map================================" << endl;
+ std::cout << "test map================================" << std::endl;
map<int,string> m1;
m1[12] = "Hello";
@@ -158,7 +196,7 @@ static void test_stl(void)
static void test_rtti(void)
{
- cout << "test rtti===============================" << endl;
+ std::cout << "test rtti===============================" << std::endl;
Base *a = new Base();
Base *b = new Extend();
assert(a);
@@ -182,7 +220,7 @@ static void test_rtti(void)
#ifdef CONFIG_UCLIBCXX_EXCEPTION
static void test_exception(void)
{
- cout << "test exception==========================" << endl;
+ std::cout << "test exception==========================" << std::endl;
try
{
throw runtime_error("runtime error");
@@ -190,7 +228,7 @@ static void test_exception(void)
catch (runtime_error &e)
{
- cout << "Catch exception: " << e.what() << endl;
+ std::cout << "Catch exception: " << e.what() << std::endl;
}
}
#endif
@@ -210,10 +248,11 @@ extern "C"
// If C++ initialization for static constructors is supported, then do
// that first
-#ifdef CONFIG_HAVE_CXXINITIALIZE
+#ifdef CONFIG_EXAMPLES_CXXTEST_CXXINITIALIZE
up_cxxinitialize();
#endif
+ test_ofstream();
test_iostream();
test_stl();
test_rtti();
diff --git a/apps/examples/helloxx/Kconfig b/apps/examples/helloxx/Kconfig
index 336389d24..d7c22cdc9 100644
--- a/apps/examples/helloxx/Kconfig
+++ b/apps/examples/helloxx/Kconfig
@@ -10,4 +10,15 @@ config EXAMPLES_HELLOXX
Enable the \"Hello, World!\" C++ example
if EXAMPLES_HELLOXX
+
+config EXAMPLES_HELLOXX_CXXINITIALIZE
+ bool "C++ Initialization"
+ default y
+ depends on HAVE_CXX && HAVE_CXXINITIALIZE
+ ---help---
+ By default, if CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE are
+ defined, then this example will call the NuttX function to
+ initialize static C++ constructors. This option may be disabled,
+ however, if that static initialization was preformed elsewhere.
+
endif
diff --git a/apps/examples/helloxx/helloxx_main.cxx b/apps/examples/helloxx/helloxx_main.cxx
index eeca52263..27a4e2695 100644
--- a/apps/examples/helloxx/helloxx_main.cxx
+++ b/apps/examples/helloxx/helloxx_main.cxx
@@ -48,6 +48,13 @@
//***************************************************************************
// Definitions
//***************************************************************************
+// Configuration ************************************************************
+// C++ initialization requires CXX initializer support
+
+#if !defined(CONFIG_HAVE_CXX) || !defined(CONFIG_HAVE_CXXINITIALIZE)
+# undef CONFIG_EXAMPLES_HELLOXX_CXXINITIALIZE
+#endif
+
// Debug ********************************************************************
// Non-standard debug that may be enabled just for testing the constructors
@@ -135,7 +142,7 @@ extern "C"
// If C++ initialization for static constructors is supported, then do
// that first
-#ifdef CONFIG_HAVE_CXXINITIALIZE
+#ifdef CONFIG_EXAMPLES_HELLOXX_CXXINITIALIZE
up_cxxinitialize();
#endif
diff --git a/apps/examples/nsh/Kconfig b/apps/examples/nsh/Kconfig
index 309aa925e..bbb5ece01 100644
--- a/apps/examples/nsh/Kconfig
+++ b/apps/examples/nsh/Kconfig
@@ -12,4 +12,16 @@ config EXAMPLES_NSH
Enable the NuttShell (NSH) example
if EXAMPLES_NSH
+
+config EXAMPLES_NSH_CXXINITIALIZE
+ bool "C++ Initialization"
+ default n
+ depends on HAVE_CXX && HAVE_CXXINITIALIZE
+ ---help---
+ If HAVE_CXX and HAVE_CXXINITIALIZE are slected, then this NSH
+ example can be configured to initialize C++ constructors when it
+ is started. NSH does not use C++ and, by default, assumes that
+ constructors are initialized elsewhere. However, you can force
+ NSH to initialize constructors by setting this option.
+
endif
diff --git a/apps/examples/nsh/nsh_main.c b/apps/examples/nsh/nsh_main.c
index d9bfc2018..92aa58696 100644
--- a/apps/examples/nsh/nsh_main.c
+++ b/apps/examples/nsh/nsh_main.c
@@ -46,11 +46,13 @@
#include <errno.h>
#include <nuttx/arch.h>
+
#if defined(CONFIG_FS_BINFS) && (CONFIG_BUILTIN)
-#include <nuttx/binfmt/builtin.h>
+# include <nuttx/binfmt/builtin.h>
#endif
+
#if defined(CONFIG_LIBC_EXECFUNCS) && defined(CONFIG_EXECFUNCS_SYMTAB)
-#include <nuttx/binfmt/symtab.h>
+# include <nuttx/binfmt/symtab.h>
#endif
#include <apps/nsh.h>
@@ -59,6 +61,12 @@
* Pre-processor Definitions
****************************************************************************/
+/* C++ initialization requires CXX initializer support */
+
+#if !defined(CONFIG_HAVE_CXX) || !defined(CONFIG_HAVE_CXXINITIALIZE)
+# undef CONFIG_EXAMPLES_NSH_CXXINITIALIZE
+#endif
+
/* The NSH telnet console requires networking support (and TCP/IP) */
#ifndef CONFIG_NET
@@ -115,11 +123,11 @@ int nsh_main(int argc, char *argv[])
/* Call all C++ static constructors */
-#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
+#if defined(CONFIG_EXAMPLES_NSH_CXXINITIALIZE)
up_cxxinitialize();
#endif
- /* Make sure that we are using our symbol take */
+ /* Make sure that we are using our symbol table */
#if defined(CONFIG_LIBC_EXECFUNCS) && defined(CONFIG_EXECFUNCS_SYMTAB)
exec_setsymtab(CONFIG_EXECFUNCS_SYMTAB, 0);
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index e09d98bda..1b9d44224 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -5019,4 +5019,9 @@
controlling SPI-related discrete inputs and outputs. Taken from
work by Alan Carvalho de Assis (2013-6-20).
* arch/arm/src/kl/kl_dumpgpio.c: Now compiles (2013-6-20).
-
+ * configs/: Several defconfig files were changed that had
+ CONFIG_HAVE_CXXINITIALIZE=y. Because of recent changes to
+ apps/examples, these configurations may need to have
+ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y so that they behave as they did
+ before, i.e., so that C++ initializers will be called when NSH starts
+ up (2013-6-21).
diff --git a/nuttx/arch/arm/src/kl/kl_spi.c b/nuttx/arch/arm/src/kl/kl_spi.c
index 11a75cb8e..26e914ab9 100755
--- a/nuttx/arch/arm/src/kl/kl_spi.c
+++ b/nuttx/arch/arm/src/kl/kl_spi.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * arch/arm/src/kl/kl_start.c
+ * arch/arm/src/kl/kl_spi.c
*
* Copyright (C) 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
diff --git a/nuttx/configs/mikroe-stm32f4/fulldemo/defconfig b/nuttx/configs/mikroe-stm32f4/fulldemo/defconfig
index 65916181c..0815c2e02 100644
--- a/nuttx/configs/mikroe-stm32f4/fulldemo/defconfig
+++ b/nuttx/configs/mikroe-stm32f4/fulldemo/defconfig
@@ -585,6 +585,7 @@ CONFIG_NX_KBD=y
# Framed Window Borders
#
CONFIG_NXTK_BORDERWIDTH=3
+# CONFIG_NXTK_DEFAULT_BORDERCOLORS is not set
CONFIG_NXTK_BORDERCOLOR1=0x8410
CONFIG_NXTK_BORDERCOLOR2=0x4208
CONFIG_NXTK_BORDERCOLOR3=0xc618
@@ -745,6 +746,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024
# CONFIG_EXAMPLES_MOUNT is not set
# CONFIG_EXAMPLES_MTDPART is not set
CONFIG_EXAMPLES_NSH=y
+CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y
# CONFIG_EXAMPLES_NULL is not set
CONFIG_EXAMPLES_NX=y
CONFIG_EXAMPLES_NX_VPLANE=0
diff --git a/nuttx/configs/mikroe-stm32f4/nsh/defconfig b/nuttx/configs/mikroe-stm32f4/nsh/defconfig
index 864931a48..d82f9b422 100644
--- a/nuttx/configs/mikroe-stm32f4/nsh/defconfig
+++ b/nuttx/configs/mikroe-stm32f4/nsh/defconfig
@@ -591,6 +591,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024
# CONFIG_EXAMPLES_MOUNT is not set
# CONFIG_EXAMPLES_MTDPART is not set
CONFIG_EXAMPLES_NSH=y
+CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y
# CONFIG_EXAMPLES_NULL is not set
# CONFIG_EXAMPLES_NX is not set
# CONFIG_EXAMPLES_NXCONSOLE is not set
diff --git a/nuttx/configs/mikroe-stm32f4/usbnsh/defconfig b/nuttx/configs/mikroe-stm32f4/usbnsh/defconfig
index f994f94f5..c21eaaaf2 100644
--- a/nuttx/configs/mikroe-stm32f4/usbnsh/defconfig
+++ b/nuttx/configs/mikroe-stm32f4/usbnsh/defconfig
@@ -639,6 +639,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024
# CONFIG_EXAMPLES_MOUNT is not set
# CONFIG_EXAMPLES_MTDPART is not set
CONFIG_EXAMPLES_NSH=y
+CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y
# CONFIG_EXAMPLES_NULL is not set
# CONFIG_EXAMPLES_NX is not set
# CONFIG_EXAMPLES_NXCONSOLE is not set
diff --git a/nuttx/configs/rgmp/x86/cxxtest/defconfig b/nuttx/configs/rgmp/x86/cxxtest/defconfig
index 230ed41df..1a1fcf7c1 100644
--- a/nuttx/configs/rgmp/x86/cxxtest/defconfig
+++ b/nuttx/configs/rgmp/x86/cxxtest/defconfig
@@ -335,6 +335,10 @@ CONFIG_MMCSD_SPI=y
CONFIG_MTD=y
#
+# Settings for examplex/cxxtest
+CONFIG_EXAMPLES_CXXTEST_CXXINITIALIZE=y
+
+#
# Settings for examples/uip
CONFIG_EXAMPLE_UIP_IPADDR=0xc0a80a02
CONFIG_EXAMPLE_UIP_DRIPADDR=0xc0a80a01
diff --git a/nuttx/configs/rgmp/x86/helloxx/defconfig b/nuttx/configs/rgmp/x86/helloxx/defconfig
index ca0d17bf4..2de8e616e 100644
--- a/nuttx/configs/rgmp/x86/helloxx/defconfig
+++ b/nuttx/configs/rgmp/x86/helloxx/defconfig
@@ -327,6 +327,10 @@ CONFIG_NET_DHCP_LIGHT=n
CONFIG_NET_RESOLV_ENTRIES=4
#
+# Settings for examplex/helloxx
+CONFIG_EXAMPLES_HELLOXX_CXXINITIALIZE=y
+
+#
# Settings for examples/uip
CONFIG_EXAMPLE_UIP_IPADDR=0xc0a80a02
CONFIG_EXAMPLE_UIP_DRIPADDR=0xc0a80a01
diff --git a/nuttx/configs/sam4l-xplained/nsh/defconfig b/nuttx/configs/sam4l-xplained/nsh/defconfig
index 0b71223ec..f8d26d297 100644
--- a/nuttx/configs/sam4l-xplained/nsh/defconfig
+++ b/nuttx/configs/sam4l-xplained/nsh/defconfig
@@ -498,6 +498,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024
# CONFIG_EXAMPLES_MOUNT is not set
# CONFIG_EXAMPLES_NRF24L01TERM is not set
CONFIG_EXAMPLES_NSH=y
+CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y
# CONFIG_EXAMPLES_NULL is not set
# CONFIG_EXAMPLES_NX is not set
# CONFIG_EXAMPLES_NXCONSOLE is not set
diff --git a/nuttx/configs/sam4s-xplained/nsh/defconfig b/nuttx/configs/sam4s-xplained/nsh/defconfig
index e6cfc76fd..f064d3f01 100644
--- a/nuttx/configs/sam4s-xplained/nsh/defconfig
+++ b/nuttx/configs/sam4s-xplained/nsh/defconfig
@@ -481,6 +481,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024
# CONFIG_EXAMPLES_MOUNT is not set
# CONFIG_EXAMPLES_NRF24L01TERM is not set
CONFIG_EXAMPLES_NSH=y
+CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y
# CONFIG_EXAMPLES_NULL is not set
# CONFIG_EXAMPLES_NX is not set
# CONFIG_EXAMPLES_NXCONSOLE is not set
diff --git a/nuttx/configs/stm3220g-eval/nsh/defconfig b/nuttx/configs/stm3220g-eval/nsh/defconfig
index a9aab627c..10fb2d197 100644
--- a/nuttx/configs/stm3220g-eval/nsh/defconfig
+++ b/nuttx/configs/stm3220g-eval/nsh/defconfig
@@ -707,6 +707,11 @@ CONFIG_NSH_MMCSDSLOTNO=0
CONFIG_NSH_MMCSDMINOR=0
#
+# Settings for examples/nsh
+#
+CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y
+
+#
# I2C tool settings
#
CONFIG_I2CTOOL_MINBUS=1
diff --git a/nuttx/configs/stm3220g-eval/nsh2/defconfig b/nuttx/configs/stm3220g-eval/nsh2/defconfig
index 670c0840c..14ce08821 100644
--- a/nuttx/configs/stm3220g-eval/nsh2/defconfig
+++ b/nuttx/configs/stm3220g-eval/nsh2/defconfig
@@ -694,6 +694,11 @@ CONFIG_NSH_MMCSDSLOTNO=0
CONFIG_NSH_MMCSDMINOR=0
#
+# Settings for examples/nsh
+#
+CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y
+
+#
# I2C tool settings
#
CONFIG_I2CTOOL_MINBUS=1
diff --git a/nuttx/configs/stm3240g-eval/nsh/defconfig b/nuttx/configs/stm3240g-eval/nsh/defconfig
index a53a736c5..a9b07f119 100644
--- a/nuttx/configs/stm3240g-eval/nsh/defconfig
+++ b/nuttx/configs/stm3240g-eval/nsh/defconfig
@@ -707,6 +707,11 @@ CONFIG_NSH_MMCSDSLOTNO=0
CONFIG_NSH_MMCSDMINOR=0
#
+# Settings for examples/nsh
+#
+CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y
+
+#
# I2C tool settings
#
CONFIG_I2CTOOL_MINBUS=1
diff --git a/nuttx/configs/stm3240g-eval/nsh2/defconfig b/nuttx/configs/stm3240g-eval/nsh2/defconfig
index 2b32ee16b..9a7731d0b 100644
--- a/nuttx/configs/stm3240g-eval/nsh2/defconfig
+++ b/nuttx/configs/stm3240g-eval/nsh2/defconfig
@@ -654,6 +654,11 @@ CONFIG_NSH_MMCSDSLOTNO=0
CONFIG_NSH_MMCSDMINOR=0
#
+# Settings for examples/nsh
+#
+CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y
+
+#
# I2C tool settings
#
CONFIG_I2CTOOL_MINBUS=1
diff --git a/nuttx/configs/stm32f3discovery/nsh/defconfig b/nuttx/configs/stm32f3discovery/nsh/defconfig
index 629aff46e..35585bdc7 100644
--- a/nuttx/configs/stm32f3discovery/nsh/defconfig
+++ b/nuttx/configs/stm32f3discovery/nsh/defconfig
@@ -548,6 +548,7 @@ CONFIG_EXAMPLES_CDCACM=y
# CONFIG_EXAMPLES_MOUNT is not set
# CONFIG_EXAMPLES_MODBUS is not set
CONFIG_EXAMPLES_NSH=y
+CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y
# CONFIG_EXAMPLES_NULL is not set
# CONFIG_EXAMPLES_NX is not set
# CONFIG_EXAMPLES_NXCONSOLE is not set
diff --git a/nuttx/configs/stm32f3discovery/usbnsh/defconfig b/nuttx/configs/stm32f3discovery/usbnsh/defconfig
index 3b25c0ff7..79e2e3e28 100644
--- a/nuttx/configs/stm32f3discovery/usbnsh/defconfig
+++ b/nuttx/configs/stm32f3discovery/usbnsh/defconfig
@@ -613,6 +613,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024
# CONFIG_EXAMPLES_MODBUS is not set
# CONFIG_EXAMPLES_MOUNT is not set
CONFIG_EXAMPLES_NSH=y
+CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y
# CONFIG_EXAMPLES_NULL is not set
# CONFIG_EXAMPLES_NX is not set
# CONFIG_EXAMPLES_NXCONSOLE is not set
diff --git a/nuttx/configs/stm32f4discovery/cxxtest/defconfig b/nuttx/configs/stm32f4discovery/cxxtest/defconfig
index d95d2943a..30918838a 100644
--- a/nuttx/configs/stm32f4discovery/cxxtest/defconfig
+++ b/nuttx/configs/stm32f4discovery/cxxtest/defconfig
@@ -436,6 +436,7 @@ CONFIG_UCLIBCXX_HAVE_LIBSUPCXX=y
# CONFIG_EXAMPLES_CDCACM is not set
# CONFIG_EXAMPLES_COMPOSITE is not set
CONFIG_EXAMPLES_CXXTEST=y
+CONFIG_EXAMPLES_CXXTEST_CXXINITIALIZE=y
# CONFIG_EXAMPLES_DHCPD is not set
# CONFIG_EXAMPLES_ELF is not set
# CONFIG_EXAMPLES_FTPC is not set
diff --git a/nuttx/configs/stm32f4discovery/nsh/defconfig b/nuttx/configs/stm32f4discovery/nsh/defconfig
index d5de83c65..fa380f206 100644
--- a/nuttx/configs/stm32f4discovery/nsh/defconfig
+++ b/nuttx/configs/stm32f4discovery/nsh/defconfig
@@ -547,6 +547,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024
# CONFIG_EXAMPLES_MOUNT is not set
# CONFIG_EXAMPLES_MODBUS is not set
CONFIG_EXAMPLES_NSH=y
+CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y
# CONFIG_EXAMPLES_NULL is not set
# CONFIG_EXAMPLES_NX is not set
# CONFIG_EXAMPLES_NXCONSOLE is not set
diff --git a/nuttx/configs/stm32f4discovery/pm/defconfig b/nuttx/configs/stm32f4discovery/pm/defconfig
index 5e3904365..f7e4abf0d 100644
--- a/nuttx/configs/stm32f4discovery/pm/defconfig
+++ b/nuttx/configs/stm32f4discovery/pm/defconfig
@@ -666,6 +666,11 @@ CONFIG_NSH_MMCSDSLOTNO=0
CONFIG_NSH_MMCSDMINOR=0
#
+# Settings for examples/nsh
+#
+CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y
+
+#
# Settings for examples/usbserial
#
CONFIG_EXAMPLES_USBSERIAL_INONLY=n
diff --git a/nuttx/configs/stm32f4discovery/usbnsh/defconfig b/nuttx/configs/stm32f4discovery/usbnsh/defconfig
index 198a2627b..4e6e64f35 100644
--- a/nuttx/configs/stm32f4discovery/usbnsh/defconfig
+++ b/nuttx/configs/stm32f4discovery/usbnsh/defconfig
@@ -561,6 +561,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024
# CONFIG_EXAMPLES_MOUNT is not set
# CONFIG_EXAMPLES_MODBUS is not set
CONFIG_EXAMPLES_NSH=y
+CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y
# CONFIG_EXAMPLES_NULL is not set
# CONFIG_EXAMPLES_NX is not set
# CONFIG_EXAMPLES_NXCONSOLE is not set