Skip to content

Official Edge Impulse firmware for the nRF9160 DK

License

Notifications You must be signed in to change notification settings

edgeimpulse/firmware-nordic-nrf9160dk

Repository files navigation

Edge Impulse firmware for nRF9160 DK

Edge Impulse enables developers to create the next generation of intelligent device solutions with embedded Machine Learning. This repository contains the Edge Impulse firmware for the Nordic Semiconductor nRF9160 DK development boards, in combination with the ST IKS02A shield. This combination supports all Edge Impulse device features, including ingestion, remote management and inferencing.

Note: Do you just want to use this development board with Edge Impulse? No need to build this firmware. See these instructions for prebuilt images and instructions, or use the data forwarder to capture data from any sensor.

Requirements

Hardware

Software

Or you can build this application with Docker (see below).

Building the device firmware (locally)

  1. Install and configure the nRF Connect SDK:

    1. nRF Connect SDK in a separate folder from this repository (e.g. ~/repos/ncs).

    2. Check out NCS version 1.9.1:

      $ cd ~/repos/ncs/nrf
      $ git checkout v1.9.1
      $ cd ..
      $ west update
      
    3. Set your ZEPHYR_BASE environment variable to ~/repos/ncs/zephyr.

  2. Clone this repository:

    $ git clone https://github.com/edgeimpulse/firmware-nrf91
    
  3. You'll need to flash the board controller once:

    1. Ensure that the PROG/DEBUG switch is in nRF52 postion.

      nRF9160DK PROG/DEBUG switch location

    2. Run:

      $ cd board-controller/
      $ west build -b [email protected]
      $ west flash
      
  4. Build and flash the application:

    1. Ensure that the PROG/DEBUG switch is in nRF91 postion.

      nRF9160DK PROG/DEBUG switch location

    2. Build the application (make sure you're in the firmware-nrf91 folder again, not in the board-controller!):

      $ west build -b [email protected]
      
    3. Flash the application:

      $ west flash
      

Building the device firmware (Docker)

  1. Clone this repository:

    $ git clone https://github.com/edgeimpulse/firmware-nrf91
    
  2. Build the Docker container:

    $ docker build -t edge-impulse-nordic .
    
  3. You'll need to flash the board controller once:

    1. Ensure that the PROG/DEBUG switch is in nRF52 postion.

      nRF9160DK PROG/DEBUG switch location

    2. Run:

      $ docker run --rm -v $PWD:/app edge-impulse-nordic /bin/bash -c "cd board-controller && west build -b [email protected]"
      
    3. Copy board-controller/build/zephyr/zephyr.bin to the JLINK mass storage device.

  4. Build and flash the application:

    1. Ensure that the PROG/DEBUG switch is in nRF91 postion.

      nRF9160DK PROG/DEBUG switch location

    2. Build the application:

      $ docker run --rm -v $PWD:/app edge-impulse-nordic /bin/bash -c "west build -b [email protected]"
      
    3. Copy build/zephyr/zephyr.bin to the JLINK mass storage device.

Working with other sensors

You can easily add support for other accelerometers, PDM microphones or even completely different sensors to this firmware through either built-in Zephyr drivers, or through the Zephyr sensor API. See the examples for the nRF52840 DK for more info.