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

  • What are your subfolders inside nRF5_SDK_17? 

    Is it like this in the folder?

  • hi Mttrinh, yes that is the exact files in the folder nRF5_SDK_17. It is newly downloaded sdk. I copy pasted the path when i set the user environment variable so i im sure there is no typo there. Even if I let it download the SDK. the SDK 16 is actually downloaded by the command nRF5_SDK. For testing, how can I actually set the SDK_ROOT absolute directory in the CMakeLists.txt? It looks its not looking at the environment variable.

  • 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)

Related