Error while setting up Movesense platform with Cmake commands

149 views Asked by At

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

  • I pulled the movesense container using docker

docker pull movesense/sensor-build-env:latest

  • I cloned the movesense repo using the below code

git clone [email protected]:suunto/movesense-device-lib.git

  • Then I moved to the cloned folder

cd movesense-device-lib

  • Then I started the docker image on the terminal

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

  • The docker prompted and I followed the below commands

cd /movesense mkdir myBuild cd myBuild

  • Now, I ran the CMake "Run the CMake (needs to be done only once unless you add files to the project). It's possible to build both the debug and release version. In both cases the command will contain the following:" by the following command

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

1

There are 1 answers

0
PetriL On BEST ANSWER

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