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 | Supported AI models | Supported cores |
|---|
| MAX32657 | TFLM | Arm Cortex-M33 |
| MAX32690 | TFLM | Arm Cortex-M4 |
| MAX78002 | PyTorch (CNN only), TFLM (M4 only) | Arm Cortex-M4 + CNN Accelerator |
| ADSP-21834 / 21834W | TFLM | SHARC-FX |
| ADSP-21835 / 21835W | TFLM | SHARC-FX |
| ADSP-21836 / 21836W | TFLM | SHARC-FX |
| ADSP-21837 / 21837W | TFLM | SHARC-FX |
| ADSP-SC834 / SC834W | TFLM | SHARC-FX + Arm Cortex-M33 |
| ADSP-SC835 / SC835W | TFLM | SHARC-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:
| Property | Type | Description |
|---|
Section | string | Memory section used to map the model data array |
Symbol | string | C symbol name for the generated data array and header files |
ArenaSize | string | Tensor arena size in bytes; estimated automatically if omitted |
ArenaSection | string | Memory section used to map the tensor arena buffer |
DatasetSection | string | Memory section used to map the input dataset |
Dataset | File | Path 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:
| Property | Type | Default | Description |
|---|
Softmax | boolean | true | Enable softmax layer generation in output code |
Timer | enum (0–3) | 0 | Hardware timer used to measure inference duration |
Prefix | string | — | Prefix string applied to the generated test name |
AvgPoolRounding | boolean | true | Round average pooling results |
ClockDivider | enum (1, 4) | 1 | Clock divider for the CNN accelerator |
InputShape | string | — | Input tensor shape as a comma-separated tuple, e.g. 256,256,3 |
Fifo | boolean | true | Use a FIFO when loading layer data (recommended for larger models) |
NetworkConfig | File | — | Path 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.
| File extension | Format | Backend |
|---|
.tflite | TensorFlow Lite flatbuffer | tflm |
.pth.tar | PyTorch 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