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’s Embedded AI Tools enable you to import, validate, profile, and deploy AI models directly to ADI microcontrollers and DSPs. The supported model formats and target cores vary by processor: TensorFlow Lite for Microcontrollers (TFLM) is broadly supported across ARM Cortex-M and SHARC-FX targets, while the MAX78002’s dedicated CNN hardware accelerator additionally supports PyTorch .pth.tar checkpoint models via the izer backend. Always verify model format compatibility with your selected device before adding models to a CFS project.

Processor and model format support

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 (TensorFlow Lite for Microcontrollers) is a lightweight runtime optimized for embedded devices. Models use the .tflite flatbuffer format. See tensorflow/tflite-micro for more information. PyTorch CNN models are checkpoint files in .pth.tar format produced by ADI’s ai8x-training framework. They target the MAX78002’s dedicated CNN hardware accelerator through the izer backend. See pytorch/pytorch for the underlying framework.

AI backends

CFS uses a backend system to handle model compilation and code generation. Each backend targets a specific set of hardware and accepts a specific model format. Two backends ship with CFS: tflm and izer.

tflm backend

The tflm backend generates inference code using the TensorFlow Lite for Microcontrollers runtime. It targets both Cortex-M processors and SHARC-FX DSPs and supports loading up to 999 models in a single project. Advanced analysis tools (compatibility checking and resource profiling) are available for tflm projects.
{
  "SupportedBackends": {
    "tflm": {
      "Description": "Generation for Tflite-micro run-time",
      "Formats": ["tflite"],
      "MaxModels": 999,
      "AdvancedTools": true,
      "Targets": [
        { "Hardware": { "Family": "SHARC-FX", "Accelerator": null } },
        { "Hardware": { "Family": "Cortex-M",  "Accelerator": null } }
      ]
    }
  }
}
Configurable properties for tflm models:
PropertyTypeDescription
SectionstringMemory section used to map the model data array
SymbolstringC symbol name for the generated data array and header files
ArenaSizestringTensor arena size in bytes; estimated automatically if omitted
ArenaSectionstringMemory section used to map the tensor arena buffer
DatasetSectionstringMemory section used to map the input dataset
DatasetFilePath to a binary file containing sample model input data
If ArenaSize is left blank, the CFS compatibility tools will estimate a suitable arena size based on the model graph. You can override this estimate by entering an explicit byte count.

izer backend

The izer backend uses ADI’s ai8x-izer synthesis tool to compile PyTorch CNN checkpoint models for the MAX78002’s dedicated CNN hardware accelerator. It targets the Cortex-M4 core with msdk firmware platform and supports exactly 1 model per project. Advanced analysis tools are not available for izer projects.
{
  "SupportedBackends": {
    "izer": {
      "Description": "ai8x-izer generation for MAX78002 CNN",
      "Formats": ["pytorch"],
      "MaxModels": 1,
      "AdvancedTools": false,
      "Targets": [
        {
          "Hardware": { "Soc": "max78002", "Core": "CM4", "Accelerator": "CNN" },
          "FirmwarePlatform": "msdk"
        }
      ]
    }
  }
}
Configurable properties for izer models:
PropertyTypeDefaultDescription
SoftmaxbooleantrueEnable softmax layer generation in output code
Timerenum (0–3)0Hardware timer used to measure inference duration
PrefixstringPrefix string applied to the generated test name
AvgPoolRoundingbooleantrueRound average pooling results
ClockDividerenum (1, 4)1Clock divider for the CNN accelerator
InputShapestringInput tensor shape as a comma-separated tuple, e.g. 256,256,3
FifobooleantrueUse a FIFO when loading layer data (recommended for larger models)
NetworkConfigFilePath to the .yaml file describing the network configuration
The izer backend only supports MSDK (msdk) firmware platform projects on the MAX78002 Cortex-M4 core. Zephyr projects on MAX78002 are not supported by the izer backend. For TFLM inference on the M4 core without the CNN accelerator, use the tflm backend instead.

Supported model file formats

File extensionFormatBackend
.tfliteTensorFlow Lite flatbuffertflm
.pth.tarPyTorch checkpoint (CNN only)izer

Multi-model support

The tflm backend supports multiple models within a single project (up to 999). Each model entry in the .cfsconfig file specifies its own Section, Symbol, ArenaSize, and optional Dataset. When generating code, CFS produces separate C symbol arrays and initialization calls for each model, allowing a single application to run multiple inference tasks.
Multi-model projects are only available with the tflm backend. The izer backend is limited to one model per project due to the fixed hardware mapping of the MAX78002 CNN accelerator.

Running AI workflows from the CLI

All AI model operations — compatibility checking, profiling, code generation, and workspace creation — are available through cfsutil without opening the IDE:
# Check model compatibility with a target SoC and core
cfsutil ai compat --model model.tflite --soc MAX32690 --core CM4

# Profile model resource usage
cfsutil ai profile --model model.tflite --soc MAX32690 --core CM4

# Build (compile model to C/C++ source)
cfsutil ai build --model model.tflite --soc MAX32690 --core CM4

# Add a model to an existing workspace
cfsutil ai model add --model model.tflite

# Create a new workspace from a model file
cfsutil ai workspace create --model model.tflite

# List available AI backends and their configurable fields
cfsutil ai backends

Build docs developers (and LLMs) love