From 1c00ec562fe5e71439c29534d38a139a59cb39de Mon Sep 17 00:00:00 2001 From: Jamie Smith Date: Wed, 1 Mar 2023 09:12:00 -0800 Subject: [PATCH] Fix BlueNRG undefined reference to ble_cordio_get_hci_driver() (#145) --- .../COMPONENT_BlueNRG_2/CMakeLists.txt | 16 +++++++++++----- .../COMPONENT_BlueNRG_MS/CMakeLists.txt | 13 ++++++++++--- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/connectivity/drivers/ble/FEATURE_BLE/COMPONENT_BlueNRG_2/CMakeLists.txt b/connectivity/drivers/ble/FEATURE_BLE/COMPONENT_BlueNRG_2/CMakeLists.txt index ce50789e68..4f7fd7fdb1 100644 --- a/connectivity/drivers/ble/FEATURE_BLE/COMPONENT_BlueNRG_2/CMakeLists.txt +++ b/connectivity/drivers/ble/FEATURE_BLE/COMPONENT_BlueNRG_2/CMakeLists.txt @@ -1,9 +1,15 @@ # Copyright (c) 2020 ARM Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -add_library(mbed-bluenrg-2 STATIC EXCLUDE_FROM_ALL - BlueNrg2HCIDriver.cpp) +add_library(mbed-bluenrg2 STATIC EXCLUDE_FROM_ALL + BlueNrg2HCIDriver.cpp) -target_link_libraries(mbed-bluenrg-2 PUBLIC - mbed-os - mbed-ble) +target_link_libraries(mbed-bluenrg2 + PUBLIC + mbed-core-flags + mbed-ble + PRIVATE + mbed-rtos-flags) + +# circular dependency between mbed-ble and the BlueNRG driver, because of the ble_cordio_get_hci_driver() implementation +target_link_libraries(mbed-ble PUBLIC mbed-bluenrg2) \ No newline at end of file diff --git a/connectivity/drivers/ble/FEATURE_BLE/COMPONENT_BlueNRG_MS/CMakeLists.txt b/connectivity/drivers/ble/FEATURE_BLE/COMPONENT_BlueNRG_MS/CMakeLists.txt index 2cc9feabfd..1ae932b57d 100644 --- a/connectivity/drivers/ble/FEATURE_BLE/COMPONENT_BlueNRG_MS/CMakeLists.txt +++ b/connectivity/drivers/ble/FEATURE_BLE/COMPONENT_BlueNRG_MS/CMakeLists.txt @@ -4,6 +4,13 @@ add_library(mbed-bluenrg-ms STATIC EXCLUDE_FROM_ALL BlueNrgMsHCIDriver.cpp) -target_link_libraries(mbed-bluenrg-ms PUBLIC - mbed-os - mbed-ble) \ No newline at end of file +target_link_libraries(mbed-bluenrg-ms + PUBLIC + mbed-core-flags + mbed-ble + PRIVATE + mbed-rtos-flags) + + +# circular dependency between mbed-ble and the BlueNRG driver, because of the ble_cordio_get_hci_driver() implementation +target_link_libraries(mbed-ble PUBLIC mbed-bluenrg-ms) \ No newline at end of file