From add0a6799538cbfcfb8add9d7df5e32a6662c797 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 21 Jun 2013 09:32:57 -0600 Subject: [PATCH] Straighten out issues about who calls C++ initializers with CXXTEST or HELLOXX are built as NSH applications; Add an ofstream test to CXXTEST suggested by Michael; Update many defconfig fiels to that they set configurations to handle C++ constructors just as before these configuration changes --- ChangeLog | 7 ++++++- arch/arm/src/kl/kl_spi.c | 2 +- configs/mikroe-stm32f4/fulldemo/defconfig | 2 ++ configs/mikroe-stm32f4/nsh/defconfig | 1 + configs/mikroe-stm32f4/usbnsh/defconfig | 1 + configs/rgmp/x86/cxxtest/defconfig | 4 ++++ configs/rgmp/x86/helloxx/defconfig | 4 ++++ configs/sam4l-xplained/nsh/defconfig | 1 + configs/sam4s-xplained/nsh/defconfig | 1 + configs/stm3220g-eval/nsh/defconfig | 5 +++++ configs/stm3220g-eval/nsh2/defconfig | 5 +++++ configs/stm3240g-eval/nsh/defconfig | 5 +++++ configs/stm3240g-eval/nsh2/defconfig | 5 +++++ configs/stm32f3discovery/nsh/defconfig | 1 + configs/stm32f3discovery/usbnsh/defconfig | 1 + configs/stm32f4discovery/cxxtest/defconfig | 1 + configs/stm32f4discovery/nsh/defconfig | 1 + configs/stm32f4discovery/pm/defconfig | 5 +++++ configs/stm32f4discovery/usbnsh/defconfig | 1 + 19 files changed, 51 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e09d98bdad..1b9d44224e 100644 --- a/ChangeLog +++ b/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/arch/arm/src/kl/kl_spi.c b/arch/arm/src/kl/kl_spi.c index 11a75cb8e4..26e914ab91 100755 --- a/arch/arm/src/kl/kl_spi.c +++ b/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 diff --git a/configs/mikroe-stm32f4/fulldemo/defconfig b/configs/mikroe-stm32f4/fulldemo/defconfig index 65916181c0..0815c2e029 100644 --- a/configs/mikroe-stm32f4/fulldemo/defconfig +++ b/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/configs/mikroe-stm32f4/nsh/defconfig b/configs/mikroe-stm32f4/nsh/defconfig index 864931a487..d82f9b4223 100644 --- a/configs/mikroe-stm32f4/nsh/defconfig +++ b/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/configs/mikroe-stm32f4/usbnsh/defconfig b/configs/mikroe-stm32f4/usbnsh/defconfig index f994f94f54..c21eaaaf24 100644 --- a/configs/mikroe-stm32f4/usbnsh/defconfig +++ b/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/configs/rgmp/x86/cxxtest/defconfig b/configs/rgmp/x86/cxxtest/defconfig index 230ed41df4..1a1fcf7c15 100644 --- a/configs/rgmp/x86/cxxtest/defconfig +++ b/configs/rgmp/x86/cxxtest/defconfig @@ -334,6 +334,10 @@ CONFIG_MMCSD=y 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 diff --git a/configs/rgmp/x86/helloxx/defconfig b/configs/rgmp/x86/helloxx/defconfig index ca0d17bf4a..2de8e616ea 100644 --- a/configs/rgmp/x86/helloxx/defconfig +++ b/configs/rgmp/x86/helloxx/defconfig @@ -326,6 +326,10 @@ CONFIG_NET_BROADCAST=n 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 diff --git a/configs/sam4l-xplained/nsh/defconfig b/configs/sam4l-xplained/nsh/defconfig index 0b71223ec2..f8d26d297a 100644 --- a/configs/sam4l-xplained/nsh/defconfig +++ b/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/configs/sam4s-xplained/nsh/defconfig b/configs/sam4s-xplained/nsh/defconfig index e6cfc76fd4..f064d3f014 100644 --- a/configs/sam4s-xplained/nsh/defconfig +++ b/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/configs/stm3220g-eval/nsh/defconfig b/configs/stm3220g-eval/nsh/defconfig index a9aab627c4..10fb2d197e 100644 --- a/configs/stm3220g-eval/nsh/defconfig +++ b/configs/stm3220g-eval/nsh/defconfig @@ -706,6 +706,11 @@ CONFIG_NSH_MMCSDSPIPORTNO=0 CONFIG_NSH_MMCSDSLOTNO=0 CONFIG_NSH_MMCSDMINOR=0 +# +# Settings for examples/nsh +# +CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y + # # I2C tool settings # diff --git a/configs/stm3220g-eval/nsh2/defconfig b/configs/stm3220g-eval/nsh2/defconfig index 670c0840cf..14ce08821b 100644 --- a/configs/stm3220g-eval/nsh2/defconfig +++ b/configs/stm3220g-eval/nsh2/defconfig @@ -693,6 +693,11 @@ CONFIG_NSH_MMCSDSPIPORTNO=0 CONFIG_NSH_MMCSDSLOTNO=0 CONFIG_NSH_MMCSDMINOR=0 +# +# Settings for examples/nsh +# +CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y + # # I2C tool settings # diff --git a/configs/stm3240g-eval/nsh/defconfig b/configs/stm3240g-eval/nsh/defconfig index a53a736c52..a9b07f1192 100644 --- a/configs/stm3240g-eval/nsh/defconfig +++ b/configs/stm3240g-eval/nsh/defconfig @@ -706,6 +706,11 @@ CONFIG_NSH_MMCSDSPIPORTNO=0 CONFIG_NSH_MMCSDSLOTNO=0 CONFIG_NSH_MMCSDMINOR=0 +# +# Settings for examples/nsh +# +CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y + # # I2C tool settings # diff --git a/configs/stm3240g-eval/nsh2/defconfig b/configs/stm3240g-eval/nsh2/defconfig index 2b32ee16b4..9a7731d0b0 100644 --- a/configs/stm3240g-eval/nsh2/defconfig +++ b/configs/stm3240g-eval/nsh2/defconfig @@ -653,6 +653,11 @@ CONFIG_NSH_MMCSDSPIPORTNO=0 CONFIG_NSH_MMCSDSLOTNO=0 CONFIG_NSH_MMCSDMINOR=0 +# +# Settings for examples/nsh +# +CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y + # # I2C tool settings # diff --git a/configs/stm32f3discovery/nsh/defconfig b/configs/stm32f3discovery/nsh/defconfig index 629aff46ee..35585bdc73 100644 --- a/configs/stm32f3discovery/nsh/defconfig +++ b/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/configs/stm32f3discovery/usbnsh/defconfig b/configs/stm32f3discovery/usbnsh/defconfig index 3b25c0ff70..79e2e3e28a 100644 --- a/configs/stm32f3discovery/usbnsh/defconfig +++ b/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/configs/stm32f4discovery/cxxtest/defconfig b/configs/stm32f4discovery/cxxtest/defconfig index d95d2943af..30918838a6 100644 --- a/configs/stm32f4discovery/cxxtest/defconfig +++ b/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/configs/stm32f4discovery/nsh/defconfig b/configs/stm32f4discovery/nsh/defconfig index d5de83c65e..fa380f206d 100644 --- a/configs/stm32f4discovery/nsh/defconfig +++ b/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/configs/stm32f4discovery/pm/defconfig b/configs/stm32f4discovery/pm/defconfig index 5e39043650..f7e4abf0df 100644 --- a/configs/stm32f4discovery/pm/defconfig +++ b/configs/stm32f4discovery/pm/defconfig @@ -665,6 +665,11 @@ CONFIG_NSH_MMCSDSPIPORTNO=0 CONFIG_NSH_MMCSDSLOTNO=0 CONFIG_NSH_MMCSDMINOR=0 +# +# Settings for examples/nsh +# +CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y + # # Settings for examples/usbserial # diff --git a/configs/stm32f4discovery/usbnsh/defconfig b/configs/stm32f4discovery/usbnsh/defconfig index 198a2627b2..4e6e64f356 100644 --- a/configs/stm32f4discovery/usbnsh/defconfig +++ b/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