diff --git a/arch/arm/src/stm32l4/stm32l4_spi.c b/arch/arm/src/stm32l4/stm32l4_spi.c index 9d9db706e07..67efad4aa8f 100644 --- a/arch/arm/src/stm32l4/stm32l4_spi.c +++ b/arch/arm/src/stm32l4/stm32l4_spi.c @@ -41,7 +41,7 @@ * are provided by common STM32 logic. To use this common SPI logic on your * board: * - * 1. Provide logic in stm32l4_boardinitialize() to configure SPI chip select + * 1. Provide logic in stm32l4_board_initialize() to configure SPI chip select * pins. * 2. Provide stm32l4_spi1/2/3select() and stm32l4_spi1/2/3status() functions in your * board-specific logic. These functions will perform chip selection and diff --git a/arch/arm/src/stm32l4/stm32l4_spi.h b/arch/arm/src/stm32l4/stm32l4_spi.h index 223cfb2b3df..7f5390f3477 100644 --- a/arch/arm/src/stm32l4/stm32l4_spi.h +++ b/arch/arm/src/stm32l4/stm32l4_spi.h @@ -97,7 +97,7 @@ FAR struct spi_dev_s *stm32l4_spibus_initialize(int bus); * (including stm32l4_spibus_initialize()) are provided by common STM32 logic. To use this * common SPI logic on your board: * - * 1. Provide logic in stm32l4_boardinitialize() to configure SPI chip select + * 1. Provide logic in stm32l4_board_initialize() to configure SPI chip select * pins. * 2. Provide stm32l4_spi1/2/...select() and stm32l4_spi1/2/...status() functions in your * board-specific logic. These functions will perform chip selection and diff --git a/arch/arm/src/stm32l4/stm32l4_start.c b/arch/arm/src/stm32l4/stm32l4_start.c index b2053f25ed0..9d068fb46ad 100644 --- a/arch/arm/src/stm32l4/stm32l4_start.c +++ b/arch/arm/src/stm32l4/stm32l4_start.c @@ -358,7 +358,7 @@ void __start(void) /* Initialize onboard resources */ - stm32l4_boardinitialize(); + stm32l4_board_initialize(); showprogress('F'); /* Then start NuttX */ diff --git a/arch/arm/src/stm32l4/stm32l4_start.h b/arch/arm/src/stm32l4/stm32l4_start.h new file mode 100644 index 00000000000..618b5cdcb7c --- /dev/null +++ b/arch/arm/src/stm32l4/stm32l4_start.h @@ -0,0 +1,59 @@ +/************************************************************************************ + * arch/arm/src/stm32l4/stm32l4_start.h + * + * Copyrigth (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. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STM32L4_STM32L4_START_H +#define __ARCH_ARM_SRC_STM32L4_STM32L4_START_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +/************************************************************************************ + * Public Function Prototypes + ************************************************************************************/ + +/************************************************************************************ + * Name: stm32l4_board_initialize + * + * Description: + * All STM32L4 architectures must provide the following entry point. This entry + * point is called early in the initialization -- after all memory has been + * configured and mapped but before any devices have been initialized. + * + ************************************************************************************/ + +void stm32l4_board_initialize(void); + +#endif /* __ARCH_ARM_SRC_STM32L4_STM32L4_START_H */ diff --git a/configs/b-l475e-iot01a/src/stm32_boot.c b/configs/b-l475e-iot01a/src/stm32_boot.c index a4a1b3cf58f..118a83fc33a 100644 --- a/configs/b-l475e-iot01a/src/stm32_boot.c +++ b/configs/b-l475e-iot01a/src/stm32_boot.c @@ -43,6 +43,7 @@ #include #include "up_arch.h" +#include "stm32l4_start.h" #include "b-l475e-iot01a.h" /************************************************************************************ @@ -50,16 +51,16 @@ ************************************************************************************/ /************************************************************************************ - * Name: stm32_boardinitialize + * Name: stm32l4_board_initialize * * Description: - * All STM32 architectures must provide the following entry point. This entry point - * is called early in the initialization -- after all memory has been configured - * and mapped but before any devices have been initialized. + * All STM32L4 architectures must provide the following entry point. This entry + * point is called early in the initialization -- after all memory has been + * configured and mapped but before any devices have been initialized. * ************************************************************************************/ -void stm32l4_boardinitialize(void) +void stm32l4_board_initialize(void) { #ifdef CONFIG_ARCH_LEDS /* Configure on-board LEDs if LED support has been selected. */ diff --git a/configs/nucleo-l432kc/include/board.h b/configs/nucleo-l432kc/include/board.h index 2d0c152e6fd..de5fdb345c1 100644 --- a/configs/nucleo-l432kc/include/board.h +++ b/configs/nucleo-l432kc/include/board.h @@ -243,7 +243,7 @@ extern "C" * Public Function Prototypes ************************************************************************************/ /************************************************************************************ - * Name: stm32l4_boardinitialize + * Name: stm32l4_board_initialize * * Description: * All STM32L4 architectures must provide the following entry point. This entry point @@ -252,7 +252,7 @@ extern "C" * ************************************************************************************/ -void stm32l4_boardinitialize(void); +void stm32l4_board_initialize(void); #undef EXTERN #if defined(__cplusplus) diff --git a/configs/nucleo-l432kc/src/stm32_boot.c b/configs/nucleo-l432kc/src/stm32_boot.c index e460316949e..f4bc7c39456 100644 --- a/configs/nucleo-l432kc/src/stm32_boot.c +++ b/configs/nucleo-l432kc/src/stm32_boot.c @@ -64,7 +64,7 @@ ************************************************************************************/ /************************************************************************************ - * Name: stm32l4_boardinitialize + * Name: stm32l4_board_initialize * * Description: * All STM32L4 architectures must provide the following entry point. This entry point @@ -73,7 +73,7 @@ * ************************************************************************************/ -void stm32l4_boardinitialize(void) +void stm32l4_board_initialize(void) { /* Configure on-board LEDs if LED support has been selected. */ diff --git a/configs/nucleo-l432kc/src/stm32_spi.c b/configs/nucleo-l432kc/src/stm32_spi.c index 731030f7edb..cb1732dbe2e 100644 --- a/configs/nucleo-l432kc/src/stm32_spi.c +++ b/configs/nucleo-l432kc/src/stm32_spi.c @@ -114,7 +114,7 @@ void stm32l4_spiinitialize(void) * are provided by common STM32 logic. To use this common SPI logic on your * board: * - * 1. Provide logic in stm32l4_boardinitialize() to configure SPI chip select + * 1. Provide logic in stm32l4_board_initialize() to configure SPI chip select * pins. * 2. Provide stm32l4_spi1/2select() and stm32l4_spi1/2status() functions in your * board-specific logic. These functions will perform chip selection and diff --git a/configs/nucleo-l452re/include/board.h b/configs/nucleo-l452re/include/board.h index 30e452dca75..2e2a85e993b 100644 --- a/configs/nucleo-l452re/include/board.h +++ b/configs/nucleo-l452re/include/board.h @@ -252,7 +252,7 @@ extern "C" * Public Function Prototypes ************************************************************************************/ /************************************************************************************ - * Name: stm32l4_boardinitialize + * Name: stm32l4_board_initialize * * Description: * All STM32L4 architectures must provide the following entry point. This entry point @@ -261,7 +261,7 @@ extern "C" * ************************************************************************************/ -void stm32l4_boardinitialize(void); +void stm32l4_board_initialize(void); #undef EXTERN #if defined(__cplusplus) diff --git a/configs/nucleo-l452re/src/stm32_boot.c b/configs/nucleo-l452re/src/stm32_boot.c index 9e7c287303d..182a51df27b 100644 --- a/configs/nucleo-l452re/src/stm32_boot.c +++ b/configs/nucleo-l452re/src/stm32_boot.c @@ -53,7 +53,7 @@ ************************************************************************************/ /************************************************************************************ - * Name: stm32l4_boardinitialize + * Name: stm32l4_board_initialize * * Description: * All STM32 architectures must provide the following entry point. This entry point @@ -62,7 +62,7 @@ * ************************************************************************************/ -void stm32l4_boardinitialize(void) +void stm32l4_board_initialize(void) { #ifdef CONFIG_ARCH_LEDS /* Configure on-board LEDs if LED support has been selected. */ diff --git a/configs/nucleo-l452re/src/stm32_spi.c b/configs/nucleo-l452re/src/stm32_spi.c index 02f17ca6078..7330f7e5dd5 100644 --- a/configs/nucleo-l452re/src/stm32_spi.c +++ b/configs/nucleo-l452re/src/stm32_spi.c @@ -117,7 +117,7 @@ void weak_function stm32l4_spiinitialize(void) * are provided by common STM32 logic. To use this common SPI logic on your * board: * - * 1. Provide logic in stm32l4_boardinitialize() to configure SPI chip select + * 1. Provide logic in stm32l4_board_initialize() to configure SPI chip select * pins. * 2. Provide stm32l4_spi1/2/3select() and stm32l4_spi1/2/3status() functions in your * board-specific logic. These functions will perform chip selection and diff --git a/configs/nucleo-l476rg/include/board.h b/configs/nucleo-l476rg/include/board.h index 490e5af9689..0cbecee0c59 100644 --- a/configs/nucleo-l476rg/include/board.h +++ b/configs/nucleo-l476rg/include/board.h @@ -249,7 +249,7 @@ extern "C" * Public Function Prototypes ************************************************************************************/ /************************************************************************************ - * Name: stm32l4_boardinitialize + * Name: stm32l4_board_initialize * * Description: * All STM32L4 architectures must provide the following entry point. This entry point @@ -258,7 +258,7 @@ extern "C" * ************************************************************************************/ -void stm32l4_boardinitialize(void); +void stm32l4_board_initialize(void); #undef EXTERN #if defined(__cplusplus) diff --git a/configs/nucleo-l476rg/src/stm32_boot.c b/configs/nucleo-l476rg/src/stm32_boot.c index 2acb52ee62e..a8af6532065 100644 --- a/configs/nucleo-l476rg/src/stm32_boot.c +++ b/configs/nucleo-l476rg/src/stm32_boot.c @@ -64,7 +64,7 @@ ************************************************************************************/ /************************************************************************************ - * Name: stm32l4_boardinitialize + * Name: stm32l4_board_initialize * * Description: * All STM32L4 architectures must provide the following entry point. This entry point @@ -73,7 +73,7 @@ * ************************************************************************************/ -void stm32l4_boardinitialize(void) +void stm32l4_board_initialize(void) { /* Configure on-board LEDs if LED support has been selected. */ diff --git a/configs/nucleo-l476rg/src/stm32_spi.c b/configs/nucleo-l476rg/src/stm32_spi.c index 6e45b6f76cc..5047ee3d0a1 100644 --- a/configs/nucleo-l476rg/src/stm32_spi.c +++ b/configs/nucleo-l476rg/src/stm32_spi.c @@ -126,7 +126,7 @@ void weak_function stm32l4_spiinitialize(void) * are provided by common STM32 logic. To use this common SPI logic on your * board: * - * 1. Provide logic in stm32l4_boardinitialize() to configure SPI chip select + * 1. Provide logic in stm32l4_board_initialize() to configure SPI chip select * pins. * 2. Provide stm32l4_spi1/2/3select() and stm32l4_spi1/2/3status() functions in your * board-specific logic. These functions will perform chip selection and diff --git a/configs/nucleo-l496zg/include/board.h b/configs/nucleo-l496zg/include/board.h index 7f4bc3b5afe..87f69f92d91 100644 --- a/configs/nucleo-l496zg/include/board.h +++ b/configs/nucleo-l496zg/include/board.h @@ -438,7 +438,7 @@ extern "C" ************************************************************************************/ /************************************************************************************ - * Name: stm32l4_boardinitialize + * Name: stm32l4_board_initialize * * Description: * All STM32 architectures must provide the following entry point. This entry point @@ -447,7 +447,7 @@ extern "C" * ************************************************************************************/ -void stm32l4_boardinitialize(void); +void stm32l4_board_initialize(void); #undef EXTERN #if defined(__cplusplus) diff --git a/configs/nucleo-l496zg/src/stm32_boot.c b/configs/nucleo-l496zg/src/stm32_boot.c index 5cf32fbb227..ec2bff2d24e 100644 --- a/configs/nucleo-l496zg/src/stm32_boot.c +++ b/configs/nucleo-l496zg/src/stm32_boot.c @@ -53,7 +53,7 @@ ************************************************************************************/ /************************************************************************************ - * Name: stm32l4_boardinitialize + * Name: stm32l4_board_initialize * * Description: * All STM32 architectures must provide the following entry point. This entry point @@ -62,7 +62,7 @@ * ************************************************************************************/ -void stm32l4_boardinitialize(void) +void stm32l4_board_initialize(void) { #ifdef CONFIG_ARCH_LEDS /* Configure on-board LEDs if LED support has been selected. */ diff --git a/configs/stm32l476-mdk/include/board.h b/configs/stm32l476-mdk/include/board.h index 39f0e861ef7..771b43e798d 100644 --- a/configs/stm32l476-mdk/include/board.h +++ b/configs/stm32l476-mdk/include/board.h @@ -135,7 +135,7 @@ extern "C" * Public Function Prototypes ************************************************************************************/ /************************************************************************************ - * Name: stm32l4_boardinitialize + * Name: stm32l4_board_initialize * * Description: * All STM32L4 architectures must provide the following entry point. This entry @@ -144,7 +144,7 @@ extern "C" * ************************************************************************************/ -void stm32l4_boardinitialize(void); +void stm32l4_board_initialize(void); #undef EXTERN #if defined(__cplusplus) diff --git a/configs/stm32l476-mdk/src/stm32_boot.c b/configs/stm32l476-mdk/src/stm32_boot.c index 3d907d49bb7..55b3f6af75b 100644 --- a/configs/stm32l476-mdk/src/stm32_boot.c +++ b/configs/stm32l476-mdk/src/stm32_boot.c @@ -56,7 +56,7 @@ ************************************************************************************/ /************************************************************************************ - * Name: stm32l4_boardinitialize + * Name: stm32l4_board_initialize * * Description: * All STM32L4 architectures must provide the following entry point. This entry point @@ -65,7 +65,7 @@ * ************************************************************************************/ -void stm32l4_boardinitialize(void) +void stm32l4_board_initialize(void) { /* Configure on-board LEDs if LED support has been selected. */ diff --git a/configs/stm32l476vg-disco/include/board.h b/configs/stm32l476vg-disco/include/board.h index ee28c35a06e..5713b402e8b 100644 --- a/configs/stm32l476vg-disco/include/board.h +++ b/configs/stm32l476vg-disco/include/board.h @@ -293,7 +293,7 @@ extern "C" * Public Function Prototypes ************************************************************************************/ /************************************************************************************ - * Name: stm32l4_boardinitialize + * Name: stm32l4_board_initialize * * Description: * All STM32L4 architectures must provide the following entry point. This entry point @@ -302,7 +302,7 @@ extern "C" * ************************************************************************************/ -void stm32l4_boardinitialize(void); +void stm32l4_board_initialize(void); #undef EXTERN #if defined(__cplusplus) diff --git a/configs/stm32l476vg-disco/src/stm32_boot.c b/configs/stm32l476vg-disco/src/stm32_boot.c index e3711ec9bad..56723d783d4 100644 --- a/configs/stm32l476vg-disco/src/stm32_boot.c +++ b/configs/stm32l476vg-disco/src/stm32_boot.c @@ -56,7 +56,7 @@ ************************************************************************************/ /************************************************************************************ - * Name: stm32l4_boardinitialize + * Name: stm32l4_board_initialize * * Description: * All STM32L4 architectures must provide the following entry point. This entry point @@ -65,7 +65,7 @@ * ************************************************************************************/ -void stm32l4_boardinitialize(void) +void stm32l4_board_initialize(void) { /* Configure on-board LEDs if LED support has been selected. */