Software development kit for the SENSEI ecosystem.
This repository contains the SENSEI specific SDK for the NRF5340 and the GAP9.
Currently the nRF Connect SDK v2.6.1 is supported!
First, install the NRF Connect SDK and GAP9 SDK as described in Install.md.
Next, clone this repository:
git clone [email protected]:sensei/software/sensei-sdk.git
cd sensei-sdk
git submodule update --init --recursiveInstall pre-commit hooks.
source scripts/install-hooks.sh
Make sure to export the following environment variables.
export SENSEI_SDK_ROOT=$(pwd)
# Bash (Permanently)
echo "export SENSEI_SDK_ROOT=$(pwd)" >> ~/.bashrc
# Zsh (Permanently)
echo "export SENSEI_SDK_ROOT=$(pwd)" >> ~/.zshrc
# Fish (Permanently)
echo "set -x SENSEI_SDK_ROOT $(pwd)" >> ~/.config/fish/config.fishEach example contains two folders: src_GAP9 and src_NRF. The former contains the GAP9 specific code, while the latter contains the NRF specific code.
First, flash the NRF application by opening it in Visual Studio Code using the NRF Connect SDK extension or use the terminal as described below.
Make sure your SENSEI_SDK_ROOT environment variable is set to the path of the SENSEI SDK!
Open the sensei-sdk.code-workspace file in Visual Studio Code. This will load the workspace with all relevant folders.
Furthermore, it will automatically set the the SENSEI board to to list of supported boards in the nRF Connect SDK extension.
- Use the file explorer to navigate to the desired example folder and select "nRF Connect: Add Folder as Application" on the
src_NRFfolder. - In the "Applications" tab of the nRF Connect SDK extension, select the newly added application and click on "Add build configuration".
- In the new window under "CMakePreset", select "Build for NRF5340 SENSEIV1C APP (build)", and select
v2.6.1as SDK version andv2.9.1as Toolchain version. - Click on "Generate and Build" to build the application.
- In the "Actions" tab click on "Flash" to flash the application to the board.
Make sure to export ZEPHYR_BASE pointing to the correct nRF Connect SDK folder and you activated the mamba/conda environment as described in Install.md.
To build and flash the nRF application, open a terminal in the src_NRF folder of the desired example and run the following commands:
cd <example>/src_NRF
west build -b nrf5340_senseiv1_cpuapp
west flashNext, flash the GAP9 application by opening a terminal in the src_GAP9 folder and running the following command:
gap init
gap runIn case you want to use GVSoC, modify the sdk.config and enable CONFIG_PLATFORM_GVSOC=y. Alternatively, run:
gap menuconfigto configure the configuration with a graphical interface in the terminal.
- MAX77654: Analog Devices Power Management IC,
- PCA6416A: NXP GPIO Expander,
- Requires
CONFIG_GPIOandCONFIG_GPIO_PCA64XXAto be enabled.
- Requires
- IS31FL3194: I2C RGB LED,
- From main Zephyr branch (see Docs)
- Philip Wiese ([email protected])
- Sebastian Frey ([email protected])
We provide the pre-commit configuration file which you can use to install github hooks that execute the formatting commands on your changes.
You will need to manually install pre-commit since it's not added as a dependency to the pyproject.toml:
pip install pre-commitThe configuration sets the default stage for all the hooks to pre-push so to install the git hooks run:
pre-commit install --hook-type pre-pushThe hooks will run before each push, making sure the pushed code can pass linting checks and not fail the CI on linting.
If you change your mind and don't want the git hooks:
pre-commit uninstallAll licenses used in this repository are listed under the LICENSES folder. Unless specified otherwise in the respective file headers, all code checked into this repository is made available under a permissive license.
- Most software sources and tool scripts are licensed under the Apache 2.0 license.
- Some third party files under the
NRF/system/third_partydirectory are licensed under the MIT license. - Some third party files under the
NRF/system/third_partydirectory are licensed under the BSD 3 license. - Markdown, JSON, text files, pictures, PDFs, are licensed under the Creative Commons Attribution 4.0 International license (CC BY 4.0).
To extract license information for all files, you can use the reuse tool and by running reuse spdx in the root directory of this repository.