Hi all,
I'm trying to build the hex files for the pc-ble-driver and am running into build issues.
My Setup
I'm running a Linux (Ubuntu 18.04) VM that I also currently develop NCS applications on. I started by following the README and installing the dependencies. I did not build them from source, but instead used either `brew` or `apt` to install them (just in case that is salient). I am able to build the Host-side examples/tests successfully; its only the hex files that I cannot build.
Also, I have a nrf52840 DK that I am trying to target for my prototyping.
Tool Versions
- $ ninja --version
1.10.0 - $ cmake --version
cmake version 3.17.3 - $ git --version
git version 2.27.0
Procedure
I've tried building the hex files with a number of different versions/branches/tags from the repo. I'll show the output from them all:
v4.1.2
wellhead@wellhead:~/pc-ble-driver/hex$ git checkout v4.1.2 HEAD is now at fc25a56 Add SDv2 connectivity firmware wellhead@wellhead:~/pc-ble-driver/hex$ mkdir build && cd build wellhead@wellhead:~/pc-ble-driver/hex/build$ export TMP=/tmp wellhead@wellhead:~/pc-ble-driver/hex/build$ cmake -G Ninja -DCOMPILE_CONNECTIVITY=1 -DCONNECTIVITY_VERSION=1.0.0 .. -- The C compiler identification is GNU 7.5.0 -- The CXX compiler identification is GNU 7.5.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc - works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ - works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done -- Generating done CMake Warning: Manually-specified variables were not used by the project: COMPILE_CONNECTIVITY CONNECTIVITY_VERSION -- Build files have been written to: /home/wellhead/pc-ble-driver/hex/build wellhead@wellhead:~/pc-ble-driver/hex/build$ cmake --build . --target compile_connectivity ninja: error: unknown target 'compile_connectivity'
master
wellhead@wellhead:~/pc-ble-driver/hex$ git checkout origin/master HEAD is now at b30193c Update/sdk153 (#257) wellhead@wellhead:~/pc-ble-driver/hex$ mkdir build && cd build wellhead@wellhead:~/pc-ble-driver/hex/build$ cmake -G Ninja -DCOMPILE_CONNECTIVITY=1 -DCONNECTIVITY_VERSION=1.0.0 .. -- The C compiler identification is GNU 7.5.0 -- The CXX compiler identification is GNU 7.5.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc - works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ - works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done -- Generating done CMake Warning: Manually-specified variables were not used by the project: COMPILE_CONNECTIVITY CONNECTIVITY_VERSION -- Build files have been written to: /home/wellhead/pc-ble-driver/hex/build wellhead@wellhead:~/pc-ble-driver/hex/build$ cmake --build . --target compile_connectivity ninja: error: unknown target 'compile_connectivity'
v4.1.1
wellhead@wellhead:~/pc-ble-driver/hex$ git checkout v4.1.1 HEAD is now at 0c7653f Merge branch 'master' into release/4.1-compiled-connectivity wellhead@wellhead:~/pc-ble-driver/hex$ mkdir build && cd build wellhead@wellhead:~/pc-ble-driver/hex/build$ cmake -G Ninja -DCOMPILE_CONNECTIVITY=1 -DCONNECTIVITY_VERSION=1.0.0 .. -- The C compiler identification is GNU 7.5.0 -- The CXX compiler identification is GNU 7.5.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc - works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ - works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Using cached /tmp/pc-ble-driver/sdks/nRF5_SDK_11.0.0_89a8197.zip -- Testing integrity of cached file... -- Testing integrity of cached file... OK -- Patching files in directory: /tmp/pc-ble-driver/sdks/v11 -- Not inside a git work tree, applying patches. -- Applying patches in directory /tmp/pc-ble-driver/sdks/v11 -- git error: fatal: not a git repository (or any of the parent directories): .git -- Applying patch /home/wellhead/pc-ble-driver/hex/nRF5_SDK_11.0.0_connectivity.patch -- Found armgcc in path /opt/gcc-arm-none-eabi-9-2020-q2-update/bin/arm-none-eabi-gcc. -- armgcc returned with version number 9.3.1 CMake Error at cmake/util.cmake:55 (message): Required armgcc toolchain version not provided. Needs to be 7.3.1. Call Stack (most recent call first): cmake/util.cmake:195 (nrf_configure_sdk_values) CMakeLists.txt:277 (nrf_prepare_sdk) -- Configuring incomplete, errors occurred! See also "/home/wellhead/pc-ble-driver/hex/build/CMakeFiles/CMakeOutput.log". wellhead@wellhead:~/pc-ble-driver/hex/build$ cmake --build . --target compile_connectivity ninja: error: loading 'build.ninja': No such file or directory
I am guessing that the README is out-of-date, but I'm not sure how to fix this. Can you help? Thank you in advance!