diff --git a/platform/Kconfig b/platform/Kconfig index 844dcc939..c3baac940 100644 --- a/platform/Kconfig +++ b/platform/Kconfig @@ -16,6 +16,7 @@ config PLATFORM_CONFIGDATA volatile storage can be used: A file, EEPROM, hardcoded values in FLASH, etc. +source "$APPSDIR/platform/gnu/Kconfig" source "$APPSDIR/platform/board/Kconfig" endmenu # Platform-specific Support diff --git a/platform/Makefile b/platform/Makefile index d41e1c40c..15edd09c9 100644 --- a/platform/Makefile +++ b/platform/Makefile @@ -1,7 +1,7 @@ ############################################################################ # apps/platform/Makefile # -# Copyright (C) 2013-2014, 2016 Gregory Nutt. All rights reserved. +# Copyright (C) 2013-2014, 2016-2017 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -60,6 +60,7 @@ endif # Directories +GNUDIR = gnu PLATFORMDIR = board DUMMYDIR = $(APPDIR)$(DELIM)platform$(DELIM)dummy @@ -71,12 +72,14 @@ else endif VPATH = board +DEPPATH = --dep-path $(PLATFORMDIR) # Binaries ASRCS = CSRCS = +-include $(GNUDIR)$(DELIM)Make.defs -include $(PLATFORMDIR)$(DELIM)Make.defs AOBJS = $(patsubst %.S, bin$(DELIM)%$(OBJEXT), $(ASRCS)) diff --git a/platform/arduino-due/Kconfig b/platform/arduino-due/Kconfig deleted file mode 100644 index 40c120cd2..000000000 --- a/platform/arduino-due/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_ARDUINO_DUE - -endif diff --git a/platform/arduino-due/Make.defs b/platform/arduino-due/Make.defs deleted file mode 100644 index 4e6a28c53..000000000 --- a/platform/arduino-due/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/arduino-due/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += sam_cxxinitialize.c -endif diff --git a/platform/arduino-due/sam_cxxinitialize.c b/platform/arduino-due/sam_cxxinitialize.c deleted file mode 100644 index 0342c03f7..000000000 --- a/platform/arduino-due/sam_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/arduino-due/src/sam_cxxinitialize.c - * - * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/bambino-200e/Kconfig b/platform/bambino-200e/Kconfig deleted file mode 100644 index 12ce8d77f..000000000 --- a/platform/bambino-200e/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_BAMBINO_200E - -endif diff --git a/platform/bambino-200e/Make.defs b/platform/bambino-200e/Make.defs deleted file mode 100644 index e182bbd54..000000000 --- a/platform/bambino-200e/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/lpc4330-bambino/Make.defs -# -# Copyright (C) 2015 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += lpc43_cxxinitialize.c -endif diff --git a/platform/bambino-200e/lpc43_cxxinitialize.c b/platform/bambino-200e/lpc43_cxxinitialize.c deleted file mode 100644 index 0bdc076be..000000000 --- a/platform/bambino-200e/lpc43_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/lpc4330-bambino/src/lpc43_cxxinitialize.c - * - * Copyright (C) 2012, 2015 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/clicker2-stm32/Kconfig b/platform/clicker2-stm32/Kconfig deleted file mode 100644 index fe7668d0c..000000000 --- a/platform/clicker2-stm32/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_CLICKER2_STM32 - -endif diff --git a/platform/clicker2-stm32/Make.defs b/platform/clicker2-stm32/Make.defs deleted file mode 100644 index 5f338d50b..000000000 --- a/platform/clicker2-stm32/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/clicker2-stm32/Make.defs -# -# Copyright (C) 2017 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += stm32_cxxinitialize.c -endif diff --git a/platform/cloudctrl/Kconfig b/platform/cloudctrl/Kconfig deleted file mode 100644 index 7008de2c6..000000000 --- a/platform/cloudctrl/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_CLOUDCTRL - -endif diff --git a/platform/cloudctrl/Make.defs b/platform/cloudctrl/Make.defs deleted file mode 100644 index b8581a986..000000000 --- a/platform/cloudctrl/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/cloudctrl/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += stm32_cxxinitialize.c -endif diff --git a/platform/cloudctrl/stm32_cxxinitialize.c b/platform/cloudctrl/stm32_cxxinitialize.c deleted file mode 100644 index e34c8aeec..000000000 --- a/platform/cloudctrl/stm32_cxxinitialize.c +++ /dev/null @@ -1,135 +0,0 @@ -/**************************************************************************** - * apps/platform/cloudctrl/src/stm32_cxxinitialize.c - * - * Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * Darcy Gong - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/esp32-core/Kconfig b/platform/esp32-core/Kconfig deleted file mode 100644 index 711b4c108..000000000 --- a/platform/esp32-core/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_ESP32CORE - -endif diff --git a/platform/esp32-core/Make.defs b/platform/esp32-core/Make.defs deleted file mode 100644 index f5a65c5c7..000000000 --- a/platform/esp32-core/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/esp32-core/Make.defs -# -# Copyright (C) 2015 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += esp32_cxxinitialize.c -endif diff --git a/platform/esp32-core/esp32_cxxinitialize.c b/platform/esp32-core/esp32_cxxinitialize.c deleted file mode 100644 index b491a9742..000000000 --- a/platform/esp32-core/esp32_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/esp32-core/src/esp32_cxxinitialize.c - * - * Copyright (C) 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/fire-stm32v2/Kconfig b/platform/fire-stm32v2/Kconfig deleted file mode 100644 index f824837b5..000000000 --- a/platform/fire-stm32v2/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_FIRE_STM32 - -endif diff --git a/platform/fire-stm32v2/Make.defs b/platform/fire-stm32v2/Make.defs deleted file mode 100644 index cf2f7dcd4..000000000 --- a/platform/fire-stm32v2/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/fire-stm32v2/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += stm32_cxxinitialize.c -endif diff --git a/platform/fire-stm32v2/stm32_cxxinitialize.c b/platform/fire-stm32v2/stm32_cxxinitialize.c deleted file mode 100644 index 31f334f10..000000000 --- a/platform/fire-stm32v2/stm32_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/fire-stm32v2/src/stm32_cxxinitialize.c - * - * Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/spark/Kconfig b/platform/gnu/Kconfig similarity index 83% rename from platform/spark/Kconfig rename to platform/gnu/Kconfig index 1bb68526f..18c7905ae 100644 --- a/platform/spark/Kconfig +++ b/platform/gnu/Kconfig @@ -3,6 +3,3 @@ # see the file kconfig-language.txt in the NuttX tools repository. # -if ARCH_BOARD_SPARK - -endif diff --git a/platform/nucleo-f334r8/Make.defs b/platform/gnu/Make.defs similarity index 84% rename from platform/nucleo-f334r8/Make.defs rename to platform/gnu/Make.defs index c32fc5d9d..65d7b0fff 100644 --- a/platform/nucleo-f334r8/Make.defs +++ b/platform/gnu/Make.defs @@ -1,5 +1,5 @@ ############################################################################ -# apps/platform/nucleo-f334r8/Make.defs +# apps/platform/gnu/Make.defs # # Copyright (C) 2017 Gregory Nutt. All rights reserved. # Author: Gregory Nutt @@ -33,8 +33,19 @@ # ############################################################################ -# Add platform specific sources to ASRCS and CSRCS +# Check for a GNU toolchain -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += stm32_cxxinitialize.c +ifeq ($(CONFIG_ARCH_TOOLCHAIN_GNU),y) + +# Add GNU specific sources to ASRCS and CSRCS + +ifeq ($(CONFIG_HAVE_CXXINITIALIZE),y) +CSRCS += gnu_cxxinitialize.c endif + +# Add the gnu/ sub-directory to the build + +VPATH += :gnu +DEPPATH += --dep-path gnu + +endif # CONFIG_ARCH_TOOLCHAIN_GNU diff --git a/platform/clicker2-stm32/stm32_cxxinitialize.c b/platform/gnu/gnu_cxxinitialize.c similarity index 98% rename from platform/clicker2-stm32/stm32_cxxinitialize.c rename to platform/gnu/gnu_cxxinitialize.c index 8758d63f9..7f1cbe6ab 100644 --- a/platform/clicker2-stm32/stm32_cxxinitialize.c +++ b/platform/gnu/gnu_cxxinitialize.c @@ -1,5 +1,5 @@ /**************************************************************************** - * apps/platform/clicker2-stm32/src/stm32_cxxinitialize.c + * apps/platform/gnu/gnu_cxxinitialize.c * * Copyright (C) 2017 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/platform/mikroe-stm32f4/Make.defs b/platform/mikroe-stm32f4/Make.defs index 9a9eee1b9..4a4745942 100644 --- a/platform/mikroe-stm32f4/Make.defs +++ b/platform/mikroe-stm32f4/Make.defs @@ -35,9 +35,5 @@ # Add platform specific sources to ASRCS and CSRCS -# ASRCS += xyz.S CSRCS += mikroe_configdata.c -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += stm32_cxxinitialize.c -endif diff --git a/platform/mikroe-stm32f4/stm32_cxxinitialize.c b/platform/mikroe-stm32f4/stm32_cxxinitialize.c deleted file mode 100644 index 1b4bd9be7..000000000 --- a/platform/mikroe-stm32f4/stm32_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/mikroe_stm32f4/src/stm32_cxxinitialize.c - * - * Copyright (C) 2012-2013, 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/nucleo-144/Kconfig b/platform/nucleo-144/Kconfig deleted file mode 100644 index 1c908b89f..000000000 --- a/platform/nucleo-144/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_NUCLEO_144 - -endif diff --git a/platform/nucleo-144/Make.defs b/platform/nucleo-144/Make.defs deleted file mode 100644 index 1a2218dd0..000000000 --- a/platform/nucleo-144/Make.defs +++ /dev/null @@ -1,41 +0,0 @@ -############################################################################ -# apps/platform/nucleo-144/Make.defs -# -# Copyright (C) 2015 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# Author: Mark Olsson -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += stm32_cxxinitialize.c -endif diff --git a/platform/nucleo-144/stm32_cxxinitialize.c b/platform/nucleo-144/stm32_cxxinitialize.c deleted file mode 100644 index 8a60c2cb0..000000000 --- a/platform/nucleo-144/stm32_cxxinitialize.c +++ /dev/null @@ -1,135 +0,0 @@ -/**************************************************************************** - * apps/platform/nucleo-144/stm32_cxxinitialize.c - * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * Author: Mark Olsson - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/nucleo-f303re/Kconfig b/platform/nucleo-f303re/Kconfig deleted file mode 100644 index 22555e64e..000000000 --- a/platform/nucleo-f303re/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_NUCLEO_F303RE - -endif diff --git a/platform/nucleo-f303re/Make.defs b/platform/nucleo-f303re/Make.defs deleted file mode 100644 index eb28c145e..000000000 --- a/platform/nucleo-f303re/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/nucleo-f303re/Make.defs -# -# Copyright (C) 2015 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += stm32_cxxinitialize.c -endif diff --git a/platform/nucleo-f303re/stm32_cxxinitialize.c b/platform/nucleo-f303re/stm32_cxxinitialize.c deleted file mode 100644 index f414f3c45..000000000 --- a/platform/nucleo-f303re/stm32_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/nucleo-f303re/stm32_cxxinitialize.c - * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/nucleo-f334r8/Kconfig b/platform/nucleo-f334r8/Kconfig deleted file mode 100644 index e9018b63a..000000000 --- a/platform/nucleo-f334r8/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_NUCLEO_F334R8 - -endif diff --git a/platform/nucleo-f334r8/stm32_cxxinitialize.c b/platform/nucleo-f334r8/stm32_cxxinitialize.c deleted file mode 100644 index 7835663d6..000000000 --- a/platform/nucleo-f334r8/stm32_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/nucleo-f334r8/stm32_cxxinitialize.c - * - * Copyright (C) 2017 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/nucleo-f4x1re/Kconfig b/platform/nucleo-f4x1re/Kconfig deleted file mode 100644 index 1cad9df85..000000000 --- a/platform/nucleo-f4x1re/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_NUCLEO_F401RE || ARCH_BOARD_NUCLEO_F411RE - -endif diff --git a/platform/nucleo-f4x1re/Make.defs b/platform/nucleo-f4x1re/Make.defs deleted file mode 100644 index 02fb7dfe3..000000000 --- a/platform/nucleo-f4x1re/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/nucleo-f4x1re/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += stm32_cxxinitialize.c -endif diff --git a/platform/nucleo-f4x1re/stm32_cxxinitialize.c b/platform/nucleo-f4x1re/stm32_cxxinitialize.c deleted file mode 100644 index 292f708c0..000000000 --- a/platform/nucleo-f4x1re/stm32_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/nucleo-f4x1re/src/stm32_cxxinitialize.c - * - * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/nucleo-l452re/Kconfig b/platform/nucleo-l452re/Kconfig deleted file mode 100644 index e0e29ca22..000000000 --- a/platform/nucleo-l452re/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_NUCLEO_L452RE - -endif diff --git a/platform/nucleo-l452re/Make.defs b/platform/nucleo-l452re/Make.defs deleted file mode 100644 index 126924479..000000000 --- a/platform/nucleo-l452re/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/nucleo-l452re/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += stm32_cxxinitialize.c -endif diff --git a/platform/nucleo-l452re/stm32_cxxinitialize.c b/platform/nucleo-l452re/stm32_cxxinitialize.c deleted file mode 100644 index ee5218d21..000000000 --- a/platform/nucleo-l452re/stm32_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/nucleo-l452re/stm32_cxxinitialize.c - * - * Copyright (C) 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/nucleo-l476rg/Kconfig b/platform/nucleo-l476rg/Kconfig deleted file mode 100644 index 33619ff06..000000000 --- a/platform/nucleo-l476rg/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_NUCLEO_L476RG - -endif diff --git a/platform/nucleo-l476rg/Make.defs b/platform/nucleo-l476rg/Make.defs deleted file mode 100644 index fca3c15f0..000000000 --- a/platform/nucleo-l476rg/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/nucleo-l476rg/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += stm32_cxxinitialize.c -endif diff --git a/platform/nucleo-l476rg/stm32_cxxinitialize.c b/platform/nucleo-l476rg/stm32_cxxinitialize.c deleted file mode 100644 index 2dd722ba4..000000000 --- a/platform/nucleo-l476rg/stm32_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/nucleo-l476rg/src/stm32_cxxinitialize.c - * - * Copyright (C) 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/nucleo-l496zg/Kconfig b/platform/nucleo-l496zg/Kconfig deleted file mode 100644 index 77dd12bce..000000000 --- a/platform/nucleo-l496zg/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_NUCLEO_L496ZG - -endif diff --git a/platform/nucleo-l496zg/Make.defs b/platform/nucleo-l496zg/Make.defs deleted file mode 100644 index cb62c7489..000000000 --- a/platform/nucleo-l496zg/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/nucleo-l496zg/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += stm32_cxxinitialize.c -endif diff --git a/platform/nucleo-l496zg/stm32_cxxinitialize.c b/platform/nucleo-l496zg/stm32_cxxinitialize.c deleted file mode 100644 index a8fe11015..000000000 --- a/platform/nucleo-l496zg/stm32_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/nucleo-l496zg/stm32_cxxinitialize.c - * - * Copyright (C) 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/olimex-stm32-e407/Kconfig b/platform/olimex-stm32-e407/Kconfig deleted file mode 100644 index 7e553c543..000000000 --- a/platform/olimex-stm32-e407/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_OLIMEX_STM32E407 - -endif diff --git a/platform/olimex-stm32-e407/Make.defs b/platform/olimex-stm32-e407/Make.defs deleted file mode 100644 index a4f408467..000000000 --- a/platform/olimex-stm32-e407/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/olimex-stm32-e407/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += stm32_cxxinitialize.c -endif diff --git a/platform/olimex-stm32-e407/stm32_cxxinitialize.c b/platform/olimex-stm32-e407/stm32_cxxinitialize.c deleted file mode 100644 index e83449a05..000000000 --- a/platform/olimex-stm32-e407/stm32_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/olimex-stm32-e407/src/stm32_cxxinitialize.c - * - * Copyright (C) 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/olimex-stm32-h405/Kconfig b/platform/olimex-stm32-h405/Kconfig deleted file mode 100644 index 40b1e933c..000000000 --- a/platform/olimex-stm32-h405/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_OLIMEX_STM32H405 - -endif diff --git a/platform/olimex-stm32-h405/Make.defs b/platform/olimex-stm32-h405/Make.defs deleted file mode 100644 index 602e5b2aa..000000000 --- a/platform/olimex-stm32-h405/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/olimex-stm32-h405/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += stm32_cxxinitialize.c -endif diff --git a/platform/olimex-stm32-h405/stm32_cxxinitialize.c b/platform/olimex-stm32-h405/stm32_cxxinitialize.c deleted file mode 100644 index 634c80ccc..000000000 --- a/platform/olimex-stm32-h405/stm32_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/olimex-stm32-h405/src/stm32_cxxinitialize.c - * - * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/olimex-stm32-h407/Kconfig b/platform/olimex-stm32-h407/Kconfig deleted file mode 100644 index d237822bf..000000000 --- a/platform/olimex-stm32-h407/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_OLIMEX_STM32H407 - -endif diff --git a/platform/olimex-stm32-h407/Make.defs b/platform/olimex-stm32-h407/Make.defs deleted file mode 100644 index d08b8c854..000000000 --- a/platform/olimex-stm32-h407/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/olimex-stm32-h407/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += stm32_cxxinitialize.c -endif diff --git a/platform/olimex-stm32-h407/stm32_cxxinitialize.c b/platform/olimex-stm32-h407/stm32_cxxinitialize.c deleted file mode 100644 index a81ede5fb..000000000 --- a/platform/olimex-stm32-h407/stm32_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/olimex-stm32-h407/src/stm32_cxxinitialize.c - * - * Copyright (C) 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/olimex-stm32-p207/Kconfig b/platform/olimex-stm32-p207/Kconfig deleted file mode 100644 index 92269e5df..000000000 --- a/platform/olimex-stm32-p207/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_OLIMEX_STM32P207 - -endif diff --git a/platform/olimex-stm32-p207/Make.defs b/platform/olimex-stm32-p207/Make.defs deleted file mode 100644 index 5c461cf31..000000000 --- a/platform/olimex-stm32-p207/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/olimex-stm32-p207/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += stm32_cxxinitialize.c -endif diff --git a/platform/olimex-stm32-p207/stm32_cxxinitialize.c b/platform/olimex-stm32-p207/stm32_cxxinitialize.c deleted file mode 100644 index b60195f8d..000000000 --- a/platform/olimex-stm32-p207/stm32_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/olimex-stm32-p207/src/stm32_cxxinitialize.c - * - * Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/olimex-stm32-p407/Kconfig b/platform/olimex-stm32-p407/Kconfig deleted file mode 100644 index 439485f15..000000000 --- a/platform/olimex-stm32-p407/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_OLIMEX_STM32P407 - -endif diff --git a/platform/olimex-stm32-p407/Make.defs b/platform/olimex-stm32-p407/Make.defs deleted file mode 100644 index 576ba25fb..000000000 --- a/platform/olimex-stm32-p407/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/olimex-stm32-p407/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += stm32_cxxinitialize.c -endif diff --git a/platform/olimex-stm32-p407/stm32_cxxinitialize.c b/platform/olimex-stm32-p407/stm32_cxxinitialize.c deleted file mode 100644 index c1b196d64..000000000 --- a/platform/olimex-stm32-p407/stm32_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/olimex-stm32-p407/src/stm32_cxxinitialize.c - * - * Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/olimexino-stm32/Kconfig b/platform/olimexino-stm32/Kconfig deleted file mode 100644 index 428bad21c..000000000 --- a/platform/olimexino-stm32/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_OLIMEXINO_STM32 - -endif diff --git a/platform/olimexino-stm32/Make.defs b/platform/olimexino-stm32/Make.defs deleted file mode 100644 index d2286f8d2..000000000 --- a/platform/olimexino-stm32/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/olimexino-stm32/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += stm32_cxxinitialize.c -endif diff --git a/platform/olimexino-stm32/stm32_cxxinitialize.c b/platform/olimexino-stm32/stm32_cxxinitialize.c deleted file mode 100644 index 00d3114d3..000000000 --- a/platform/olimexino-stm32/stm32_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/olimexino-stm32/src/stm32_cxxinitialize.c - * - * Copyright (C) 2015, 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/pcduino-a10/Kconfig b/platform/pcduino-a10/Kconfig deleted file mode 100644 index 19d4c93ac..000000000 --- a/platform/pcduino-a10/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_PCDUINO_A10 - -endif diff --git a/platform/pcduino-a10/Make.defs b/platform/pcduino-a10/Make.defs deleted file mode 100644 index 0b709e814..000000000 --- a/platform/pcduino-a10/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/pcduino-a10/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += a1x_cxxinitialize.c -endif diff --git a/platform/pcduino-a10/a1x_cxxinitialize.c b/platform/pcduino-a10/a1x_cxxinitialize.c deleted file mode 100644 index 47d4ce1f6..000000000 --- a/platform/pcduino-a10/a1x_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/pcduino-a10/src/a1x_cxxinitialize.c - * - * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/sabre-6quad/Kconfig b/platform/sabre-6quad/Kconfig deleted file mode 100644 index db56c269c..000000000 --- a/platform/sabre-6quad/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_SABRE_6QUAD - -endif diff --git a/platform/sabre-6quad/Make.defs b/platform/sabre-6quad/Make.defs deleted file mode 100644 index 848156a7b..000000000 --- a/platform/sabre-6quad/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/sabre-6quad/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += imx_cxxinitialize.c -endif diff --git a/platform/sabre-6quad/imx_cxxinitialize.c b/platform/sabre-6quad/imx_cxxinitialize.c deleted file mode 100644 index cd21604de..000000000 --- a/platform/sabre-6quad/imx_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/sabre-6quad/src/imx_cxxinitialize.c - * - * Copyright (C) 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/sam3u-ek/Kconfig b/platform/sam3u-ek/Kconfig deleted file mode 100644 index d64a762ac..000000000 --- a/platform/sam3u-ek/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_SAM3UEK - -endif diff --git a/platform/sam3u-ek/Make.defs b/platform/sam3u-ek/Make.defs deleted file mode 100644 index ab9122940..000000000 --- a/platform/sam3u-ek/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/sam3u-ek/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += sam_cxxinitialized.c -endif diff --git a/platform/sam3u-ek/sam_cxxinitialized.c b/platform/sam3u-ek/sam_cxxinitialized.c deleted file mode 100644 index facb7cb36..000000000 --- a/platform/sam3u-ek/sam_cxxinitialized.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/sam3u-ek/src/sam_cxxinitialized.c - * - * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/sam4e-ek/Kconfig b/platform/sam4e-ek/Kconfig deleted file mode 100644 index 8471f4687..000000000 --- a/platform/sam4e-ek/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_SAM4EEK - -endif diff --git a/platform/sam4e-ek/Make.defs b/platform/sam4e-ek/Make.defs deleted file mode 100644 index ee53eba44..000000000 --- a/platform/sam4e-ek/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/sam4e-ek/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += sam_cxxinitialize.c -endif diff --git a/platform/sam4e-ek/sam_cxxinitialize.c b/platform/sam4e-ek/sam_cxxinitialize.c deleted file mode 100644 index 36898f6e7..000000000 --- a/platform/sam4e-ek/sam_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/sam4e-ek/src/sam_cxxinitialize.c - * - * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/sam4l-xplained/Kconfig b/platform/sam4l-xplained/Kconfig deleted file mode 100644 index 9d816e14f..000000000 --- a/platform/sam4l-xplained/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_SAM4L_XPLAINED - -endif diff --git a/platform/sam4l-xplained/Make.defs b/platform/sam4l-xplained/Make.defs deleted file mode 100644 index 72215fa52..000000000 --- a/platform/sam4l-xplained/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/sam4l-xplained/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += sam_cxxinitialize.c -endif diff --git a/platform/sam4l-xplained/sam_cxxinitialize.c b/platform/sam4l-xplained/sam_cxxinitialize.c deleted file mode 100644 index 7d5efaaec..000000000 --- a/platform/sam4l-xplained/sam_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/sam4l-xplained/src/sam_cxxinitialize.c - * - * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/sam4s-xplained-pro/Kconfig b/platform/sam4s-xplained-pro/Kconfig deleted file mode 100644 index 0a44f59de..000000000 --- a/platform/sam4s-xplained-pro/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_SAM4S_XPLAINED_PRO - -endif diff --git a/platform/sam4s-xplained-pro/Make.defs b/platform/sam4s-xplained-pro/Make.defs deleted file mode 100644 index 475ddc358..000000000 --- a/platform/sam4s-xplained-pro/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/sam4s-xplained-pro/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += sam_cxxinitialize.c -endif diff --git a/platform/sam4s-xplained-pro/sam_cxxinitialize.c b/platform/sam4s-xplained-pro/sam_cxxinitialize.c deleted file mode 100644 index 8a1b6921e..000000000 --- a/platform/sam4s-xplained-pro/sam_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/sam4s-xplained-pro/src/sam_cxxinitialize.c - * - * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/sam4s-xplained/Kconfig b/platform/sam4s-xplained/Kconfig deleted file mode 100644 index 600877db9..000000000 --- a/platform/sam4s-xplained/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_SAM4S_XPLAINED - -endif diff --git a/platform/sam4s-xplained/Make.defs b/platform/sam4s-xplained/Make.defs deleted file mode 100644 index 42815bc25..000000000 --- a/platform/sam4s-xplained/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/sam4s-xplained/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += sam_cxxinitialize.c -endif diff --git a/platform/sam4s-xplained/sam_cxxinitialize.c b/platform/sam4s-xplained/sam_cxxinitialize.c deleted file mode 100644 index 90abcb81f..000000000 --- a/platform/sam4s-xplained/sam_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/sam4s-xplained/src/sam_cxxinitialize.c - * - * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/sama5d2-xult/Kconfig b/platform/sama5d2-xult/Kconfig deleted file mode 100644 index 4ec003beb..000000000 --- a/platform/sama5d2-xult/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_SAMA5D2_XULT - -endif diff --git a/platform/sama5d2-xult/Make.defs b/platform/sama5d2-xult/Make.defs deleted file mode 100644 index 5499cf88b..000000000 --- a/platform/sama5d2-xult/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/sama5d2-xult/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += sam_cxxinitialize.c -endif diff --git a/platform/sama5d2-xult/sam_cxxinitialize.c b/platform/sama5d2-xult/sam_cxxinitialize.c deleted file mode 100644 index 0b61505ea..000000000 --- a/platform/sama5d2-xult/sam_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/sama5d2-xult/src/sam_cxxinitialize.c - * - * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/sama5d3-xplained/Kconfig b/platform/sama5d3-xplained/Kconfig deleted file mode 100644 index cd782daf2..000000000 --- a/platform/sama5d3-xplained/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_SAMA5D3_XPLAINED - -endif diff --git a/platform/sama5d3-xplained/Make.defs b/platform/sama5d3-xplained/Make.defs deleted file mode 100644 index bc2a45d99..000000000 --- a/platform/sama5d3-xplained/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/sama5d3-xplained/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += sam_cxxinitialize.c -endif diff --git a/platform/sama5d3-xplained/sam_cxxinitialize.c b/platform/sama5d3-xplained/sam_cxxinitialize.c deleted file mode 100644 index 686892046..000000000 --- a/platform/sama5d3-xplained/sam_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/sama5d3-xplained/src/sam_cxxinitialize.c - * - * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/sama5d3x-ek/Kconfig b/platform/sama5d3x-ek/Kconfig deleted file mode 100644 index a98640bea..000000000 --- a/platform/sama5d3x-ek/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_SAMA5D3X_EK - -endif diff --git a/platform/sama5d3x-ek/Make.defs b/platform/sama5d3x-ek/Make.defs deleted file mode 100644 index 5361b94dd..000000000 --- a/platform/sama5d3x-ek/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/sama5d3x-ek/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += sam_cxxinitialize.c -endif diff --git a/platform/sama5d3x-ek/sam_cxxinitialize.c b/platform/sama5d3x-ek/sam_cxxinitialize.c deleted file mode 100644 index 359013ad7..000000000 --- a/platform/sama5d3x-ek/sam_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/sama5d3x-ek/src/sam_cxxinitialize.c - * - * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/sama5d4-ek/Kconfig b/platform/sama5d4-ek/Kconfig deleted file mode 100644 index cadcac8a1..000000000 --- a/platform/sama5d4-ek/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_SAMA5D4_EK - -endif diff --git a/platform/sama5d4-ek/Make.defs b/platform/sama5d4-ek/Make.defs deleted file mode 100644 index 1947f82d9..000000000 --- a/platform/sama5d4-ek/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/sama5d4-ek/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += sam_cxxinitialize.c -endif diff --git a/platform/sama5d4-ek/sam_cxxinitialize.c b/platform/sama5d4-ek/sam_cxxinitialize.c deleted file mode 100644 index 153d5086b..000000000 --- a/platform/sama5d4-ek/sam_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/sama5d4-ek/src/sam_cxxinitialize.c - * - * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/samd20-xplained/Kconfig b/platform/samd20-xplained/Kconfig deleted file mode 100644 index 65ba672b0..000000000 --- a/platform/samd20-xplained/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_SAMD20_XPLAINED - -endif diff --git a/platform/samd20-xplained/Make.defs b/platform/samd20-xplained/Make.defs deleted file mode 100644 index e4c7dc292..000000000 --- a/platform/samd20-xplained/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/samd20-xplained/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += sam_cxxinitialize.c -endif diff --git a/platform/samd20-xplained/sam_cxxinitialize.c b/platform/samd20-xplained/sam_cxxinitialize.c deleted file mode 100644 index 1ef302032..000000000 --- a/platform/samd20-xplained/sam_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/samd20-xplained/src/sam_cxxinitialize.c - * - * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/samd21-xplained/Kconfig b/platform/samd21-xplained/Kconfig deleted file mode 100644 index 6a86dd7e4..000000000 --- a/platform/samd21-xplained/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_SAMD21_XPLAINED - -endif diff --git a/platform/samd21-xplained/Make.defs b/platform/samd21-xplained/Make.defs deleted file mode 100644 index 31a4bbf78..000000000 --- a/platform/samd21-xplained/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/samd21-xplained/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += sam_cxxinitialize.c -endif diff --git a/platform/samd21-xplained/sam_cxxinitialize.c b/platform/samd21-xplained/sam_cxxinitialize.c deleted file mode 100644 index 2bcda4ad8..000000000 --- a/platform/samd21-xplained/sam_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/samd21-xplained/src/sam_cxxinitialize.c - * - * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/same70-xplained/Kconfig b/platform/same70-xplained/Kconfig deleted file mode 100644 index 4c41faba5..000000000 --- a/platform/same70-xplained/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_SAME70_XPLAINED - -endif diff --git a/platform/same70-xplained/Make.defs b/platform/same70-xplained/Make.defs deleted file mode 100644 index d0ff64103..000000000 --- a/platform/same70-xplained/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/same70-xplained/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += sam_cxxinitialize.c -endif diff --git a/platform/same70-xplained/sam_cxxinitialize.c b/platform/same70-xplained/sam_cxxinitialize.c deleted file mode 100644 index e114dee46..000000000 --- a/platform/same70-xplained/sam_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/same70-xplained/src/sam_cxxinitialize.c - * - * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/saml21-xplained/Kconfig b/platform/saml21-xplained/Kconfig deleted file mode 100644 index b1ae01887..000000000 --- a/platform/saml21-xplained/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_SAML21_XPLAINED - -endif diff --git a/platform/saml21-xplained/Make.defs b/platform/saml21-xplained/Make.defs deleted file mode 100644 index a257a6d79..000000000 --- a/platform/saml21-xplained/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/saml21-xplained/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += sam_cxxinitialize.c -endif diff --git a/platform/saml21-xplained/sam_cxxinitialize.c b/platform/saml21-xplained/sam_cxxinitialize.c deleted file mode 100644 index 14b597a71..000000000 --- a/platform/saml21-xplained/sam_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/saml21-xplained/src/sam_cxxinitialize.c - * - * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/samv71-xult/Kconfig b/platform/samv71-xult/Kconfig deleted file mode 100644 index 38c928f2b..000000000 --- a/platform/samv71-xult/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_SAMV71_XULT - -endif diff --git a/platform/samv71-xult/Make.defs b/platform/samv71-xult/Make.defs deleted file mode 100644 index 887ef432a..000000000 --- a/platform/samv71-xult/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/samv71-xult/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += sam_cxxinitialize.c -endif diff --git a/platform/samv71-xult/sam_cxxinitialize.c b/platform/samv71-xult/sam_cxxinitialize.c deleted file mode 100644 index 372c9106b..000000000 --- a/platform/samv71-xult/sam_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/samv71-xult/src/sam_cxxinitialize.c - * - * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/shenzhou/Kconfig b/platform/shenzhou/Kconfig deleted file mode 100644 index 96190e823..000000000 --- a/platform/shenzhou/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_SHENZHOU - -endif diff --git a/platform/shenzhou/Make.defs b/platform/shenzhou/Make.defs deleted file mode 100644 index fa1e49de2..000000000 --- a/platform/shenzhou/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/shenzhou/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += stm32_cxxinitialize.c -endif diff --git a/platform/shenzhou/stm32_cxxinitialize.c b/platform/shenzhou/stm32_cxxinitialize.c deleted file mode 100644 index cc013c3e4..000000000 --- a/platform/shenzhou/stm32_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/shenzhou/src/stm32_cxxinitialize.c - * - * Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/spark/Make.defs b/platform/spark/Make.defs deleted file mode 100644 index f5bc1013d..000000000 --- a/platform/spark/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/spark/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += stm32_cxxinitialize.c -endif diff --git a/platform/spark/stm32_cxxinitialize.c b/platform/spark/stm32_cxxinitialize.c deleted file mode 100644 index 2f21a83f0..000000000 --- a/platform/spark/stm32_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/spark/src/stm32_cxxinitialize.c - * - * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/stm3220g-eval/Kconfig b/platform/stm3220g-eval/Kconfig deleted file mode 100644 index 631213ba8..000000000 --- a/platform/stm3220g-eval/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_STM3220G_EVAL - -endif diff --git a/platform/stm3220g-eval/Make.defs b/platform/stm3220g-eval/Make.defs deleted file mode 100644 index 446520c50..000000000 --- a/platform/stm3220g-eval/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/stm3220g-eval/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += stm32_cxxinitialize.c -endif diff --git a/platform/stm3220g-eval/stm32_cxxinitialize.c b/platform/stm3220g-eval/stm32_cxxinitialize.c deleted file mode 100644 index defc7cf11..000000000 --- a/platform/stm3220g-eval/stm32_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/stm3220g-eval/src/stm32_cxxinitialize.c - * - * Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/stm3240g-eval/Kconfig b/platform/stm3240g-eval/Kconfig deleted file mode 100644 index 88d9c9df0..000000000 --- a/platform/stm3240g-eval/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_STM3240G_EVAL - -endif diff --git a/platform/stm3240g-eval/Make.defs b/platform/stm3240g-eval/Make.defs deleted file mode 100644 index b86ca1aa2..000000000 --- a/platform/stm3240g-eval/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/stm3240g-eval/Make.defs -# -# Copyright (C) 2013 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += stm32_cxxinitialize.c -endif diff --git a/platform/stm3240g-eval/stm32_cxxinitialize.c b/platform/stm3240g-eval/stm32_cxxinitialize.c deleted file mode 100644 index 179a96588..000000000 --- a/platform/stm3240g-eval/stm32_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/stm3240g-eval/src/stm32_cxxinitialize.c - * - * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/stm32f3discovery/Kconfig b/platform/stm32f3discovery/Kconfig deleted file mode 100644 index f162c0f17..000000000 --- a/platform/stm32f3discovery/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_STM32F3_DISCOVERY - -endif diff --git a/platform/stm32f3discovery/Make.defs b/platform/stm32f3discovery/Make.defs deleted file mode 100644 index 76e8230c1..000000000 --- a/platform/stm32f3discovery/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/stm32f3discovery/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += stm32_cxxinitialize.c -endif diff --git a/platform/stm32f3discovery/stm32_cxxinitialize.c b/platform/stm32f3discovery/stm32_cxxinitialize.c deleted file mode 100644 index f492a45aa..000000000 --- a/platform/stm32f3discovery/stm32_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/stm32f3discovery/src/stm32_cxxinitialize.c - * - * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/stm32f429i-disco/Kconfig b/platform/stm32f429i-disco/Kconfig deleted file mode 100644 index a8c8c7996..000000000 --- a/platform/stm32f429i-disco/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_STM32F429I_DISCO - -endif diff --git a/platform/stm32f429i-disco/Make.defs b/platform/stm32f429i-disco/Make.defs deleted file mode 100644 index 6722ad8a6..000000000 --- a/platform/stm32f429i-disco/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/stm32f429i-disco/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += stm32_cxxinitialize.c -endif diff --git a/platform/stm32f429i-disco/stm32_cxxinitialize.c b/platform/stm32f429i-disco/stm32_cxxinitialize.c deleted file mode 100644 index c019c5547..000000000 --- a/platform/stm32f429i-disco/stm32_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/stm32f429i-disco/src/stm32_cxxinitialize.c - * - * Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/stm32f4discovery/Kconfig b/platform/stm32f4discovery/Kconfig deleted file mode 100644 index 473ff0556..000000000 --- a/platform/stm32f4discovery/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_STM32F4_DISCOVERY - -endif diff --git a/platform/stm32f4discovery/Make.defs b/platform/stm32f4discovery/Make.defs deleted file mode 100644 index 1d7e17625..000000000 --- a/platform/stm32f4discovery/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/stm32f4discovery/Make.defs -# -# Copyright (C) 2015 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += stm32_cxxinitialize.c -endif diff --git a/platform/stm32f4discovery/stm32_cxxinitialize.c b/platform/stm32f4discovery/stm32_cxxinitialize.c deleted file mode 100644 index 05f598e9f..000000000 --- a/platform/stm32f4discovery/stm32_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/stm32f4discovery/src/stm32_cxxinitialize.c - * - * Copyright (C) 2012, 2015 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/stm32f746g-disco/Kconfig b/platform/stm32f746g-disco/Kconfig deleted file mode 100644 index c2715d3c0..000000000 --- a/platform/stm32f746g-disco/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_STM32F746G_DISCO - -endif diff --git a/platform/stm32f746g-disco/Make.defs b/platform/stm32f746g-disco/Make.defs deleted file mode 100644 index 424e2a362..000000000 --- a/platform/stm32f746g-disco/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/stm32f746g-disco/Make.defs -# -# Copyright (C) 2015 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += stm32_cxxinitialize.c -endif diff --git a/platform/stm32f746g-disco/stm32_cxxinitialize.c b/platform/stm32f746g-disco/stm32_cxxinitialize.c deleted file mode 100644 index 70b88472d..000000000 --- a/platform/stm32f746g-disco/stm32_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/stm32f746g-disco/stm32_cxxinitialize.c - * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/stm32l476-mdk/Kconfig b/platform/stm32l476-mdk/Kconfig deleted file mode 100644 index 8594ccc88..000000000 --- a/platform/stm32l476-mdk/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_STM32L476_MDK - -endif diff --git a/platform/stm32l476-mdk/Make.defs b/platform/stm32l476-mdk/Make.defs deleted file mode 100644 index 761c336d7..000000000 --- a/platform/stm32l476-mdk/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/stm32l476-mdk/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += stm32_cxxinitialize.c -endif diff --git a/platform/stm32l476-mdk/stm32_cxxinitialize.c b/platform/stm32l476-mdk/stm32_cxxinitialize.c deleted file mode 100644 index 75c757b32..000000000 --- a/platform/stm32l476-mdk/stm32_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/stm32l476-mdk/src/stm32_cxxinitialize.c - * - * Copyright (C) 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/stm32l476vg-disco/Kconfig b/platform/stm32l476vg-disco/Kconfig deleted file mode 100644 index 5c4adb26a..000000000 --- a/platform/stm32l476vg-disco/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_STM32L476VG_DISCO - -endif diff --git a/platform/stm32l476vg-disco/Make.defs b/platform/stm32l476vg-disco/Make.defs deleted file mode 100644 index bca6dc247..000000000 --- a/platform/stm32l476vg-disco/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/stm32l476vg-disco/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += stm32_cxxinitialize.c -endif diff --git a/platform/stm32l476vg-disco/stm32_cxxinitialize.c b/platform/stm32l476vg-disco/stm32_cxxinitialize.c deleted file mode 100644 index a6e649aa0..000000000 --- a/platform/stm32l476vg-disco/stm32_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/stm32l476vg-disco/src/stm32_cxxinitialize.c - * - * Copyright (C) 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/stm32ldiscovery/Kconfig b/platform/stm32ldiscovery/Kconfig deleted file mode 100644 index 1a0afb8a7..000000000 --- a/platform/stm32ldiscovery/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_STM32L_DISCOVERY - -endif diff --git a/platform/stm32ldiscovery/Make.defs b/platform/stm32ldiscovery/Make.defs deleted file mode 100644 index 079d80256..000000000 --- a/platform/stm32ldiscovery/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/stm32ldiscovery/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += stm32_cxxinitialize.c -endif diff --git a/platform/stm32ldiscovery/stm32_cxxinitialize.c b/platform/stm32ldiscovery/stm32_cxxinitialize.c deleted file mode 100644 index 0383a5ba0..000000000 --- a/platform/stm32ldiscovery/stm32_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/stm32ldiscovery/src/stm32_cxxinitialize.c - * - * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/teensy-lc/Kconfig b/platform/teensy-lc/Kconfig deleted file mode 100644 index 7c62ce336..000000000 --- a/platform/teensy-lc/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_TEENSY_LC - -endif diff --git a/platform/teensy-lc/Make.defs b/platform/teensy-lc/Make.defs deleted file mode 100644 index a62a022ce..000000000 --- a/platform/teensy-lc/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/teensy-lc/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += kl_cxxinitialize.c -endif diff --git a/platform/teensy-lc/kl_cxxinitialize.c b/platform/teensy-lc/kl_cxxinitialize.c deleted file mode 100644 index 218b588b5..000000000 --- a/platform/teensy-lc/kl_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/teensy-lc/src/kl_cxxinitialize.c - * - * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ diff --git a/platform/viewtool-stm32f107/Kconfig b/platform/viewtool-stm32f107/Kconfig deleted file mode 100644 index 21a0c34bd..000000000 --- a/platform/viewtool-stm32f107/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_VIEWTOOL_STM32F107 - -endif diff --git a/platform/viewtool-stm32f107/Make.defs b/platform/viewtool-stm32f107/Make.defs deleted file mode 100644 index 4d6ff4354..000000000 --- a/platform/viewtool-stm32f107/Make.defs +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################ -# apps/platform/viewtool-stm32f107/Make.defs -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Add platform specific sources to ASRCS and CSRCS - -ifeq ($(CONFIG_HAVE_CXX),y) -CSRCS += stm32_cxxinitialize.c -endif diff --git a/platform/viewtool-stm32f107/stm32_cxxinitialize.c b/platform/viewtool-stm32f107/stm32_cxxinitialize.c deleted file mode 100644 index 404bab80f..000000000 --- a/platform/viewtool-stm32f107/stm32_cxxinitialize.c +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** - * apps/platform/viewtool-stm32f107/src/stm32_cxxinitialize.c - * - * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the static - * constructors. - */ - -#ifdef CONFIG_DEBUG_CXX -# define cxxinfo _info -#else -# define cxxinfo(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ -/* This type defines one entry in initialization array */ - -typedef void (*initializer_t)(void); - -/**************************************************************************** - * External References - ****************************************************************************/ -/* _sinit and _einit are symbols exported by the linker script that mark the - * beginning and the end of the C++ initialization section. - */ - -extern initializer_t _sinit; -extern initializer_t _einit; - -/* _stext and _etext are symbols exported by the linker script that mark the - * beginning and the end of text. - */ - -extern uint32_t _stext; -extern uint32_t _etext; - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_cxxinitialize - * - * Description: - * If C++ and C++ static constructors are supported, then this function - * must be provided by board-specific logic in order to perform - * initialization of the static C++ class instances. - * - * This function should then be called in the application-specific - * user_start logic in order to perform the C++ initialization. NOTE - * that no component of the core NuttX RTOS logic is involved; this - * function definition only provides the 'contract' between application - * specific C++ code and platform-specific toolchain support. - * - ****************************************************************************/ - -void up_cxxinitialize(void) -{ - initializer_t *initp; - - cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); - - /* Visit each entry in the initialization table */ - - for (initp = &_sinit; initp != &_einit; initp++) - { - initializer_t initializer = *initp; - cxxinfo("initp: %p initializer: %p\n", initp, initializer); - - /* Make sure that the address is non-NULL and lies in the text region - * defined by the linker script. Some toolchains may put NULL values - * or counts in the initialization table. - */ - - if ((void *)initializer > (void *)&_stext && - (void *)initializer < (void *)&_etext) - { - cxxinfo("Calling %p\n", initializer); - initializer(); - } - } -} - -#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */