From be1fc59cc53016fdb073d87600b6f68a2ce6c847 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 8 Sep 2015 13:57:55 -0600 Subject: [PATCH] Olimexino STM32: Fix some build issues --- configs/olimexino-stm32/src/Makefile | 4 ++-- .../olimexino-stm32/src/{stm32_nsh.c => stm32_appinit.c} | 8 +++++--- configs/olimexino-stm32/src/stm32_composite.c | 2 +- configs/olimexino-stm32/src/stm32_usbmsc.c | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) rename configs/olimexino-stm32/src/{stm32_nsh.c => stm32_appinit.c} (96%) diff --git a/configs/olimexino-stm32/src/Makefile b/configs/olimexino-stm32/src/Makefile index a36bca75e4..452d5f3af7 100644 --- a/configs/olimexino-stm32/src/Makefile +++ b/configs/olimexino-stm32/src/Makefile @@ -42,8 +42,8 @@ ifeq ($(CONFIG_CAN),y) CSRCS += stm32_can.c endif -ifeq ($(CONFIG_NSH_LIBRARY),y) -CSRCS += stm32_nsh.c +ifeq ($(CONFIG_LIB_BOARDCTL),y) +CSRCS += stm32_appinit.c endif ifeq ($(CONFIG_HAVE_CXXINITIALIZE),y) diff --git a/configs/olimexino-stm32/src/stm32_nsh.c b/configs/olimexino-stm32/src/stm32_appinit.c similarity index 96% rename from configs/olimexino-stm32/src/stm32_nsh.c rename to configs/olimexino-stm32/src/stm32_appinit.c index 612809a3ca..d7042497ef 100644 --- a/configs/olimexino-stm32/src/stm32_nsh.c +++ b/configs/olimexino-stm32/src/stm32_appinit.c @@ -1,5 +1,5 @@ /************************************************************************************ - * configs/olimexino-stm32/src/stm32_nss.c + * configs/olimexino-stm32/src/stm32_appinit.c * * Copyright (C) 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -87,14 +87,16 @@ int board_app_initialize(void) { int ret = OK; - /* Initialize SPI-based microSD if the apps are not installed*/ - +#ifdef CONFIG_USBMSC #if !defined(CONFIG_NSH_BUILTIN_APPS) && !defined(CONFIG_SYSTEM_USBMSC) ret = usbmsc_archinitialize(); #endif +#endif +#ifdef CONFIG_USBDEV_COMPOSITE #if !defined(CONFIG_NSH_BUILTIN_APPS) && !defined(CONFIG_SYSTEM_COMPOSITE) ret = composite_archinitialize(); +#endif #endif return ret; diff --git a/configs/olimexino-stm32/src/stm32_composite.c b/configs/olimexino-stm32/src/stm32_composite.c index 1c85db50ba..3ba7cf423e 100644 --- a/configs/olimexino-stm32/src/stm32_composite.c +++ b/configs/olimexino-stm32/src/stm32_composite.c @@ -91,7 +91,7 @@ int composite_archinitialize(void) { /* If system/composite is built as an NSH command, then SD slot should - * already have been initialized in board_app_initialize() (see stm32_nsh.c). + * already have been initialized in board_app_initialize() (see stm32_appinit.c). * In this case, there is nothing further to be done here. */ diff --git a/configs/olimexino-stm32/src/stm32_usbmsc.c b/configs/olimexino-stm32/src/stm32_usbmsc.c index 39cf90b5a6..5b942c3177 100644 --- a/configs/olimexino-stm32/src/stm32_usbmsc.c +++ b/configs/olimexino-stm32/src/stm32_usbmsc.c @@ -93,7 +93,7 @@ int usbmsc_archinitialize(void) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initialized in board_app_initialize() (see stm32_nsh.c). + * already have been initialized in board_app_initialize() (see stm32_appinit.c). * In this case, there is nothing further to be done here. */