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.

cfsutil is the command-line utility for CodeFusion Studio (CFS). Built on the oclif framework, it exposes the same workspace creation, AI model compilation, package management, SoC inspection, and task execution capabilities available in the IDE — all from a terminal or CI pipeline. Whether you are automating firmware builds, generating AI-deployable C code, or scripting workspace setup across teams, cfsutil gives you full programmatic control over your CFS development environment.

Accessing cfsutil

The recommended way to run cfsutil is through the dedicated CFS Terminal inside VS Code, which automatically configures the correct environment and paths.
  1. Open a new terminal: View > Terminal or press Ctrl+`.
  2. In the terminal panel, click the dropdown arrow next to the + icon.
  3. Select CFS Terminal from the list.
  4. Run any command:
cfsutil --help

From a system terminal outside VS Code

You can also invoke cfsutil directly from your operating system terminal using the full installation path.
<CFS-Install>/Utils/cfsutil/bin/cfsutil.cmd --help
cfs is a shorter alias for cfsutil and works with all commands and flags. For example, cfs ai build --help is equivalent to cfsutil ai build --help.

Getting help

Pass --help at any level of the command hierarchy to display usage information, available subcommands, and flag descriptions for that level.
# Top-level help
cfsutil --help

# Help for the ai command group
cfsutil ai --help

# Help for a specific subcommand
cfsutil ai build --help

Command groups

cfsutil is organized into command groups, each focused on a specific area of the development workflow.
Command groupDescription
cfsutil aiCompile AI/ML models to C/C++ source, check hardware compatibility, profile resource usage, and manage models in a workspace
cfsutil workspaceCreate and configure CFS workspaces from command-line arguments or a .cfsworkspace file
cfsutil projectRegenerate projects defined inside an existing .cfsworkspace file
cfsutil pkgInstall, search, update, and remove SDKs, toolchains, and plugins via the CFS Package Manager
cfsutil socsList, inspect, and export SoC data models known to cfsutil
cfsutil elfAnalyze ELF firmware binaries: inspect headers, memory layout, and symbol tables
cfsutil tasksList and execute build, flash, clean, and debug tasks for a CFS workspace project
cfsutil dtParse device tree files (.dts, .dtsi, .overlay) and output JSON
cfsutil generateGenerate source code from a .cfsconfig file
cfsutil cfspluginsList CFS plugins installed with CodeFusion Studio or added via the Package Manager
cfsutil pluginsExtend cfsutil with additional oclif-compatible CLI plugins from npm or Git
cfsutil myanalogAuthenticate with your myAnalog account to access restricted packages and toolchains
cfsutil portList active serial ports on the host PC
cfsutil catalogUpdate or restore the SoC catalog to its latest online or original installed version
cfsutil dockerPull Docker images from the Analog Devices registry using myAnalog credentials

Working with multiple .cfsconfig files

Some cfsutil commands — particularly the ai commands — rely on .cfsconfig files in your workspace’s .cfs/ directory. When cfsutil automatically discovers a configuration, it expects only one .cfsconfig file to be present. If multiple files exist, selection may be non-deterministic and produce unexpected results.
When multiple .cfsconfig files are present in .cfs/, the CLI may select any one of them. This can lead to builds targeting an unintended SoC/package combination. Ensure only the intended configuration file is present before running a command.
Recommended approaches to avoid ambiguity: Option 1 — Use --config to specify a file directly (supported by ai commands):
cfsutil ai build --config .cfs/max32690-tqfn.cfsconfig
Option 2 — Replace the active config before running:
# Remove all existing .cfsconfig files (ensure backups exist first)
rm -f .cfs/*.cfsconfig
cp .my_configs/combination_i_want.cfsconfig .cfs/<soc>-<package>.cfsconfig
cfsutil <command>
Option 3 — Store alternates under a non-.cfsconfig extension and copy the one you want:
cp .cfs/my.cfsconfig.a .cfs/<soc>-<package>.cfsconfig
cfsutil <command>
The rm command in Option 2 permanently deletes all .cfsconfig files in the .cfs/ directory. Always keep backups of configurations you intend to reuse. The examples above use Unix-style commands (rm, cp) which work in the CFS Terminal, macOS, Linux, and Windows environments such as Git Bash or WSL.

Build docs developers (and LLMs) love