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

Compiling the BLE mesh examples

Hello, 

I am trying to compile the samples from SDK_for_mesh_v4.2.0 but i have problem with my environment set-up. I am following closely the documentation but I think something is missing that i could not figure it out. I had installed all tools. But when I ran cmake -G Ninja .., I see a warning that it could not fine nRF5_SDK. I did the recommendation to run nRF5_SDK but I get the same error after that. I set an environment variable SDK_ROOT with value nRF5_SDK_16.0.0_98a08e2 because that is my SDK but still the same. I could not find the documentation where else I should set that. Sorry it looks a stupid question but it took me 2 days with out success. I am new to cmake/make/gcc etc. by the way, I was able to compile examples from nRF SDK v17 but I'm interested in BLE mesh. Below is my folder structure.

Thanks

Parents
  • Hi,

    Can you walk me through step-by-step what you have done so far? What command did you run to get the above message?

  • Did you make a build folder in the root of the Mesh SDK? Then run the command:

    cmake -G Ninja ..

    inside this build folder?

    Can you upload the whole log after you entered that command?

    Double check for typos in your path. 

  • yes I made a build directory nrf5_SDK_for_Mesh_v4.2.0\build and I am running the command here. Here is the log. I also tried to run ninja help that might give you a hint. 

    PS D:\Mago\nrf5_SDK_for_Mesh_v4.2.0\build> cmake -G Ninja ..
    -- Configuring CMake for nRF5 SDK for Bluetooth Mesh 4.2.0
    -- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
    CMake Warning at CMake/FindSDK.cmake:24 (message):
    Could not find `patch` executable. Automatic patching of the nRF5 SDK not
    supported. See for diff to apply.
    Call Stack (most recent call first):
    CMakeLists.txt:49 (include)


    CMake Warning at CMake/FindSDK.cmake:56 (message):


    Could not find the nRF5 SDK. The build will fail.
    Please run the nRF5_SDK target to download it or provide the correct path
    using the -DSDK_ROOT option or setting the SDK_ROOT environment variable.
    After the download is complete, re-run `cmake`.

    Call Stack (most recent call first):
    CMakeLists.txt:49 (include)


    -- Configuring done
    -- Generating done
    -- Build files have been written to: D:/Mago/nrf5_SDK_for_Mesh_v4.2.0/build
    PS D:\Mago\nrf5_SDK_for_Mesh_v4.2.0\build> ninja help
    [1/1] All primary targets available:
    nRF5_SDK: phony
    edit_cache: phony
    rebuild_cache: phony
    all: phony
    build.ninja: RERUN_CMAKE
    clean: CLEAN
    help: HELP
    PS D:\Mago\nrf5_SDK_for_Mesh_v4.2.0\build>

  • What are your subfolders inside nRF5_SDK_17? 

    Is it like this in the folder?

  • What happens if you remove the SDK_ROOT user environment variable and then try to run the command?

  • Thanks for providing inputs. I had played around and doing trial and error and now I am able to build when i moved the environment variable from user to system. It's weird but yeah after doing that I can now build. But I still see the warning on the patch that It can not find the 'patch' executable, What is the 'patch executable' for? It might be part of the culprit if it has something to do with setting up or updating configurations. I also see that Doxygen is missing but I know doxygen and i don't need it. Below is part of the log. 

    -- Configuring CMake for nRF5 SDK for Bluetooth Mesh 4.2.0
    -- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
    CMake Warning at CMake/FindSDK.cmake:24 (message):
    Could not find `patch` executable. Automatic patching of the nRF5 SDK not
    supported. See for diff to apply.
    Call Stack (most recent call first):
    CMakeLists.txt:49 (include)

Reply
  • Thanks for providing inputs. I had played around and doing trial and error and now I am able to build when i moved the environment variable from user to system. It's weird but yeah after doing that I can now build. But I still see the warning on the patch that It can not find the 'patch' executable, What is the 'patch executable' for? It might be part of the culprit if it has something to do with setting up or updating configurations. I also see that Doxygen is missing but I know doxygen and i don't need it. Below is part of the log. 

    -- Configuring CMake for nRF5 SDK for Bluetooth Mesh 4.2.0
    -- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
    CMake Warning at CMake/FindSDK.cmake:24 (message):
    Could not find `patch` executable. Automatic patching of the nRF5 SDK not
    supported. See for diff to apply.
    Call Stack (most recent call first):
    CMakeLists.txt:49 (include)

Children
No Data
Related