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

Compile pc-ble-driver-py for arm (just compile pc-ble-driver-py and not the driver itself)

Hello,

I am trying to install the pc-ble-driver-py for my buildroot arm-board.

After some struggle I was able to compile the pc-ble-driver for it, however the python tool for it "pc-ble-driver-py" gives me some headache now.

For some reason pc-ble-driver-py builds its own drivers, which basically will be the false in the buildroot toolchain. (ERROR: architecture for "/usr/lib/python3.8/site-packages/pc_ble_driver_py/lib/_nrf_ble_driver_sd_api_v5.so" is "Advanced Micro Devices X86-64", should be "ARM") Although I dont want to use these anyways since I have my already compiled driver... Is there a way I can tell pc-ble-driver-py to stop compiling this pc-ble-drivers and just prepare the python tools and use the precompiled drivers instead?

I already tried to just delete the wrong drivers after the building process... sadly the program is to clever at that point and just rebuilds the wrong drivers...

EDIT: pc-ble-driver version: 4.1.2
         pc-ble-diver-py version: 0.14.2

Regards

F

  • Hi,

    I am afraid we do not have much further advice. This is an area that we have not been looking into previously, and it seems to be more of a general cross compile issue related to skbuild/cmake and correctly setting up a cmake toolchain. I recommend consulting e.g. the cmake documentation, and/or use support channels / forums dedicated to the toolchains, for how to set up existing projects for cross compilation. There are other resources better suited for getting help, when things go sufficiently far from our officially supported platforms.

    Regards,
    Terje

  • Hi Poteis,

    have a look at the portfile.cmake in vcpkg/ports/nrf-ble-driver:

    The section vcpkg_from_github references v4.1.1. After modifying this to REF v4.1.2 I managed to get pc-ble-driver-py V0.14.2 build with pc-ble-driver V4.1.2

    In the initial build it will complain that the SHA512 does not match, but it will also show you the SHA512 from V4.1.2. So if you trust the fetching at this point, you could simply modify the SHA512 in portfile.cmake to match the one for V4.1.2

    You will also have to change the section vcpkg_configure_cmake further down in portfile.cmake to match the version V4.1.2

    Hope that helps

Related