Skip to content

Commit 91d1cb8

Browse files
author
Jamie Smith
authored
Fix build of BlueNRG components by making them their own targets (ARMmbed#111)
* Fix build of BlueNRG components by making them their own targets * Link ble cordio to fix link order dependency * Fix typo breaking STM32L562 build * Revert "Link ble cordio to fix link order dependency" This reverts commit 1a9192f.
1 parent 73f1f12 commit 91d1cb8

File tree

6 files changed

+16
-14
lines changed

6 files changed

+16
-14
lines changed
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
target_sources(mbed-ble
5-
PRIVATE
6-
BlueNrg2HCIDriver.cpp
7-
)
4+
add_library(mbed-bluenrg-2 STATIC EXCLUDE_FROM_ALL
5+
BlueNrg2HCIDriver.cpp)
86

7+
target_link_libraries(mbed-bluenrg-2 PUBLIC
8+
mbed-os
9+
mbed-ble)

connectivity/drivers/ble/FEATURE_BLE/COMPONENT_BlueNRG_2/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ As an example, the target overide section for the `NUCLEO_F401RE` would be:
155155
}
156156
```
157157

158+
Then, you must link the `mbed-bluenrg-2` CMake target to your application. Note that the BlueNRG 2 driver requires Mbed RTOS and does not work with mbed-baremetal.
159+
158160
### Known limitations
159161

160162
Security does not work with privacy due to pairing failure.
Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
target_include_directories(mbed-ble
5-
PUBLIC
6-
.
7-
)
4+
add_library(mbed-bluenrg-ms STATIC EXCLUDE_FROM_ALL
5+
BlueNrgMsHCIDriver.cpp)
86

9-
target_sources(mbed-ble
10-
PRIVATE
11-
BlueNrgMsHCIDriver.cpp
12-
)
7+
target_link_libraries(mbed-bluenrg-ms PUBLIC
8+
mbed-os
9+
mbed-ble)

connectivity/drivers/ble/FEATURE_BLE/COMPONENT_BlueNRG_MS/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,3 +122,5 @@ As an example, the target overide section for the `NUCLEO_F401RE` would be:
122122
"target.extra_labels_add": ["CORDIO"]
123123
}
124124
```
125+
126+
Then, you must link the `mbed-bluenrg-ms` CMake target to your application. Note that the BlueNRG 2 driver requires Mbed RTOS and does not work with mbed-baremetal.

connectivity/drivers/mbedtls/TARGET_STM/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ elseif("STM32L486xG" IN_LIST MBED_TARGET_LABELS)
1313
add_subdirectory(TARGET_STM32L486xG)
1414
elseif("STM32L4S5xI" IN_LIST MBED_TARGET_LABELS)
1515
add_subdirectory(TARGET_STM32L4S5xI)
16-
elseif("STM32L562xx" IN_LIST MBED_TARGET_LABELS)
17-
add_subdirectory(TARGET_STM32L562xx)
16+
elseif("STM32L562xE" IN_LIST MBED_TARGET_LABELS)
17+
add_subdirectory(TARGET_STM32L562xE)
1818
elseif("STM32WB" IN_LIST MBED_TARGET_LABELS)
1919
add_subdirectory(TARGET_STM32WB)
2020
endif()

0 commit comments

Comments
 (0)