From 2da19720121ebb1c86166a04e78369de359a8052 Mon Sep 17 00:00:00 2001 From: Hugues Kamba Date: Thu, 11 Mar 2021 13:27:08 +0000 Subject: [PATCH 1/2] CMake: Fix EP_ATLAS build Enable Onboard TELIT ME310 driver only when cellular library is included. This allows us to remove the cellular library as a requirement to build applications that do not require it (i.e Blinky). --- .../TARGET_EP_ATLAS/ONBOARD_TELIT_ME310.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/TARGET_EP_ATLAS/ONBOARD_TELIT_ME310.cpp b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/TARGET_EP_ATLAS/ONBOARD_TELIT_ME310.cpp index 0fd55721df..1344ca2365 100644 --- a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/TARGET_EP_ATLAS/ONBOARD_TELIT_ME310.cpp +++ b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/TARGET_EP_ATLAS/ONBOARD_TELIT_ME310.cpp @@ -15,6 +15,8 @@ * limitations under the License. */ +#if MBED_CONF_CELLULAR_PRESENT + #include "gpio_api.h" #include "platform/mbed_thread.h" #include "PinNames.h" @@ -167,3 +169,5 @@ CellularDevice *CellularDevice::get_target_default_instance() static ONBOARD_TELIT_ME310 device(&serial); return &device; } + +#endif // MBED_CONF_CELLULAR_PRESENT From 811a72af88f5122024640db99af0a06607ea63e0 Mon Sep 17 00:00:00 2001 From: Hugues Kamba Date: Thu, 11 Mar 2021 13:29:49 +0000 Subject: [PATCH 2/2] EP_ATLAS: Remove requirement for USB library if not required Move inclusion of USB header file within the existing conditional pre-processor directive so the USB library is not required if USB stdio console is disable --- .../TARGET_MCU_NRF52840/TARGET_EP_ATLAS/usb_stdio.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/TARGET_EP_ATLAS/usb_stdio.cpp b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/TARGET_EP_ATLAS/usb_stdio.cpp index fa0401ea1c..10a451f37b 100644 --- a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/TARGET_EP_ATLAS/usb_stdio.cpp +++ b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/TARGET_EP_ATLAS/usb_stdio.cpp @@ -16,15 +16,15 @@ * limitations under the License. */ -#include "USBSerial.h" -#include "platform/mbed_retarget.h" - #ifndef MBED_CONF_EP_ATLAS_ENABLE_USB_STDIO_CONSOLE #define MBED_CONF_EP_ATLAS_ENABLE_USB_STDIO_CONSOLE 0 #endif #if MBED_CONF_EP_ATLAS_ENABLE_USB_STDIO_CONSOLE +#include "USBSerial.h" +#include "platform/mbed_retarget.h" + /* Retarget stdio to USBSerial */ mbed::FileHandle *mbed::mbed_target_override_console(int fd) {