ARMmbed / mbed-os-example-ble

BLE demos using mbed OS and mbed cli
Apache License 2.0
134 stars 118 forks source link

mbed-tools.exe does not clone mbed-os-ble-utils for BLE_SupportedFeatures #382

Closed pearson closed 3 years ago

pearson commented 3 years ago

Description of defect

When using mbed-tools.exe import mbed-os-example-ble, a copy of mbed-os-ble-utils is not cloned for the BLE_SupportedFeatures directory, causing this CMake error:

[cmake] CMake Error at CMakeLists.txt:15 (add_subdirectory):
[cmake]   add_subdirectory given source "mbed-os-ble-utils" which is not an existing
[cmake]   directory.

Target(s) and toolchain(s) (name and version) displaying this defect ?

Mbed CLI 2 v7.20.0, arm-none-eabi 10.2.1, on Windows 10

What version of the example and mbed-os are you using (tag or sha) ?

The BLE_SupportedServices directory is commit 3363f064c8b58bac77a564ef0c8a784da6ba7ca9, but I suspect this has something to do with mbed-tools.exe and whatever list it gets for imports.

How is this defect reproduced ?

  1. Use mbed-tools.exe import mbed-os-example-ble from a command prompt
  2. Wait for the import is complete (it takes a while, as it is cloning mbed-os for each example directory)
  3. Two choices here:
    1. Configure and build the project, noting the immediate CMake error.
    2. Simply examine the import directory mbed-os-example-ble\BLE_SupportedFeatures directory and notice the lack of a mbed-os-ble-utils directory.

Please attach a file containing the log with traces enabled.

The full CMake output is:

[main] Configuring folder: BLE_SupportedFeatures 
[proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" --no-warn-unused-cli -DWORKSPACE_FOLDER_BASENAME:STRING=BLE_SupportedFeatures -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug "-DCMAKE_C_COMPILER:FILEPATH=C:\Program Files (x86)\GNU Arm Embedded Toolchain\10 2020-q4-major\bin\arm-none-eabi-gcc.exe" "-DCMAKE_CXX_COMPILER:FILEPATH=C:\Program Files (x86)\GNU Arm Embedded Toolchain\10 2020-q4-major\bin\arm-none-eabi-g++.exe" -Hc:/Projects/Mbed/test_ble/BLE_SupportedFeatures -BC:/temp/BLE_SupportedFeatures -G Ninja
[cmake] Not searching for unused variables given on the command line.
[cmake] CMake Error at CMakeLists.txt:15 (add_subdirectory):
[cmake]   add_subdirectory given source "mbed-os-ble-utils" which is not an existing
[cmake]   directory.
[cmake] 
[cmake] 
[cmake] -- Configuring incomplete, errors occurred!
[cmake] See also "C:/temp/BLE_SupportedFeatures/CMakeFiles/CMakeOutput.log".
[cmake] See also "C:/temp/BLE_SupportedFeatures/CMakeFiles/CMakeError.log".
pearson commented 3 years ago

This was my mistake. I must have dragged a CMakeLists.txt from a different BLE example into the BLE_SupportedFeatures. Sorry about that!