From b32c6ba2a5e194ecd8858ccf854d210cf7d43d5d Mon Sep 17 00:00:00 2001 From: Deepika Date: Mon, 26 Nov 2018 16:30:48 -0600 Subject: [PATCH] Components if using RTOS modules should be enabled only when RTOS is present Build failures were observed when rtos is ignored with .mbedignored. Components dependent on RTOS should be guarded with MBED_CONF_RTOS_PRESENT --- .../atmel-rf-driver/atmel-rf-driver/NanostackRfPhyAtmel.h | 2 +- .../atmel-rf-driver/source/NanostackRfPhyAtmel.cpp | 2 +- .../mcr20a-rf-driver/mcr20a-rf-driver/NanostackRfPhyMcr20a.h | 4 +--- .../mcr20a-rf-driver/source/NanostackRfPhyMcr20a.cpp | 2 +- .../stm-s2lp-rf-driver/source/NanostackRfPhys2lp.cpp | 2 +- .../stm-s2lp-rf-driver/NanostackRfPhys2lp.h | 2 +- components/wifi/esp8266-driver/ESP8266/ESP8266.cpp | 2 +- components/wifi/esp8266-driver/ESP8266/ESP8266.h | 2 +- components/wifi/esp8266-driver/ESP8266Interface.cpp | 2 +- components/wifi/esp8266-driver/ESP8266Interface.h | 2 +- 10 files changed, 10 insertions(+), 12 deletions(-) diff --git a/components/802.15.4_RF/atmel-rf-driver/atmel-rf-driver/NanostackRfPhyAtmel.h b/components/802.15.4_RF/atmel-rf-driver/atmel-rf-driver/NanostackRfPhyAtmel.h index 0adcb7c308..a5e6baa70e 100644 --- a/components/802.15.4_RF/atmel-rf-driver/atmel-rf-driver/NanostackRfPhyAtmel.h +++ b/components/802.15.4_RF/atmel-rf-driver/atmel-rf-driver/NanostackRfPhyAtmel.h @@ -20,7 +20,7 @@ #include "at24mac.h" #include "PinNames.h" -#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI && DEVICE_I2C +#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI && DEVICE_I2C && defined(MBED_CONF_RTOS_PRESENT) #include "NanostackRfPhy.h" diff --git a/components/802.15.4_RF/atmel-rf-driver/source/NanostackRfPhyAtmel.cpp b/components/802.15.4_RF/atmel-rf-driver/source/NanostackRfPhyAtmel.cpp index 89652958bb..d585cd1812 100644 --- a/components/802.15.4_RF/atmel-rf-driver/source/NanostackRfPhyAtmel.cpp +++ b/components/802.15.4_RF/atmel-rf-driver/source/NanostackRfPhyAtmel.cpp @@ -15,7 +15,7 @@ */ #include -#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI && DEVICE_I2C +#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI && DEVICE_I2C && defined(MBED_CONF_RTOS_PRESENT) #include "platform/arm_hal_interrupt.h" #include "nanostack/platform/arm_hal_phy.h" diff --git a/components/802.15.4_RF/mcr20a-rf-driver/mcr20a-rf-driver/NanostackRfPhyMcr20a.h b/components/802.15.4_RF/mcr20a-rf-driver/mcr20a-rf-driver/NanostackRfPhyMcr20a.h index 6ef567ad0d..3d17ef2579 100644 --- a/components/802.15.4_RF/mcr20a-rf-driver/mcr20a-rf-driver/NanostackRfPhyMcr20a.h +++ b/components/802.15.4_RF/mcr20a-rf-driver/mcr20a-rf-driver/NanostackRfPhyMcr20a.h @@ -17,10 +17,8 @@ #ifndef NANOSTACK_PHY_MCR20A_H_ #define NANOSTACK_PHY_MCR20A_H_ +#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI && defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" - -#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI - #include "NanostackRfPhy.h" // Arduino pin defaults for convenience diff --git a/components/802.15.4_RF/mcr20a-rf-driver/source/NanostackRfPhyMcr20a.cpp b/components/802.15.4_RF/mcr20a-rf-driver/source/NanostackRfPhyMcr20a.cpp index b2595401ba..08ba4cf1bc 100644 --- a/components/802.15.4_RF/mcr20a-rf-driver/source/NanostackRfPhyMcr20a.cpp +++ b/components/802.15.4_RF/mcr20a-rf-driver/source/NanostackRfPhyMcr20a.cpp @@ -15,7 +15,7 @@ */ #include "NanostackRfPhyMcr20a.h" -#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI +#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI && defined(MBED_CONF_RTOS_PRESENT) #include "ns_types.h" #include "platform/arm_hal_interrupt.h" diff --git a/components/802.15.4_RF/stm-s2lp-rf-driver/source/NanostackRfPhys2lp.cpp b/components/802.15.4_RF/stm-s2lp-rf-driver/source/NanostackRfPhys2lp.cpp index ca6bd64ed9..87f865a87c 100644 --- a/components/802.15.4_RF/stm-s2lp-rf-driver/source/NanostackRfPhys2lp.cpp +++ b/components/802.15.4_RF/stm-s2lp-rf-driver/source/NanostackRfPhys2lp.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ #include -#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI +#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI && defined(MBED_CONF_RTOS_PRESENT) #include "platform/arm_hal_interrupt.h" #include "nanostack/platform/arm_hal_phy.h" #include "ns_types.h" diff --git a/components/802.15.4_RF/stm-s2lp-rf-driver/stm-s2lp-rf-driver/NanostackRfPhys2lp.h b/components/802.15.4_RF/stm-s2lp-rf-driver/stm-s2lp-rf-driver/NanostackRfPhys2lp.h index 4dd3568c56..b24b855216 100644 --- a/components/802.15.4_RF/stm-s2lp-rf-driver/stm-s2lp-rf-driver/NanostackRfPhys2lp.h +++ b/components/802.15.4_RF/stm-s2lp-rf-driver/stm-s2lp-rf-driver/NanostackRfPhys2lp.h @@ -17,8 +17,8 @@ #ifndef NANOSTACK_PHY_S2LP_H_ #define NANOSTACK_PHY_S2LP_H_ +#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI && defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" -#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI #include "NanostackRfPhy.h" // Uncomment to use testing gpios attached to TX/RX processes diff --git a/components/wifi/esp8266-driver/ESP8266/ESP8266.cpp b/components/wifi/esp8266-driver/ESP8266/ESP8266.cpp index bcd7bd15f2..0210efb324 100644 --- a/components/wifi/esp8266-driver/ESP8266/ESP8266.cpp +++ b/components/wifi/esp8266-driver/ESP8266/ESP8266.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#ifdef MBED_CONF_NSAPI_PRESENT +#if defined(MBED_CONF_NSAPI_PRESENT) && defined(MBED_CONF_RTOS_PRESENT) #include #include #include diff --git a/components/wifi/esp8266-driver/ESP8266/ESP8266.h b/components/wifi/esp8266-driver/ESP8266/ESP8266.h index b1417747dc..db44e9cc10 100644 --- a/components/wifi/esp8266-driver/ESP8266/ESP8266.h +++ b/components/wifi/esp8266-driver/ESP8266/ESP8266.h @@ -17,7 +17,7 @@ #ifndef ESP8266_H #define ESP8266_H -#ifdef MBED_CONF_NSAPI_PRESENT +#if defined(MBED_CONF_NSAPI_PRESENT) && defined(MBED_CONF_RTOS_PRESENT) #include #include "drivers/UARTSerial.h" diff --git a/components/wifi/esp8266-driver/ESP8266Interface.cpp b/components/wifi/esp8266-driver/ESP8266Interface.cpp index ce85711946..e22df1295a 100644 --- a/components/wifi/esp8266-driver/ESP8266Interface.cpp +++ b/components/wifi/esp8266-driver/ESP8266Interface.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#ifdef MBED_CONF_NSAPI_PRESENT +#if defined(MBED_CONF_NSAPI_PRESENT) && defined(MBED_CONF_RTOS_PRESENT) #include #include diff --git a/components/wifi/esp8266-driver/ESP8266Interface.h b/components/wifi/esp8266-driver/ESP8266Interface.h index 124245d66d..5ae55948e8 100644 --- a/components/wifi/esp8266-driver/ESP8266Interface.h +++ b/components/wifi/esp8266-driver/ESP8266Interface.h @@ -17,7 +17,7 @@ #ifndef ESP8266_INTERFACE_H #define ESP8266_INTERFACE_H -#ifdef MBED_CONF_NSAPI_PRESENT +#if defined(MBED_CONF_NSAPI_PRESENT) && defined(MBED_CONF_RTOS_PRESENT) #include "ESP8266/ESP8266.h" #include "events/EventQueue.h" #include "events/mbed_shared_queues.h"