ARMmbed / ARMmbed/mbed-os-example-ble
How to change component to "BlueNRG_2" from "BlueNRG_MS"
- Dominant language
- C++
- Stars
- 135
- Forks
- 114
- PR merge metrics
- No merged PRs in 30d
Description
### Problem
I have two boards, one is NUCLEO-L446RE, the other is NUCLEO-BNRG2A1. I want to modify the app_main.json in the BLE_Advertising example and change "BlueNRG_MS" to "BlueNRG_2". But I got an error.
```
Cannot specify link libraries target "mbed-ble-bluenrg2" which is not built by this project.
```
#### mbed cli V2 version is `7.59.0`
#### arm-none-eabi-gcc version is `10.3.1 20210824`
#### mbed-os branch is `master`
#### How is this defect reproduced ?
1. Replace "BlueNRG_MS" to "BlueNRG_2" in line[17](https://github.com/ARMmbed/mbed-os-example-ble/blob/development/BLE_Advertising/mbed_app.json#L17)
2. Add cmd in shell as below:
```bash
mbed-tools configure -m NUCLEO_F401RE -t GCC_ARM
mbed-tools compile -m NUCLEO_F401RE -t GCC_ARM
```
#### Log
```
Configuring project and generating build system...
CMake Error at mbed-os/connectivity/drivers/ble/FEATURE_BLE/COMPONENT_BlueNRG_2/CMakeLists.txt:4 (target_sources):
Cannot specify sources for target "mbed-ble-bluenrg2" which is not built by
this project.
CMake Error at mbed-os/connectivity/drivers/ble/FEATURE_BLE/COMPONENT_BlueNRG_2/CMakeLists.txt:9 (target_link_libraries):
Cannot specify link libraries for target "mbed-ble-bluenrg2" which is not
built by this project.
-- Configuring incomplete, errors occurred!
See also "/mbed/mbed-os-example-ble/BLE_Advertising/cmake_build/NUCLEO_F401RE/debug/GCC_ARM/CMakeFiles/CMakeOutput.log".
See also "/mbed/mbed-os-example-ble/BLE_Advertising/cmake_build/NUCLEO_F401RE/debug/GCC_ARM/CMakeFiles/CMakeError.log".
ERROR: CMake invocation failed!
```
Contributor guide
Research direction
Start with BLE_Advertising/mbed_app.json at line 17 and the mbed-os/connectivity/drivers/ble/FEATURE_BLE/COMPONENT_BlueNRG_2/CMakeLists.txt entry points. Reproduce the failure with mbed-tools configure and compile for NUCLEO_F401RE using GCC_ARM, then compare the generated CMake target expectations. Done means the BlueNRG_2 configuration completes without the reported target errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp
- Domain
- build-system, embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100