How alifsemi/sdk-alif works
The Alif Semiconductor Zephyr SDK is a platform codebase for building real-time applications on Alif devices. Its clearest end-to-end runtime example is the BLE test application: startup configures power, initializes the BLE stack, starts advertising, and then waits while monitoring connection state. The repository also includes independent Matter, IEEE 802.15.4, LE Audio, and Ethos-U capabilities, plus device drivers and display support. Those branches are shown as separate subsystems where sampled evidence does not establish runtime wiring; several are represented by directory paths because their implementation was not excerpted.
Main entry points: ble_handler.c BLE service and GAP · main.c BLE startup loop · ethosu_shell.cpp Ethos-U shell · le_audio LE Audio pipeline
Components 27
BLE application
- BLE startup loop
applications/bletestapp/src/main.c - BLE service and GAP
applications/bletestapp/src/ble_handler.c - BLE shell
applications/bletestapp/src/appl_shell.h - Application power
applications/bletestapp/src/power_mgr.c
Connectivity subsystems
- GAPM API
subsys/bluetooth/common/gapm_api.c - BLE settings storage
subsys/bluetooth/common/ble_storage.c - Bluetooth shell
subsys/bluetooth/shell/bt.c - Advertising services
subsys/bluetooth/host - LE Audio pipeline
subsys/bluetooth/le_audio - IEEE 802.15.4 messaging
subsys/ieee802154/msglib/src/ahi_msg_lib.c - 802.15.4 shell
subsys/ieee802154/shell/src/ieee802154_shell.c
Matter
- Matter stack
subsys/matter/common/MatterStack.cpp - Matter binding
subsys/matter/binding/BindingHandler.cpp - ICD subscriptions
subsys/matter/icd/icdHandler.cpp - Matter PWM device
subsys/matter/pwmdevice/PWMDevice.cpp - Matter UI
subsys/matter/common/MatterUi.cpp
Audio and devices
- Audio encoding
subsys/bluetooth/le_audio/audio_encoder.c - Audio decoding
subsys/bluetooth/le_audio/audio_decoder.c - Synchronized I2S
drivers/i2s/i2s_sync/i2s_sync.c - WM8904 codec
drivers/codec/wm8904/wm8904.c - SI570 clock
drivers/clock/si570/si570.c - Buffered display
subsys/dbuf_display/display.c
Edge inference
- Ethos-U shell
subsys/modules/ethosu/shell/src/ethosu_shell.cpp - Inference runner
lib/ethosu_utils/inference_process.cpp - Keyword spotting models
include/ethosu/models/keyword_spotting_cnn_small_int8/u55/model_u55_128.h - BERT Tiny model
include/ethosu/models/bert_tiny/u85/model_u85_256.c
Other components
- Developer
Connections 17
- Developer → BLE startup loop: starts
- BLE startup loop → Application power: configures power
applications/bletestapp/src/main.c - BLE startup loop → BLE shell: waits for input
applications/bletestapp/src/main.c - BLE startup loop → BLE service and GAP: initializes and starts
applications/bletestapp/src/main.c - BLE service and GAP → GAPM API: configures GAP
applications/bletestapp/src/ble_handler.c - BLE service and GAP → Advertising services: sets advertising data
applications/bletestapp/src/ble_handler.c - Bluetooth shell → BLE service and GAP: controls BLE
- BLE service and GAP → BLE settings storage: persists bonds
- LE Audio pipeline → Audio encoding: encodes audio
- LE Audio pipeline → Audio decoding: decodes audio
- Developer → Matter stack: uses SDK
- ICD subscriptions → Matter stack: updates subscription state
subsys/matter/icd/icdHandler.cpp - Developer → IEEE 802.15.4 messaging: uses SDK
- Developer → Ethos-U shell: runs inference
- Ethos-U shell → Inference runner: runs jobs
subsys/modules/ethosu/shell/src/ethosu_shell.cpp - Ethos-U shell → Keyword spotting models: loads model data
subsys/modules/ethosu/shell/src/ethosu_shell.cpp - Ethos-U shell → BERT Tiny model: selects model