Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
32352c3
include: add nrf edgeai lib header files, remove edge impulse header
rrusak Nov 14, 2025
8cf8383
include: update nrf_edgeai library header files
rrusak Nov 14, 2025
da258af
lib:add nrf_edgeai cortex-m33 static lib and build files
rrusak Nov 17, 2025
9fab0b0
samples: add initial nrf_edgeai/regression sample files
rrusak Nov 17, 2025
cb61808
lib: add nrf_edgeai cortex-m33 lib and CMake, Kconfig build files
rrusak Nov 19, 2025
ffb727e
samples: add nrf_edgeai classification sample
rrusak Nov 19, 2025
5bc8303
samples: add nrf_edgeai anomaly detection sample
rrusak Nov 20, 2025
331d00f
lib: add nrf_edgeai cortex-m4 static C lib
rrusak Nov 20, 2025
e5c8254
samples: add nrf_edgeai regression sample
rrusak Nov 20, 2025
87b7429
samples: nrf_Edgeai samples, match documentation and comments style
rrusak Nov 20, 2025
9754054
applications: remove edge impulse application
rrusak Nov 21, 2025
3158cf0
tests: remove edge impulse test suits
rrusak Nov 21, 2025
17b8d40
samples: remove edge impulse samples
rrusak Nov 21, 2025
bfefa47
doc: add nrf_edgeai overview, samples and integraions description doc…
rrusak Nov 21, 2025
28ab3a2
doc: remove edge impulse application images, rename NRF -> nRF, fix s…
rrusak Nov 24, 2025
33b43f7
doc: add explanations on how to interpret the Anomaly Score and valid…
rrusak Nov 24, 2025
93a51c3
doc: update integration steps for nRF Edge AI, adding CMake instructi…
rrusak Nov 24, 2025
42c6a4b
doc: add samples for anomaly detection, classification, and regressio…
rrusak Nov 24, 2025
5f5cd82
docs: add basic integration example for Edge AI runtime in include_ed…
rrusak Nov 25, 2025
fc1e3a6
doc: refine DSP module overview by consolidating functionality catego…
rrusak Nov 25, 2025
dc3ec67
doc: update README and configuration files for consistency; lib/sampl…
rrusak Nov 25, 2025
71e535c
lib: fix nrf_edgeai Kconfig
rrusak Nov 25, 2025
5dc1226
samples: remove thingy53 from hardware list
rrusak Nov 27, 2025
4cc682a
samples: add nrf54lm20dk/nrf54lm20a/cpuapp as compatible platform
rrusak Nov 27, 2025
136cfb6
lib: change SID_LIB_DIR from absolute to relative path;
rrusak Dec 1, 2025
a5e83fa
include: fix __UNUSED macro redefinition conflict
rrusak Dec 4, 2025
61ee123
samples: apply NCS code format to samples src/main.c, update .clang-f…
rrusak Dec 4, 2025
2cf9820
nrf_edgeai: Add github actions for building samples
tjora Dec 4, 2025
9541ca6
.gitignore: Do not ignore github actions
tjora Dec 4, 2025
c53c344
doc: Add gitaction workflow for building docs
tjora Dec 4, 2025
87c77a8
build: Use 2 cores
tjora Dec 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
35 changes: 5 additions & 30 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,24 @@ AttributeMacros:
- __packed
- __printf_like
- __syscall
- __syscall_always_inline
- __subsystem
BitFieldColonSpacing: After
BreakBeforeBraces: Linux
ColumnLimit: 100
ConstructorInitializerIndentWidth: 8
ContinuationIndentWidth: 8
ForEachMacros:
- 'ARRAY_FOR_EACH'
- 'ARRAY_FOR_EACH_PTR'
- 'FOR_EACH'
- 'FOR_EACH_FIXED_ARG'
- 'FOR_EACH_IDX'
- 'FOR_EACH_IDX_FIXED_ARG'
- 'FOR_EACH_NONEMPTY_TERM'
- 'FOR_EACH_FIXED_ARG_NONEMPTY_TERM'
- 'RB_FOR_EACH'
- 'RB_FOR_EACH_CONTAINER'
- 'SYS_DLIST_FOR_EACH_CONTAINER'
- 'SYS_DLIST_FOR_EACH_CONTAINER_SAFE'
- 'SYS_DLIST_FOR_EACH_NODE'
- 'SYS_DLIST_FOR_EACH_NODE_SAFE'
- 'SYS_SEM_LOCK'
- 'SYS_SFLIST_FOR_EACH_CONTAINER'
- 'SYS_SFLIST_FOR_EACH_CONTAINER_SAFE'
- 'SYS_SFLIST_FOR_EACH_NODE'
Expand All @@ -69,22 +64,10 @@ ForEachMacros:
- 'Z_GENLIST_FOR_EACH_CONTAINER_SAFE'
- 'Z_GENLIST_FOR_EACH_NODE'
- 'Z_GENLIST_FOR_EACH_NODE_SAFE'
- 'STRUCT_SECTION_FOREACH'
- 'STRUCT_SECTION_FOREACH_ALTERNATE'
- 'TYPE_SECTION_FOREACH'
- 'K_SPINLOCK'
- 'COAP_RESOURCE_FOREACH'
- 'COAP_SERVICE_FOREACH'
- 'COAP_SERVICE_FOREACH_RESOURCE'
- 'HTTP_RESOURCE_FOREACH'
- 'HTTP_SERVER_CONTENT_TYPE_FOREACH'
- 'HTTP_SERVICE_FOREACH'
- 'HTTP_SERVICE_FOREACH_RESOURCE'
- 'I3C_BUS_FOR_EACH_I3CDEV'
- 'I3C_BUS_FOR_EACH_I2CDEV'
IfMacros:
- 'CHECKIF'
IncludeBlocks: Regroup
# Disabled for now, see bug https://github.com/zephyrproject-rtos/zephyr/issues/48520
#IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^".*\.h"$'
Priority: 0
Expand All @@ -98,17 +81,9 @@ IndentCaseLabels: false
IndentGotoLabels: false
IndentWidth: 8
InsertBraces: true
InsertNewlineAtEOF: true
SpaceBeforeInheritanceColon: False
SpaceBeforeParens: ControlStatementsExceptControlMacros
SortIncludes: CaseInsensitive
UseTab: ForContinuationAndIndentation
SortIncludes: Never
UseTab: Always
WhitespaceSensitiveMacros:
- COND_CODE_0
- COND_CODE_1
- IF_DISABLED
- IF_ENABLED
- LISTIFY
- STRINGIFY
- Z_STRINGIFY
- DT_FOREACH_PROP_ELEM_SEP
- Z_STRINGIFY
76 changes: 76 additions & 0 deletions .github/workflows/build-using-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Build and test app in NCS docker container

on:
pull_request:
push:

jobs:
set-image-tag:
runs-on: ubuntu-24.04
outputs:
IMAGE_TAG: ${{ steps.set-output.outputs.IMAGE_TAG }}
steps:
- name: Checkout repository with Edge-ai AddOn
uses: actions/checkout@v4
with:
path: edge-ai

- name: Prepare west project
run: |
python3 -m pip install west
west init -l edge-ai
west update -o=--depth=1 -n nrf

- name: Find toolchain bundle id
id: set-output
run: echo "IMAGE_TAG=$(./nrf/scripts/print_toolchain_checksum.sh)" >> $GITHUB_OUTPUT

build-and-test-in-docker:
needs: set-image-tag
runs-on: ubuntu-24.04
container: ghcr.io/nrfconnect/sdk-nrf-toolchain:${{ needs.set-image-tag.outputs.IMAGE_TAG }}
defaults:
run:
# Bash shell is needed to set toolchain related environment variables in docker container
# It is a workaround for GitHub Actions limitation https://github.com/actions/runner/issues/1964
shell: bash
steps:
- name: Checkout repository with Edge-ai AddOn
uses: actions/checkout@v4
with:
path: edge-ai

- name: Prepare west project
run: |
west init -l edge-ai
west update -o=--depth=1 -n

- name: Build anomaly sample
working-directory: edge-ai/samples/nrf_edgeai/anomaly
run: |
west build --board nrf52dk/nrf52832 --build-dir build_nrf52dk_nrf52832 -o=-j2
west build --board nrf52840dk/nrf52840 --build-dir build_nrf52840dk_nrf52840 -o=-j2
west build --board nrf5340dk/nrf5340/cpuapp --build-dir build_nrf5340dk_nrf5340_cpuapp -o=-j2
west build --board nrf5340dk/nrf5340/cpuapp/ns --build-dir build_nrf5340dk_nrf5340_cpuapp_ns -o=-j2
west build --board nrf54l15dk/nrf54l15/cpuapp --build-dir build_nrf54l15dk_nrf54l15_cpuapp -o=-j2
west build --board nrf54h20dk/nrf54h20/cpuapp --build-dir build_nrf54h20dk_nrf54h20_cpuapp -o=-j2

- name: Build classification sample
working-directory: edge-ai/samples/nrf_edgeai/classification
run: |
west build --board nrf52dk/nrf52832 --build-dir build_nrf52dk_nrf52832 -o=-j2
west build --board nrf52840dk/nrf52840 --build-dir build_nrf52840dk_nrf52840 -o=-j2
west build --board nrf5340dk/nrf5340/cpuapp --build-dir build_nrf5340dk_nrf5340_cpuapp -o=-j2
west build --board nrf5340dk/nrf5340/cpuapp/ns --build-dir build_nrf5340dk_nrf5340_cpuapp_ns -o=-j2
west build --board nrf54l15dk/nrf54l15/cpuapp --build-dir build_nrf54l15dk_nrf54l15_cpuapp -o=-j2
west build --board nrf54h20dk/nrf54h20/cpuapp --build-dir build_nrf54h20dk_nrf54h20_cpuapp -o=-j2

- name: Build regression sample
working-directory: edge-ai/samples/nrf_edgeai/regression
run: |
west build --board nrf52dk/nrf52832 --build-dir build_nrf52dk_nrf52832 -o=-j2
west build --board nrf52840dk/nrf52840 --build-dir build_nrf52840dk_nrf52840 -o=-j2
west build --board nrf5340dk/nrf5340/cpuapp --build-dir build_nrf5340dk_nrf5340_cpuapp -o=-j2
west build --board nrf5340dk/nrf5340/cpuapp/ns --build-dir build_nrf5340dk_nrf5340_cpuapp_ns -o=-j2
west build --board nrf54l15dk/nrf54l15/cpuapp --build-dir build_nrf54l15dk_nrf54l15_cpuapp -o=-j2
west build --board nrf54h20dk/nrf54h20/cpuapp --build-dir build_nrf54h20dk_nrf54h20_cpuapp -o=-j2
83 changes: 83 additions & 0 deletions .github/workflows/build-using-toolchain-bundle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Build and test app in toolchain bundle environment

on:
pull_request:
push:

jobs:
build-and-test-in-toolchain-bundle:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository with Edge-ai AddOn
uses: actions/checkout@v4
with:
path: edge-ai

- name: Prepare west project
run: |
python3 -m pip install west
west init -l edge-ai
west update -o=--depth=1 -n

- name: Install nrfutil and toolchain manager
run: |
wget -q https://files.nordicsemi.com/artifactory/swtools/external/nrfutil/executables/x86_64-unknown-linux-gnu/nrfutil
chmod +x nrfutil
./nrfutil install toolchain-manager

- name: Find proper toolchain bundle
id: set-tb-id
run: echo "TOOLCHAIN_BUNDLE_NAME=ncs-toolchain-x86_64-linux-$(./nrf/scripts/print_toolchain_checksum.sh).tar.gz" >> $GITHUB_OUTPUT

- name: Restore toolchain bundle from cache
id: restore-cached-tb
uses: actions/cache/restore@v4
with:
path: ${{steps.set-tb-id.outputs.TOOLCHAIN_BUNDLE_NAME}}
key: ${{steps.set-tb-id.outputs.TOOLCHAIN_BUNDLE_NAME}}

- name: Download toolchain bundle if not cached
if: steps.restore-cached-tb.outputs.cache-hit != 'true'
run: wget https://files.nordicsemi.com/artifactory/NCS/external/bundles/v3/${{steps.set-tb-id.outputs.TOOLCHAIN_BUNDLE_NAME}}

- name: Save toolchain bundle to cache
if: steps.restore-cached-tb.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: ${{steps.set-tb-id.outputs.TOOLCHAIN_BUNDLE_NAME}}
key: ${{steps.set-tb-id.outputs.TOOLCHAIN_BUNDLE_NAME}}

- name: Install proper toolchain bundle
run: ./nrfutil toolchain-manager install --toolchain-bundle ${{steps.set-tb-id.outputs.TOOLCHAIN_BUNDLE_NAME}}

- name: Build firmware
run: |
./nrfutil toolchain-manager launch --chdir edge-ai/samples/nrf_edgeai/anomaly/ -- west build --board nrf52dk/nrf52832 --build-dir build_nrf52dk_nrf52832 -o=-j2
./nrfutil toolchain-manager launch --chdir edge-ai/samples/nrf_edgeai/classification/ -- west build --board nrf52dk/nrf52832 --build-dir build_nrf52dk_nrf52832 -o=-j2
./nrfutil toolchain-manager launch --chdir edge-ai/samples/nrf_edgeai/regression/ -- west build --board nrf52dk/nrf52832 --build-dir build_nrf52dk_nrf52832 -o=-j2

./nrfutil toolchain-manager launch --chdir edge-ai/samples/nrf_edgeai/anomaly/ -- west build --board nrf52840dk/nrf52840 --build-dir build_nrf52840dk_nrf52840 -o=-j2
./nrfutil toolchain-manager launch --chdir edge-ai/samples/nrf_edgeai/classification/ -- west build --board nrf52840dk/nrf52840 --build-dir build_nrf52840dk_nrf52840 -o=-j2
./nrfutil toolchain-manager launch --chdir edge-ai/samples/nrf_edgeai/regression/ -- west build --board nrf52840dk/nrf52840 --build-dir build_nrf52840dk_nrf52840 -o=-j2

./nrfutil toolchain-manager launch --chdir edge-ai/samples/nrf_edgeai/anomaly/ -- west build --board nrf5340dk/nrf5340/cpuapp --build-dir build_nrf5340dk_nrf5340_cpuapp -o=-j2
./nrfutil toolchain-manager launch --chdir edge-ai/samples/nrf_edgeai/classification/ -- west build --board nrf5340dk/nrf5340/cpuapp --build-dir build_nrf5340dk_nrf5340_cpuapp -o=-j2
./nrfutil toolchain-manager launch --chdir edge-ai/samples/nrf_edgeai/regression/ -- west build --board nrf5340dk/nrf5340/cpuapp --build-dir build_nrf5340dk_nrf5340_cpuapp -o=-j2

./nrfutil toolchain-manager launch --chdir edge-ai/samples/nrf_edgeai/anomaly/ -- west build --board nrf5340dk/nrf5340/cpuapp/ns --build-dir build_nrf5340dk_nrf5340_cpuapp_ns -o=-j2
./nrfutil toolchain-manager launch --chdir edge-ai/samples/nrf_edgeai/classification/ -- west build --board nrf5340dk/nrf5340/cpuapp/ns --build-dir build_nrf5340dk_nrf5340_cpuapp_ns -o=-j2
./nrfutil toolchain-manager launch --chdir edge-ai/samples/nrf_edgeai/regression/ -- west build --board nrf5340dk/nrf5340/cpuapp/ns --build-dir build_nrf5340dk_nrf5340_cpuapp_ns -o=-j2

./nrfutil toolchain-manager launch --chdir edge-ai/samples/nrf_edgeai/anomaly/ -- west build --board nrf54l15dk/nrf54l15/cpuapp --build-dir build_nrf54l15dk_nrf54l15_cpuapp -o=-j2
./nrfutil toolchain-manager launch --chdir edge-ai/samples/nrf_edgeai/classification/ -- west build --board nrf54l15dk/nrf54l15/cpuapp --build-dir build_nrf54l15dk_nrf54l15_cpuapp -o=-j2
./nrfutil toolchain-manager launch --chdir edge-ai/samples/nrf_edgeai/regression/ -- west build --board nrf54l15dk/nrf54l15/cpuapp --build-dir build_nrf54l15dk_nrf54l15_cpuapp -o=-j2

./nrfutil toolchain-manager launch --chdir edge-ai/samples/nrf_edgeai/anomaly/ -- west build --board nrf54h20dk/nrf54h20/cpuapp --build-dir build_nrf54h20dk_nrf54h20_cpuapp -o=-j2
./nrfutil toolchain-manager launch --chdir edge-ai/samples/nrf_edgeai/classification/ -- west build --board nrf54h20dk/nrf54h20/cpuapp --build-dir build_nrf54h20dk_nrf54h20_cpuapp -o=-j2
./nrfutil toolchain-manager launch --chdir edge-ai/samples/nrf_edgeai/regression/ -- west build --board nrf54h20dk/nrf54h20/cpuapp --build-dir build_nrf54h20dk_nrf54h20_cpuapp -o=-j2

# - name: Store hex files
# uses: actions/upload-artifact@v4
# with:
# name: built-applications
# path: edge-ai/samples/nrf_edgeai/*/build_*/*.hex
70 changes: 70 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Copyright (c) 2024, Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

name: Documentation

on: [push, pull_request]

permissions:
contents: read

jobs:
build:
name: Build
runs-on: ubuntu-22.04
strategy:
matrix:
doxygen-version: [1.9.6, 1.14.0]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Install dependencies
run: |
DOXYGEN_VERSION="${{ matrix.doxygen-version }}"
wget --no-verbose "https://github.com/doxygen/doxygen/releases/download/Release_${DOXYGEN_VERSION//./_}/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz"
tar xf doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz
echo "${PWD}/doxygen-${DOXYGEN_VERSION}/bin" >> $GITHUB_PATH
pip install -r doc/requirements.txt

- name: Build
run: |
cd doc
doxygen

SPHINXOPTS="-W" make html

mkdir deploy
mv _build_doxygen/html deploy/doxygen
mv _build_sphinx/html/* deploy

- name: Setup pages
if: github.event_name != 'pull_request' && matrix.doxygen-version == '1.14.0'
uses: actions/configure-pages@v4

- name: Upload pages artifact
if: github.event_name != 'pull_request' && matrix.doxygen-version == '1.14.0'
uses: actions/upload-pages-artifact@v3
with:
path: doc/deploy

- name: Upload artifacts
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: docs-doxygen-${{ matrix.doxygen-version }}
path: doc/deploy

deploy:
name: Deploy
runs-on: ubuntu-22.04
needs: build
if: github.event_name != 'pull_request'
permissions:
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
43 changes: 43 additions & 0 deletions .github/workflows/src-mirror.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: src-mirror

on:
workflow_dispatch:
inputs:
git-ref:
description: "Branch, tag or SHA to checkout"
required: true
default: "main"
push:
tags:
- "*"
pull_request:
types:
- opened
- synchronize
paths:
- .github/workflows/src-mirror.yml

concurrency:
group: src-mirror-${{ github.ref }}
cancel-in-progress: true

# Tar entire project west workspace, prune, and upload to artifact service.
jobs:
standard:
runs-on:
- runs-on=${{ github.run_id }}
- runner=16cpu-linux-x64
steps:
- name: Upload src.tar.gz
uses: nrfconnect/action-src-mirror@main
with:
path: "sdk-edge-ai-addon"
west-update-args: ""
artifactory-path: >-
${{ (github.ref_type != 'tag') &&
format('ncs-src-mirror/internal/{0}/{1}/src.tar.gz', github.event.repository.name, github.ref_name) }}
# Enable external after testing that this works as intended
# format('ncs-src-mirror/internal/{0}/{1}/src.tar.gz', github.event.repository.name, github.ref_name) ||
# format('ncs-src-mirror/external/{0}/{1}/src.tar.gz', github.event.repository.name, github.ref_name) }}
artifactory-user: ${{ secrets.COM_NORDICSEMI_FILES_USERNAME }}
artifactory-pass: ${{ secrets.COM_NORDICSEMI_FILES_PASSWORD }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ doc/nrf/_doxygen/
doc/nrf/_samples/
doc/*_warnings.txt
doc/*_doc.log

!.github/workflows/build*
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Edge AI add-on for nRF Connect SDK
# Edge AI Add-on for nRF Connect SDK

A compact add-on that makes it easy to run small, generated machine-learning
models on Nordic Semiconductor devices using the nRF Connect SDK (NCS).

License
-------

Source files in this repository include SPDX license identifiers. See file
headers for the exact license text.

Questions or help
-----------------

Open an issue on the repository or contact the maintainers via your project
communication channels.


Edge AI add-on
Loading
Loading