Ruuvi Gateway nRF52 code
Download Nordic SDK15.3 and install it at the project root. If you're working on multiple nRF projects, you can (and should) use softlinking instead.
Run git submodule update --init --recursive
. This will search for and install the other git repositories referenced by this project. If any of the submodules has a changed remote, you'll need to run git submodule sync --recursive
and again git submodule update --init --recursive
to update the modules from new remotes.
ARMGCC is used for Jenkins builds, it's recommended to use SES for developing.
Segger Embedded Studio can be set up by installing nRF Connect for Desktop and following Getting Started plugin instructions.
Start SES and open ruuvi.gateway_nrf.c.emProject
in src
directory, each of the target boards is in their own project.
Code is formatted with Artistic Style.
Run astyle --project=.astylerc ./target_file
.
The code can be checked with PVS Studio and Sonarcloud for some common errors, style issues and potential problems. Here is a link to generated report which gets pushed to GitHub.
Obtain license and software from Viva64.
Make runs PVS Studio scan and outputs results under doxygen/html/fullhtml.
This results into hundreds of warnings, it is up to you to filter the data you're interested in. For example you probably want to filter out warnings related to 64-bit systems.
Travis pushes the results to SonarCloud.IO. SonarCloud uses access token which is private to Ruuvi, you'll need to fork the project and setup the SonarCloud under your own account if you wish to run Sonar Scan on your own code.
Unit tests are implemented with Ceedling. Run the tests with
ceedling test:all
Builds are in the Github project releases.
Double click to select project: pca10040
or ruuvigw_nrf
.
Select the confuguaration used to build the project. For ruuvigw_nrf
only Release
version buildable.
Press F7
to build and F5
for debug, or select Build
and Debug
in menu.
Run make
in src
directory to build all the sources.
Run make clean
in src
directory to clean current build.
How to program nRF5x SoCs with nrfjprog you can find Nordic website.To get started:
nrfjprog --eraseall
nrfjprog --program ruuvigw_nrf_armgcc_ruuvigw_release_vX.X.X_full.hex
nrfjprog --reset