diff --git a/configs/viewtool-stm32f107/src/Makefile b/configs/viewtool-stm32f107/src/Makefile index b89df6700c6..c90e9df6205 100644 --- a/configs/viewtool-stm32f107/src/Makefile +++ b/configs/viewtool-stm32f107/src/Makefile @@ -1,7 +1,7 @@ ############################################################################ # configs/viewtool-stm32f107/src/Makefile # -# Copyright (C) 2013 Gregory Nutt. All rights reserved. +# Copyright (C) 2013, 2017 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -36,7 +36,7 @@ -include $(TOPDIR)/Make.defs ASRCS = -CSRCS = stm32_boot.c stm32_leds.c stm32_spi.c +CSRCS = stm32_boot.c stm32_bringup.c stm32_leds.c stm32_spi.c ifeq ($(CONFIG_CAN),y) CSRCS += stm32_can.c diff --git a/configs/viewtool-stm32f107/src/stm32_appinit.c b/configs/viewtool-stm32f107/src/stm32_bringup.c similarity index 82% rename from configs/viewtool-stm32f107/src/stm32_appinit.c rename to configs/viewtool-stm32f107/src/stm32_bringup.c index 5ac570243d1..cba3798e889 100644 --- a/configs/viewtool-stm32f107/src/stm32_appinit.c +++ b/configs/viewtool-stm32f107/src/stm32_bringup.c @@ -1,5 +1,5 @@ /**************************************************************************** - * config/viewtool-stm32f107/src/stm32_appinit.c + * config/viewtool-stm32f107/src/stm32_bringup.c * * Copyright (C) 2013, 2016-2017 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -121,31 +121,20 @@ static int rtc_driver_initialize(void) ****************************************************************************/ /**************************************************************************** - * Name: board_app_initialize + * Name: stm32_bringup * * Description: - * Perform application specific initialization. This function is never - * called directly from application code, but only indirectly via the - * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * Perform architecture-specific initialization * - * Input Parameters: - * arg - The boardctl() argument is passed to the board_app_initialize() - * implementation without modification. The argument has no - * meaning to NuttX; the meaning of the argument is a contract - * between the board-specific initalization logic and the - * matching application logic. The value cold be such things as a - * mode enumeration value, a set of DIP switch switch settings, a - * pointer to configuration data read from a file or serial FLASH, - * or whatever you would like to do with it. Every implementation - * should accept zero/NULL as a default configuration. + * CONFIG_BOARD_INITIALIZE=y : + * Called from board_initialize(). * - * Returned Value: - * Zero (OK) is returned on success; a negated errno value is returned on - * any failure to indicate the nature of the failure. + * CONFIG_BOARD_INITIALIZE=n && CONFIG_LIB_BOARDCTL=y : + * Called from the NSH library * ****************************************************************************/ -int board_app_initialize(uintptr_t arg) +int stm32_bringup(void) { int ret; diff --git a/configs/viewtool-stm32f107/src/viewtool_stm32f107.h b/configs/viewtool-stm32f107/src/viewtool_stm32f107.h index 5978d55b956..8ec579e1407 100644 --- a/configs/viewtool-stm32f107/src/viewtool_stm32f107.h +++ b/configs/viewtool-stm32f107/src/viewtool_stm32f107.h @@ -308,6 +308,22 @@ #ifndef __ASSEMBLY__ +/**************************************************************************** + * Name: stm32_bringup + * + * Description: + * Perform architecture-specific initialization + * + * CONFIG_BOARD_INITIALIZE=y : + * Called from board_initialize(). + * + * CONFIG_BOARD_INITIALIZE=n && CONFIG_LIB_BOARDCTL=y : + * Called from the NSH library + * + ****************************************************************************/ + +int stm32_bringup(void); + /**************************************************************************** * Name: stm32_spidev_initialize *