I am trying to use the pc-ble-driver and as a first step want to use the heart_rate_collector example. I downloaded the source as follows:
git clone https://github.com/NordicSemiconductor/pc-ble-driver.git pc-ble-driver.git cd pc-gle-driver.git git checkout v4.1.2
I then followed the instructions from https://github.com/NordicSemiconductor/pc-ble-driver/tree/v4.1.2#compiling-pc-ble-driver-from-source to try to build a Makefile for the example/heart_rate_collector sample.
My environment is 64-bit Windows 10 with VisualStudio Build tools 2019. I used a "x64 Native Tools Command Prompt for VS 2019 to run the commands. I ran into some errors and issues along the way and had to make some changes to handle them. These are the commands I used:
git clone https://github.com/Microsoft/vcpkg.git cd vcpkg git checkout tags/2020.04 .\bootstrap-vcpkg.bat C:\Projects\BLEapp\pc-ble-driver.git\build>echo %VCPKG_ROOT% C:\Projects\BLEapp\pc-ble-driver.git\vcpkg C:\Projects\BLEapp\pc-ble-driver.git\build>where gcc C:\TDM-GCC-64\bin\gcc.exe C:\Projects\BLEapp\pc-ble-driver.git\build>gcc --version gcc (tdm64-1) 9.2.0 C:\Projects\BLEapp\pc-ble-driver.git mkdir build cd build vcpkg install asio --triplet x64-windows vcpkg install catch2 --triplet x64-windows vcpkg install spdlog --triplet x64-windows cmake -G Ninja .. cmake --build .
The last line failed with:
[11/262] Building CXX object CMakeFiles/nrf_ble_driver_obj_sd_api_v2.dir/src/common/platform/win/enumser.cpp.obj FAILED: CMakeFiles/nrf_ble_driver_obj_sd_api_v2.dir/src/common/platform/win/enumser.cpp.obj C:\TDM-GCC-64\bin\c++.exe -DASIO_STANDALONE -DHCI_LINK_CONTROL -DNRF_SD_BLE_API_VERSION=2 -DSD_RPC_EXPORTS -D_CRT_SECURE_NO_WARNINGS -isystem ../src/sd_api_common/sdk/components/libraries/util -isystem ../src/sd_api_v2/sdk/components/serialization/application/codecs/common -isystem ../src/sd_api_v2/sdk/components/serialization/application/codecs/s130/serializers -isystem ../src/sd_api_v2/sdk/components/serialization/common -isystem ../src/sd_api_v2/sdk/components/serialization/common/struct_ser/s130 -isystem ../include/common -isystem ../include/common/internal -isystem ../include/common/internal/transport -isystem ../vcpkg/installed/x64-windows/include -isystem ../include/common/config -isystem ../include/common/sdk_compat -isystem ../include/sd_api_v2 -Wall -Wno-unknown-pragmas -Wno-undef -Wno-long-long -Wfloat-equal -Wpointer-arith -Wlogical-op -std=c++14 -std=gnu++14 -MD -MT CMakeFiles/nrf_ble_driver_obj_sd_api_v2.dir/src/common/platform/win/enumser.cpp.obj -MF CMakeFiles\nrf_ble_driver_obj_sd_api_v2.dir\src\common\platform\win\enumser.cpp.obj.d -o CMakeFiles/nrf_ble_driver_obj_sd_api_v2.dir/src/common/platform/win/enumser.cpp.obj -c ../src/common/platform/win/enumser.cpp
There were many, many more lines of diagnostics created. I can add them if necessary but the end result is the same; I cannot get the driver to build the Makefile I need to use the examples.
This could be caused by using gcc 9.2.0, or maybe VS 2019, or maybe 64-bit, or maybe something else.
Any suggestions on how to get the Makefile for example/heart_rate_collector to be generated?