c++dockercmakemovesense

Error while setting up Movesense platform with Cmake commands


I've been trying to set up movesense platform in my windows 10 machine and facing issues with cmake commands.

docker pull movesense/sensor-build-env:latest

git clone git@bitbucket.org:suunto/movesense-device-lib.git

cd movesense-device-lib

docker run -it --rm -v c:/My/Project/Folder/movesense-device-lib:/movesense:delegated movesense/sensor-build-env:latest

cd /movesense mkdir myBuild cd myBuild

cmake -G Ninja -DMOVESENSE_CORE_LIBRARY=../MovesenseCoreLib/ -DCMAKE_TOOLCHAIN_FILE=../MovesenseCoreLib/toolchain/gcc-nrf52.cmake <sample_directory>

I created a sample folder as build1 and saved. In the place of sample_directory, I pasted "build" and executed the command. But in return I get an error as

CMake Error: The source directory "/movesense/myBuild/build" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI.

The objective is to create a project as zip file and run it in visual studio. Please help me to solve the issue. I've attached the links of the documents which I followed from movesense.

Movesense Set up document


Solution

  • The "<sample_directory>" should be a path to the folder where the firmware source code is (i.e. the sample app folder). If you create the build folder as /movesense/myBuild and cd into it, the path would be ../samples/blinky_app if you are building the blinky_app -sample.

    Full disclosure: I work for the movesense team