Getting started with Sensor SW 2.0


These instructions help you to get started with Movesense sensor software development. Do read this carefully since the toolchains have been completely changed from earlier versions!


Toolchain and usage

Software requirements

The following tools need to be installed in order to run the examples in this document.

Mandatory

Optional

Movesense device library is available here.

Build commands (Real HW)

First pull the Movesense build environment container:

docker pull movesense/sensor-build-env:latest

To successfully build the Movesense software it's required to clone the Movesense-device-lib repository:

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

After that go to the cloned repository folder

cd movesense-device-lib

start the docker image on terminal:

Linux or Mac:

docker run -it --rm -v `pwd`:/movesense:delegated movesense/sensor-build-env:latest

Windows:

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

and when docker prompt starts:

cd /movesense
mkdir myBuild
cd myBuild

Now, 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:

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

But to build a release version it's neccessary to specify the CMAKE_BUILD_TYPE option with the Release value:

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

Note that the means the relative path to the CMakeLists.txt file of the application desired to be built. For example: ../samples/hello_world_app

After that only the last step remains:

ninja pkgs

The created Movesense_combined.hex and the DFU packages can be found in the same directory.

Build commands (Sensor Simulator)

Sensor simulator builds have not changed since 1.9, so please follow the instruction from the old documentation.