Astra MCU SDK Examples - Overviewο
This repository contains example applications for the Synaptics SDK (Astra MCU SDK), demonstrating features and capabilities across Astra MCU platforms.
Throughout this guide, <sdk-root> refers to the directory where you extracted or cloned the SDK.
Scope
This README explains examples organization and outβofβtree application builds.
For setup and tool installation, see:
For SDK structure, build system, image generation, flashing, and troubleshooting, see the Astra MCU SDK User Guide.
π Table of Contentsο
Overviewο
The Synaptics SDK (Astra MCU SDK) provides core libraries, drivers, and build tools for Astra MCU development. This examples repository demonstrates how to build applications using the SDK in an out-of-tree configuration.
Out-of-tree means your application code lives in a separate directory from the SDK, keeping the SDK read-only and version-controlled independently.
Key Principles:
Out-of-tree examples β Applications are maintained separately from the SDK core
Read-only SDK β SDK acts as a versioned dependency, not modified directly
Reproducible builds β Configuration files (defconfigs) drive consistent builds
Self-contained examples β Each example can be built independently
Example Organizationο
Examples are organized by board and category:
SR110_RDK/
βββ configs/ # Application defconfig files
β βββ cm55_demo_sample_app_defconfig
β βββ cm55_audio_example_defconfig
β βββ ...
βββ audio_examples/ # Audio processing examples
β βββ audio_capture/
β βββ audio_playback/
β βββ ...
βββ drivers_examples/ # Driver usage examples
β βββ gpio_example/
β βββ i2c_example/
β βββ spi_example/
β βββ ...
βββ inference_examples/ # AI/ML inference examples
β βββ tflite_inference/
β βββ ...
βββ vision_examples/ # Image processing examples
β βββ uc_person_classification/
β βββ object_detection/
β βββ ...
βββ usb_examples/ # USB examples
βββ unity_test/ # Unit tests
SL2610_RDK/
βββ configs/ # Application defconfig files
β βββ cm52_system_manager_rdk_defconfig
β βββ cm52_dma_sample_app_defconfig
β βββ ...
βββ drivers_examples/ # Driver usage examples
β βββ dma_example/
β βββ i2c_exp_example/
β βββ spwm_example/
β βββ ...
βββ system_manager/ # System Manager for SL2610_RDK
Example Structureο
Each example typically contains:
Source files (
.c,.cc,.h)CMakeLists.txt - Build configuration
kconfig - Configuration options
README.md - Example-specific documentation
Assets - Models, test data, etc.
Configuration Files (defconfigs)ο
Defconfigs define:
Board selection (e.g.,
CONFIG_BOARD="sr110_rdk"orCONFIG_BOARD="sl2610_rdk")Compiler choice (GCC or AC6)
Build type (Release, Debug)
Enabled SDK modules (drivers, utilities, etc.)
Application-specific settings
Example defconfig: SR110_RDK/configs/cm55_demo_sample_app_defconfig
Prerequisitesο
For full setup steps, see:
Required Toolsο
CMake 4.1.2
Ninja 1.13.1 or later
Python 3.13.x (for SDK image generation and tooling)
Toolchain: GCC 13.2.1, Arm Compiler 6.19 (AC6), or LLVM Clang 21.x (SR110 only; requires GCC sysroot)
Environment Variablesο
Set these environment variables before building:
# Required: SDK source directory
export SRSDK_DIR=<sdk-root>
# Required: Toolchain paths (choose one based on your compiler)
export GCC_TOOLCHAIN_13_2_1=/path/to/gcc-arm-none-eabi/bin
# OR
export AC6_TOOLCHAIN_6_19_0=/path/to/armclang/bin
# OR (SR110 + LLVM Clang)
export LLVM_TOOLCHAIN_ROOT=/path/to/llvm/bin
export GCC_TOOLCHAIN_ROOT=/path/to/gcc-arm-none-eabi
Use only one toolchain per build. LLVM builds require GCC_TOOLCHAIN_ROOT for the GCC sysroot and libstdc++.
Windows (PowerShell):
$env:SRSDK_DIR="C:\path\to\<sdk-root>
$env:GCC_TOOLCHAIN_13_2_1="C:\path\to\gcc-arm-none-eabi\bin"
VS Code: Add to .vscode/settings.json:
{
"terminal.integrated.env.windows": {
"SRSDK_DIR": "C:\\path\\to\\<sdk-root>,
"GCC_TOOLCHAIN_13_2_1": "C:\\path\\to\\gcc-arm-none-eabi\\bin"
}
}
Directory Structureο
examples/
βββ build/ # CMake build artifacts
β βββ <target>/
β βββ <compiler>/ # Build files per target/compiler
βββ install/ # Installed Astra MCU SDK Package
β βββ SR110_RDK/
β βββ include/ # SDK headers
β βββ lib/ # SDK libraries (.a/.lib)
β βββ prebuilt/ # prebuilt libraries (.a/.lib)
β βββ config/
β β βββ config.h # SDK configuration
β β βββ *.ld/*.sct # Linker scripts
β βββ tools/
β βββ cmake/ # Toolchain files
βββ out/ # Final binaries
β βββ <target>/
β βββ release/ # Release builds (.elf/.axf)
β βββ debug/ # Debug builds
βββ SR110_RDK/ # Board-specific examples
β βββ configs/ # Application defconfigs
β βββ audio_examples/
β βββ drivers_examples/
β βββ inference_examples/
β βββ vision_examples/
β βββ ...
βββ CMakeLists.txt # Main build configuration
βββ Makefile # Build orchestration
βββ kconfig # Example-level configuration
Build System Architectureο
For build and flash workflows, see:
Two-Stage Build Processο
Stage 1: SDK Build (BUILD=SRSDK, combined SDK + app)
Compiles SDK modules (drivers, os, soc, utilities, etc.)
Each module produces a static library (e.g.,
libdrivers.a)Installs headers, libraries, and toolchain files to
install/${BOARD}/
Stage 2: Application Build (BUILD=EXAMPLE)
Compiles application source files
Links against pre-built SDK libraries
Produces final executable (
.elfor.axf)
Build Modesο
BUILD=SRSDK β Builds SDK libraries and the app (combined flow)
BUILD=EXAMPLE β Builds application using pre-built SDK (default)
SDK-only β Use
make astrasdk BOARD=<BOARD>to build/install the SDK package without building an app
Key Featuresο
Application Cache System:
Per-application cache of SDK headers and libraries
Hash-based change detection (libs, config.h, toolchain)
Automatic refresh when SDK changes
Location:
build/<target>/<compiler>/srsdk_build/.cache/
Embedded SDK Build:
Automatically builds SDK if prebuilts are missing
Controlled via
EMBED_SDK_BUILDCMake option
Configuration Management:
Kconfig-based configuration system
Defconfigs for reproducible builds
Interactive menuconfig editor
Building Examplesο
Important: SRSDK_DIR must be set to <sdk-root> in any shell where you build from <sdk-root>/examples/, even for appβonly builds.
export SRSDK_DIR=<sdk-root>
For stepβbyβstep workflows, use the Build and Flash guides:
Understanding Build Modesο
BUILD=SRSDK: Builds the SDK package from source, then builds your app using that fresh SDK.
Use when: first build, SDK source changed, or switching toolchains.
Slower, but ensures SDK and app are consistent.
BUILD=EXAMPLE (default): Builds only your app using the previously installed SDK package.
Use when: SDK already built and only app code changed.
Faster for iterative development.
Quick commands
# One-time per shell: point examples to your SDK root (required for combined builds and installing SDK into examples)
cd <sdk-root>/examples
export SRSDK_DIR=<sdk-root>
# Build SDK + application (combined; requires SRSDK_DIR)
make <cm55_demo_sample_app_defconfig> BOARD=SR110_RDK BUILD=SRSDK
# Rebuild application only (uses installed SDK)
make build BOARD=SR110_RDK