Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/analogdevicesinc/codefusion-studio/llms.txt

Use this file to discover all available pages before exploring further.

CodeFusion Studio provides a complete model-to-deployment workflow for running AI inference on Analog Devices embedded hardware. Starting from a trained model file, you can validate hardware compatibility, profile memory and compute requirements, generate optimized C/C++ inference code, and deploy to a physical device — all without leaving the IDE or the cfsutil command line. The workflow is designed for ML engineers who need to move quickly from a trained model to a running embedded application with minimal friction.

The embedded AI lifecycle

Every embedded AI project in CodeFusion Studio follows the same five-stage pipeline. Each stage can be driven from the System Planner GUI, the cfsutil CLI, or both.
1

Import your model

Add a trained model file to a workspace using the Embedded AI Tools tab in System Planner, or register it on the command line with cfsutil ai model add. Supported formats include .tflite for TensorFlow Lite Micro and .pth.tar for PyTorch CNN models targeting the MAX78002.
2

Check compatibility

Run the Compatibility Analyzer to validate that every operator, data type, and memory requirement in your model is supported by the selected SoC and core. Issues are categorized as CRITICAL or WARNING and accompanied by actionable suggestions.
3

Profile resource usage

Run the Resource Profiler to get pre-deployment estimates of peak RAM, compute cycles, inference latency, energy consumption, and per-layer bottlenecks — before writing a single line of application code.
4

Generate inference code

Run cfsutil ai build (or click Generate Code in System Planner) to compile the model into deployable C/C++ source files. For TFLM models this produces .cpp/.hpp files; for MAX78002 CNN models it produces cnn.c, cnn.h, weights.h, and supporting files.
5

Deploy and profile on hardware

Flash the generated application to your development board using the AI Hardware Profiling view (.cfsaiprof file). Capture live runtime traces with the Zephelin profiler over UART and visualize per-layer inference timing, CPU load, and memory usage in the Zephelin Trace Viewer.

Supported processors and model formats

Use the table below to confirm which AI model formats are supported for your target device before adding models to your project.
ProcessorSupported AI ModelsSupported Cores
MAX32657TFLMArm Cortex-M33
MAX32690TFLMArm Cortex-M4
MAX78002PyTorch (CNN only), TFLM (M4 only)Arm Cortex-M4 + CNN Accelerator
ADSP-21834 / 21834WTFLMSHARC-FX
ADSP-21835 / 21835WTFLMSHARC-FX
ADSP-21836 / 21836WTFLMSHARC-FX
ADSP-21837 / 21837WTFLMSHARC-FX
ADSP-SC834 / SC834WTFLMSHARC-FX + Arm Cortex-M33
ADSP-SC835 / SC835WTFLMSHARC-FX + Arm Cortex-M33
TFLM refers to TensorFlow Lite for Microcontrollers, a lightweight version of TensorFlow Lite optimized for resource-constrained devices. PyTorch models for the MAX78002 CNN accelerator are processed through the izer (ai8x-izer) backend and require a network configuration YAML file in addition to the model checkpoint.

AI backends

CodeFusion Studio ships with two AI backends. The backend is selected automatically based on the target SoC and accelerator, but you can also specify it explicitly with the --backend flag.
The tflm backend generates inference code for the TensorFlow Lite Micro (TFLM) runtime. It targets both Arm Cortex-M and SHARC-FX processor families and supports up to 999 models per workspace configuration.Key properties:
PropertyValue
Model format.tflite
Supported familiesCortex-M, SHARC-FX
Maximum models999
Advanced analysis toolsYes (compatibility analyzer, resource profiler)
Configurable extension fields:
FieldDescription
SectionMemory section for model data (e.g. .flash)
SymbolC symbol name for the model data array
ArenaSizeArena size in bytes; estimated automatically if omitted
ArenaSectionMemory section for the inference arena buffer
DatasetSectionMemory section for the dataset
DatasetPath to a binary input dataset file for testing
cfsutil ai build --model model.tflite --soc MAX32690 --core CM4
Run cfsutil ai backends list to see all available backends in your environment. Use cfsutil ai backends list --name tflm or --name izer to inspect the full set of extension fields and supported hardware targets for a specific backend.

The cfsutil ai command suite

The cfsutil ai commands expose the complete embedded AI pipeline from the terminal, making them suitable for CI/CD pipelines, scripting, and environments where the IDE is not available.
Compiles an AI model into deployable C or C++ source and header files. Accepts either a .cfsconfig project file (to build all configured models in one step) or individual flags for single-model builds.
# Build from a workspace config file
cfsutil ai build --config .cfs/max32690-tqfn.cfsconfig

# Build a single TFLM model
cfsutil ai build --model model.tflite --soc MAX32690 --core CM4

# Build for SHARC-FX
cfsutil ai build --model model.tflite --soc ADSP-SC835 --core FX

# Build for MAX78002 CNN accelerator
cfsutil ai build --soc MAX78002 --core CM4 --acc CNN \
    --model model.pth.tar --network-config config.yaml
Use --format json to get machine-readable output for CI integration.
Validates operator support, data type compatibility, and memory constraints for a model on a target SoC and core. Reports issues as CRITICAL or WARNING with suggested mitigations.
cfsutil ai compat --soc MAX32690 --core CM4 --model model.tflite
Use --report-file report.cfsreport to write a JSON report for programmatic analysis. Currently supports TFLM models only.
Estimates memory usage, inference latency, compute cycles, and per-layer performance before deployment. Produces a five-section report covering model summary, memory analysis, hardware performance, per-layer breakdown, and optimization opportunities.
cfsutil ai profile --soc MAX32690 --core CM4 --model model.tflite
Use --report-file report.json to save the output. Use --report-format text to generate a human-readable text report instead of JSON. Currently supports TFLM models only.
On Windows, all cfsutil ai commands require the Visual C++ Redistributable for Visual Studio 2015 to be installed. Install this redistributable manually before running any cfsutil ai command.

Explore the embedded AI tools

AI Workspace

Create a workspace pre-configured for a specific model and target device — from the GUI wizard or cfsutil ai workspace create.

Compatibility Checking

Validate operator support, data types, and memory constraints before generating code.

AI Profiling

Profile static resource requirements and capture live runtime traces using the Zephelin profiler.

Embedded AI Tools (System Planner)

Manage model configurations, generate code, and open compatibility and profiling reports from within System Planner.

Build docs developers (and LLMs) love