This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Troubles in compiling pc-ble-driver v4.1.2 for Python project with nRF52840 dongle

Hi,

As many of you, I'm tryng to compile pc-ble-driver (v4.1.2) found in https://github.com/NordicSemiconductor/pc-ble-driver/tree/v4.1.2, just to see how the code works and to re-use some parts in a Python project that I'm developing using the nRF52840 Dongle.

The Operative System is Windows 10 64-bit.

I've completed successfully the following steps Driver installationDriver validationInstalling toolsInstalling dependencies until facing troubles in Compiling pc-ble-driver on Windows:

- First problem encountered when Installing vcpkg dependencies: from the System Environment, I had to delete VCPKG_ROOT variable (previously set in the step 5 of Installing dependencies on Windows) and leave only the vcpkg correct link in path variable; after that I was able to install the vcpkg dependencies

Fullscreen
1
2
3
4
5
mkdir build
cd build
vcpkg install asio
vcpkg install catch2
vcpkg install --head spdlog
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

- Second problem encountered at point "CMake Select the Visual Studio compiler to use according to this article: Build C/C++ code on the command line": (here I'm asking if someone can help me)

in this section, the System Environment variables CC and CXX were set  for MSVC compiler, and the cmake answer is as follow:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
PS C:\Users\Fabio\Documents\nRF52840_Dongle\pc-ble-driver-4.1.2\build> cmake -G Ninja ..
-- NRF_BLE_DRIVER_VERSION not specified, setting it to 0.0.0
-- CONNECTIVITY_VERSION not specified, setting it to 0.0.0
-- The C compiler identification is MSVC 19.27.29112.0
-- The CXX compiler identification is MSVC 19.27.29112.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.27.29110/bin/Hostx86/x86/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.27.29110/bin/Hostx86/x86/cl.exe - broken
CMake Error at C:/Program Files/CMake/share/cmake-3.18/Modules/CMakeTestCCompiler.cmake:66 (message):
The C compiler
"C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.27.29110/bin/Hostx86/x86/cl.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/Fabio/Documents/nRF52840_Dongle/pc-ble-driver-4.1.2/build/CMakeFiles/CMakeTmp
Run Build Command(s):C:/ProgramData/chocolatey/bin/ninja.exe cmTC_23be1 && [1/2] Building C object CMakeFiles\cmTC_23be1.dir\testCCompiler.c.obj
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

So, long story short, I'm blocked: Can any one please help me?

P.S. As a completion, but don't think is part of the problem, "gcc-arm-none-eabi-9-2020-q2-update-win32" was installed and 

 the `Mass Storage Device` was disable (using regedit ), as described in Driver installation

Thank you.

Fabio