# CodeFusion Studio > CodeFusion Studio is a powerful, easy-to-use development environment for Analog Devices' microcontrollers. CodeFusion Studio is a powerful, easy-to-use development environment for Analog Devices' microcontrollers and DSPs. It provides tools for system configuration, code generation, building, flashing, debugging, and AI model integration. # Overview # User documentation This is the user documentation for CodeFusion Studio™. Note You can toggle between light and dark mode using the sun and moon icons on the top right of the page. - [User guide](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/index.md) - [Tutorials](https://developer.analog.com/docs/codefusion-studio/latest/tutorials/index.md) - [Resources](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/resources/index.md) - [Release notes](https://developer.analog.com/docs/codefusion-studio/latest/release-notes/index.md) Info You can [download the entire document](https://developer.analog.com/docs/codefusion-studio/latest/assets/codefusion-studio.pdf) as a single PDF. # User Guide # User guide CodeFusion Studio (CFS) is an embedded software development platform based on Microsoft's Visual Studio Code (VS Code). CodeFusion Studio provides best in class development tooling for embedded processors and MCUs by providing intuitive tools for newcomers while enabling advanced features for expert embedded developers. - [About](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/about/index.md) CFS - The [Installation](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/index.md) process - [Workspace](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/index.md) creation and management - [Configuring system-level settings](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/index.md) with the System Planner - [Building and flashing](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/build-and-flash/index.md) projects - [Debugging](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/index.md) single and multi-core projects - Additional tools and features including [Developer Tools](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/developer-tools/index.md), [CFS Command Line Utility](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/index.md), and [CFS Plugins](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/plugins/index.md) - [Uninstalling](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/uninstall/uninstall-cfs/index.md) Note You can toggle between light and dark mode using the sun and moon icons on to the top right of this page. # About Learn about CodeFusion Studio, the supported processors, and how to get help. - Understand why we built CodeFusion Studio and our [Purpose](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/about/purpose/index.md). - See what [Features](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/about/features/index.md) CodeFusion Studio has to offer. - Learn how to [Navigate](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/about/navigation/index.md) CodeFusion Studio. - Verify the [Supported processors](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/about/supported-processors/index.md). - Get [Help](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/about/help/index.md) and access support resources. # Features Explore all the features CodeFusion Studio has to offer. ## Embedded AI Workflows Complete model-to-deployment workflow for AI on embedded hardware. Create AI-ready workspaces directly from model files with automatic compatibility checking. Import models, validate compatibility with ADI processors, profile runtime performance, and generate optimized inference-ready code. Use the GUI or `cfsutil` commands. [Create workspace from AI model →](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-workspace-from-ai-model/index.md) | [AI model tools →](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/manage-ai-models/index.md) ## AI Debug Assistant (Preview) Investigate faults, inspect hardware state, decode fault registers, and coordinate across multiple cores during live debug sessions using natural language, with support for GitHub Copilot and other AI clients via the Model Context Protocol (MCP). [Learn more →](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/ai-debug-assistant/index.md) ## System Planner Use the System Planner to visually configure every aspect of your system — from memory and peripheral allocation to pin and clock behavior — and generate ready-to-build source code in one step. [Learn more →](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/index.md) ## Debugging and Analysis Inspect, automate, and analyze your system behavior with built-in debugging and analysis utilities — including multi-core debugging, the Memory Viewer, the Core Dump Analysis Tool, the GDB Toolbox, and the [Zephelin profiler](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/profiling/index.md). [Learn more →](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/index.md) ## Multi-core Debugging CodeFusion Studio provides an extended debugging ecosystem for multi-core systems with breakpoints, disassembly, cross-core support, and RTOS thread awareness. [Learn more →](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/index.md) ## CLI-First Development Build, flash, and configure workspaces entirely from the command line with `cfsutil`. Set up projects without opening the IDE, run complete AI model workflows, manage SDKs and packages, and execute build tasks. Perfect for CI/CD pipelines, automation scripts, and terminal-based workflows. [Learn more →](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/index.md) ## Package Manager Download SDKs, toolchains, and plugins on demand with the integrated Package Manager to keep your environment modular, current, and compatible across supported architectures. [Learn more →](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/index.md) ## Workspace Creation Wizard Start new single- or multi-core projects in seconds with guided setup, example templates, and optional TrustZone® configurations. [Learn more →](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-new-workspace/index.md) ## Plugin-Based Architecture CodeFusion Studio uses an extensible plugin architecture that separates configuration and design capture from code generation, allowing you to choose RTOS, middleware, and firmware platforms. Each supported platform (Zephyr, MSDK, SHARC-FX) exposes its own adjustable configuration options in the GUI, providing context-aware settings specific to the selected core and firmware platform. These settings are stored in structured JSON files and converted into buildable source code through command-line plugins — enabling automation, reproducibility, and CI/CD integration. [Learn more →](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/plugins/index.md) ## ELF File Explorer [ELF File Explorer](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/developer-tools/elf-file-explorer/index.md) provides a graphical interface to help understand and analyze the contents of ELF files. Visualize memory usage, run SQL queries to inspect symbols, and browse segments, sections, and symbols with the interactive memory map. [Learn more →](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/developer-tools/elf-file-explorer/index.md) # Help The following support resources are available: | Support type | Details | | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Online Documentation** | Online documentation can be found on [developer.analog.com](https://developer.analog.com/docs/codefusion-studio/latest/) | | **GitHub** | CodeFusion Studio repository can be found on [GitHub](https://github.com/analogdevicesinc/codefusion-studio). The [CFS Plugins](https://github.com/analogdevicesinc/cfs-plugins) repository contains the code generation plugins. The [ADI Model Zoo](https://github.com/analogdevicesinc/adi-model-zoo) is the default AI model catalog for the Model Zoo. | | **Engineer Zone** | [ADI Engineer Zone](https://ez.analog.com/dsp/software-and-development-tools/codefusion-studio/) is an online community forum where you can search the answered questions or ask one of your own. | | **Technical Support** | To request technical support, submit this [Online form](https://support.analog.com/en-US/technical-support/create-case-techsupport/) | | **CFS Product Page** | For downloads and documents related to CodeFusion Studio, visit [CodeFusion Studio](https://analog.com/CodeFusionStudio) | # Navigation An overview of the CodeFusion Studio layout and navigation. ## CFS sidebar Click the **CFS icon** in the **VS Code Activity Bar** to open the CFS sidebar. The sidebar contains the following views: ### 1 Home Provides access to commonly used CFS features and support resources: - **CFS Home Page** — open the [CFS Home Page](#8-cfs-home-page). - **Manage Packages** — open the [Package Manager](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/index.md). - **Help and Support** — links to the Walkthrough, online help, Engineer Zone, and technical support. - **Workspace** — [create](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-new-workspace/index.md), [open](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/open-workspace/index.md), [browse examples](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/open-and-migrate-example/index.md), configure, or [create a workspace from an AI model](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-workspace-from-ai-model/index.md). - **Config Tools** — open an existing config file or view the [Config Tools guide](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/index.md). - **ELF File Explorer** — open an [ELF file](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/developer-tools/elf-file-explorer/index.md). - **AI Tools** — open an AI Model Insight report or create a workspace from an AI model. ### 2 Packages Browse, search, and filter the contents of installed packages. By default, the view shows the packages your workspace depends on. For details, see [View installed package contents](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/view-installed-packages/index.md). ### 3 Context Filter Displays the current project and allows switching between projects in the workspace. ### 4 Actions Displays tasks such as build, clean, erase, flash, and debug. Available actions update dynamically based on the project selected in **Context Filter**. Tip Select **Copy and Edit** next to a task to create a new custom task. ### 5 DeviceTree Displays hardware components from the selected Zephyr project's generated device tree or from an open device tree file. ### 6 Trace Capture Capture profiling traces from Zephyr projects and view runtime and AI inference performance. For setup instructions, see [Profiling](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/profiling/index.md). ## 7 VS Code Status Bar The VS Code Status Bar appears at the bottom of the window. CodeFusion Studio adds build, clean, flash, and debug shortcuts on the left side of the status bar. Note For more information on navigating VS Code, see [Visual Studio Code User Interface](https://code.visualstudio.com/docs/getstarted/userinterface) ## 8 CFS Home Page Select **CFS Home Page** from the **Home** section of the sidebar to open the CFS Home Page. The CFS Home Page contains the following: ### 8.1 Header bar Quick links to online documentation, Engineer Zone, technical support, GitHub, and a **Help** button that opens the help modal. ### 8.2 Quick access links Shortcuts to create a workspace, open a workspace, browse MSDK examples, open a config file, or open an ELF file. ### 8.3 Walkthrough Provides access to the Getting Started walkthrough for setting up your environment and creating your first project. ### 8.4 Helpful resources A carousel of articles and videos relevant to CodeFusion Studio development. ### 8.5 Related documentation SoC-specific documentation links based on your installed packages. # Purpose Embedded software engineering is becoming increasingly complex. As the industry shifts toward heterogeneous multi-core systems and AI-enabled workloads, engineers must configure and debug multiple processing architectures while maintaining efficiency. At the same time, shrinking development resources and tighter time-to-market pressures exacerbate these challenges. Engineers are expected to manage this complexity with tools, middleware, and SDKs designed for a single-core, single-architecture world. Those tools are often proprietary, single-vendor solutions that may become obsolete. Code generated from these tools is typically inflexible, with limited usefulness in the real world. ## Why CodeFusion Studio The award-winning CodeFusion Studio (CFS) is a modern embedded software development ecosystem that integrates with [Visual Studio Code](https://code.visualstudio.com), designed to simplify multi-core, multi-architecture embedded development. Designed for Analog Devices microcontrollers and digital signal processors, CFS provides a unified development environment that eliminates the complexity of working across multiple toolchains, SDKs, and build systems. It combines graphical system design, AI model integration, code generation, and advanced debugging - accessible both through an intuitive IDE interface and a command-line workflow. ### Open source Analog Devices’ CodeFusion Studio adheres to an open-source-first design principle. It provides embedded engineers with robust, extensible tools that they own, designed for long-term use, customization, and integration into existing workflows. - Apache-licensed tooling and open-source toolchains that you own, modify, and integrate into your own workflows - Built-in support for Zephyr, an open-source real-time operating system ### AI for embedded development CFS integrates AI across the development lifecycle — from model deployment to real-time debugging. - **AI Debug Assistant**: Investigate faults, inspect hardware state, and coordinate across multiple cores during live debug sessions using natural language, with support for GitHub Copilot and other AI clients via the Model Context Protocol (MCP). - **Embedded AI Workflows**: Create AI-ready workspaces directly from model files, import and configure models, assign them to target cores, and run compatibility and profiling checks using the GUI or `cfsutil` command-line tool. Generate deployment-ready source code with complete automation support. - **Zephelin profiler**: Capture runtime and AI inference-level performance data on supported processors with enhanced trace capture panel, automatic .ctf/.tef format generation, and integrated trace viewer for deeper insight into system behavior. ### Security CFS integrates Analog Devices' Trusted Edge Security Architecture (TESA), providing foundational security services for supported processors. - **Root-of-trust services**: Secure Boot, Secure Channel, Lifecycle Management, Secure Storage, and Attestation through the Unified Security Software (USS) framework. - **Cryptographic flexibility**: Choose from industry-standard libraries including mbedTLS, wolfSSL, and PSA Crypto API, with hardware acceleration on supported devices. - **Arm® TrustZone® support**: Configure secure and non-secure environments through templates in the Workspace Creation Wizard, with Trusted Firmware-M (TF-M) integration for PSA Certified guidelines. ### System visibility CFS provides deep system visibility across complex, multi-core systems. - **System Planner dashboard**: Use the intuitive graphical interface to allocate memory partitions, peripherals, clocks, and pins per core, reducing conflicts in multi-core SoCs. - **Heterogeneous multi-core debugging**: Debug multiple cores in a single unified environment, eliminating the need for multiple IDEs. One IDE, one debug session, one hardware debugger. - **Debugging tools**: Built-in tools for memory inspection, core dump analysis, GDB scripting automation, ELF binary analysis, and graphical register inspection — all integrated directly in the IDE. ### Flexibility CFS provides flexibility by consolidating technical information into a single, structured data source, for easy integration into custom tooling and modern automated workflows. - **Package Manager**: Download SDKs, toolchains, plugins, and SoC data models on demand to keep your development environment modular and up to date. - **Command-Line First**: Ensures critical actions run from the command line, enabling compatibility with modern CI/CD pipelines, agentic AI automation, and automated workflows. `cfsutil` provides broad feature parity with graphical workflows. - **Plugin-Based Project Creation**: A flexible, plugin-driven system that supports multiple RTOS and firmware platforms. Developers can add custom plugins to generate configuration and project files tailored to specific development standards. ## Goals CFS aims to bring embedded software into the modern, heterogeneous world. It enables repeatable, testable, and maintainable development pipelines that customers fully own — whether they are building traditional firmware or AI-capable embedded systems. It creates visibility into complex multi-core designs, offering a clearer view of resource allocation, performance, and system behavior. Above all, it provides engineers with the long-term flexibility and adaptability needed to develop solutions that last as long as the hardware they support. ## Next steps - [Features](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/about/features/index.md) — explore all CodeFusion Studio features in detail - [Installation](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/index.md) — get started with CodeFusion Studio # Supported processors and model formats CodeFusion Studio supports multiple AI model formats depending on the processor. Use the table below to check which formats are compatible with your selected device before adding models to your project. | Processor | Supported AI models | Supported cores | | ------------------------------------------------------------------------- | -------------------------------------------------- | ------------------------------- | | [MAX32657](https://www.analog.com/en/products/MAX32657.html) | TFLM[1](#fn:tflm) | Arm Cortex-M33 | | [MAX32690](https://www.analog.com/en/products/MAX32690.html) | TFLM | Arm Cortex-M4 | | [MAX78002](https://www.analog.com/en/products/MAX78002.html) | PyTorch[2](#fn:pytorch) (CNN only), TFLM (M4 only) | Arm Cortex-M4 + CNN Accelerator | | [ADSP-21834 / 21834W](https://www.analog.com/en/products/adsp-21834.html) | TFLM | SHARC-FX | | [ADSP-21835 / 21835W](https://www.analog.com/en/products/adsp-21835.html) | TFLM | SHARC-FX | | [ADSP-21836 / 21836W](https://www.analog.com/en/products/adsp-21836.html) | TFLM | SHARC-FX | | [ADSP-21837 / 21837W](https://www.analog.com/en/products/adsp-21837.html) | TFLM | SHARC-FX | | [ADSP-SC834 / SC834W](https://www.analog.com/en/products/adsp-sc834.html) | TFLM | SHARC-FX + Arm Cortex-M33 | | [ADSP-SC835 / SC835W](https://www.analog.com/en/products/adsp-sc835.html) | TFLM | SHARC-FX + Arm Cortex-M33 | CodeFusion Studio supports the following file extensions: - TFLM: `.tflite`, `.lite` - PyTorch: `.pth.tar` If you add a model with a file extension that isn't valid for the selected backend, CodeFusion Studio flags the model as not valid and lists the supported file extensions. ______________________________________________________________________ 1. TensorFlow Lite for Microcontrollers, a lightweight version of TensorFlow Lite optimized for embedded devices. See [tensorflow/tflite-micro](https://github.com/tensorflow/tflite-micro). [↩](#fnref:tflm "Jump back to footnote 1 in the text") 1. PyTorch, an open-source deep learning framework developed by Meta. See [pytorch/pytorch](https://github.com/pytorch/pytorch). [↩](#fnref:pytorch "Jump back to footnote 2 in the text") # Supported processors CodeFusion Studio supports a growing number of processors from across Analog Devices' portfolio. ## Supported MSDK processors Microcontroller Software Development Kit (MSDK) processors support bare-metal projects using the MSDK plugin, as well as Zephyr-based development workflows through dedicated Zephyr plugins. Some MSDK processors also support configuration tools in System Planner and AI model import and configuration in the **Manage AI Models** tab. | Processor | Bare-metal SDK[1](#fn:sdk) | Zephyr | Config Tools[2](#fn:cfg) | [AI Tools](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/manage-ai-models/index.md)[3](#fn:ai) | [TESA](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/resources/security-resources/index.md)[4](#fn:tesa) | | -------------------------------------------------------------- | -------------------------- | ------ | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | | [MAX32650](https://www.analog.com/en/products/max32650.html) | Yes | Yes | Yes | No | Yes | | [MAX32655](https://www.analog.com/en/products/MAX32655.html) | Yes | Yes | Yes | No | Partial | | [MAX32657](https://www.analog.com/en/products/MAX32657.html) | No | Yes | Yes | Yes | Yes | | [MAX32658](https://www.analog.com/en/products/MAX32658.html) | No | Yes | Yes | No | Yes\* | | [MAX32660](https://www.analog.com/en/products/max32660.html) | Yes | Yes | Yes | No | No | | [MAX32662](https://www.analog.com/en/products/max32662.html) | Yes | Yes | Yes | No | Partial | | [MAX32666](https://www.analog.com/en/products/max32666.html) | Yes | Yes | Yes | No | No | | [MAX32670](https://www.analog.com/en/products/max32670.html) | Yes | Yes | Yes | No | Yes | | [MAX32672](https://www.analog.com/en/products/MAX32672.html) | Yes | Yes | Yes | No | Partial | | [MAX32675C](https://www.analog.com/en/products/max32675c.html) | Yes | Yes | Yes | No | No | | [MAX32690](https://www.analog.com/en/products/MAX32690.html) | Yes | Yes | Yes | Yes | Yes | | [MAX78000](https://www.analog.com/en/products/MAX78000.html) | Yes | Yes | Yes | No | Partial | | [MAX78002](https://www.analog.com/en/products/MAX78002.html) | Yes | Yes | Yes | Yes | No | ## Supported SHARC-FX processors SHARC-FX processors support bare-metal projects using a SHARC-FX DSP plugin, with support for the [Pin Config](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/pin-config/index.md), [Peripheral Allocation](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/peripheral-allocation/index.md), and [SRU Config](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/sru-config/index.md) tools in System Planner. All SHARC-FX processors also support AI model import and configuration in the **Manage AI Models** tab. W variants (automotive-grade) are listed as separate plugin entries in CodeFusion Studio but have the same support level as their corresponding base processors. | Processor | Bare-metal SDK[1](#fn:sdk) | Zephyr | Config Tools[2](#fn:cfg) | [AI Tools](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/manage-ai-models/index.md)[3](#fn:ai) | [TESA](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/resources/security-resources/index.md)[4](#fn:tesa) | | ------------------------------------------------------------------------- | -------------------------- | ------ | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | | [ADSP-21834 / 21834W](https://www.analog.com/en/products/adsp-21834.html) | Yes | No | Partial | Yes | No | | [ADSP-21835 / 21835W](https://www.analog.com/en/products/adsp-21835.html) | Yes | No | Partial | Yes | No | | [ADSP-21836 / 21836W](https://www.analog.com/en/products/adsp-21836.html) | Yes | No | Partial | Yes | No | | [ADSP-21837 / 21837W](https://www.analog.com/en/products/adsp-21837.html) | Yes | No | Partial | Yes | No | | [ADSP-SC834 / SC834W](https://www.analog.com/en/products/adsp-sc834.html) | Yes | No | Partial | Yes | No | | [ADSP-SC835 / SC835W](https://www.analog.com/en/products/adsp-sc835.html) | Yes | No | Partial | Yes | No | ______________________________________________________________________ 1. Indicates support for bare-metal development workflows in CodeFusion Studio, including the MSDK for MAX32xxx and MAX78xxx microcontrollers, and the ADSP-2183x/SC83x SHARC-FX family. [↩](#fnref:sdk "Jump back to footnote 1 in the text")[↩](#fnref2:sdk "Jump back to footnote 1 in the text") 1. Indicates support for configuration flows in System Planner. **Yes** = Full support, **Partial** = Pin Config, Peripheral Allocation, and SRU Config only, **No** = Not supported. [↩](#fnref:cfg "Jump back to footnote 2 in the text")[↩](#fnref2:cfg "Jump back to footnote 2 in the text") 1. Indicates AI Tools support in CodeFusion Studio, including model integration and advanced analysis for embedded AI applications. For details on supported AI model formats see [supported processors and model formats](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/about/supported-ai-model-formats/index.md). [↩](#fnref:ai "Jump back to footnote 3 in the text")[↩](#fnref2:ai "Jump back to footnote 3 in the text") 1. TESA security support: **Yes** = Full TESA support including UCL and USS, **Partial** = UCL support only, **No** = Not supported. * For MAX32658, use the MAX32657 USS and UCL examples. [↩](#fnref:tesa "Jump back to footnote 4 in the text")[↩](#fnref2:tesa "Jump back to footnote 4 in the text") # Telemetry If you enable telemetry, CodeFusion Studio collects a limited set of diagnostic and usage data. This data helps us understand which features are used most often so we can prioritize improvements and fix problems. It is used solely to improve the functionality and user experience of CodeFusion Studio. Telemetry is **disabled by default** and collects no personally identifying information. For more information, refer to our [Privacy Policy](https://www.analog.com/en/who-we-are/legal-and-risk-oversight/data-privacy/privacy-policy.html). ## What we collect ### Activities we record When telemetry is enabled, CodeFusion Studio records events for the following activities: - **Extension activation** — startup and shutdown, including activation timing to help us improve performance, and opening a CodeFusion Studio workspace. - **Telemetry preference** — selecting **Share Data** when prompted to enable telemetry. - **Workspace creation** — including whether creation succeeded or failed and non-identifying context about the projects created in the workspace. - **Feature access and navigation** — opening a tool or view and selecting items in the **Quick Access** panel, so we can understand which features are used most. - **System Planner configuration** — opening the configuration tools and navigating between screens; allocating, deallocating, and configuring peripherals; assigning pins and signals; configuring clocks; creating, modifying, or deleting memory partitions; and configuring data flows. - **Code generation** — including whether generation succeeded or failed. - **Building and flashing** — operations and whether each succeeds or fails. - **Debugging** — starting debug sessions, opening SEGGER Ozone, using the GDB Toolbox, starting the Model Context Protocol (MCP) server for the AI Debug Assistant, and capturing and saving diagnostic event data. - **AI model tools** — adding models in System Planner, creating workspaces from a model, model validation, compatibility checks, on-hardware profiling, hardware deployment, code generation, and capturing profiler traces. - **Command-line interface (CLI) commands** — running [`cfsutil`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/telemetry/index.md) commands, including the duration and outcome of each command. ### Information included with each event Every event includes a small set of non-identifying metadata: - **Environment** — CodeFusion Studio version, VS Code version (or Node.js version for CLI events), and host operating system (for example, `osx`, `windows`, or `linux`). - **Usage identifiers** — a randomly generated usage identifier, stored locally, and a session ID, used only to group events for aggregate analysis. For details, view [Telemetry user ID](#telemetry-user-id). - **User type** — whether the session is an internal Analog Devices user or an external user. This lets us distinguish internal testing from real-world usage. To determine this, CodeFusion Studio checks locally whether you are signed in to myAnalog with an ADI account or using an ADI-managed computer. Only the result is shared. - **Event-specific context** — some events include details relevant to the activity, such as the selected system on chip (SoC) and package, the build system, the flash method, and the duration and outcome of the operation. For example, a successful build event records the following event-specific fields: ``` { "soc": "MAX32690", "socPackage": "TQFN", "buildSystem": "ninja", "exitCode": 0, "durationMs": 4820 } ``` ### What we don't collect - No source code, file contents, file paths, or project names. - No personal information. The user ID is a random identifier, not tied to your name, email, or account. - No names of custom hardware or plugins. When you use a board or plugin that was not developed by Analog Devices, its name is replaced with `Custom` before the event is sent, so your proprietary designs are not disclosed. - No names of your own AI models. When you add a local model file or a model from a model zoo other than the Analog Devices Model Zoo, its name and details are replaced with `Custom` before the event is sent. ## Enable Telemetry Telemetry is **disabled by default**. When you first launch CodeFusion Studio, you’ll be prompted to choose whether you want to enable telemetry: - **Share Data** – Enables telemetry to help improve CodeFusion Studio - **Don't Share Data** – Disables telemetry If you dismiss the prompt without making a choice, it will reappear each time you start CodeFusion Studio until a selection is made. ## Update Telemetry settings You can update your telemetry settings at any time through VS Code settings: 1. Open **Settings** (press `Ctrl,` on Windows/Linux or `Cmd,` on macOS, or use the gear icon in the lower-left corner). 1. Search for `cfs.telemetry`. 1. Choose your preferred option. Alternatively, edit the `settings.json` file in your CFS workspace and set: ``` "cfs.telemetry.enable": true // or false ``` If you remove this setting from `settings.json`, the telemetry prompt will reappear each time CodeFusion Studio starts until a value is defined. Note The CFS telemetry setting (`cfs.telemetry.enable`) respects the global VS Code telemetry setting (`telemetry.telemetryLevel`). For additional information, see [VS Code Telemetry](https://code.visualstudio.com/docs/configure/telemetry). If the CFS telemetry setting is enabled but the global setting is disabled, telemetry will not be sent. ### Telemetry user ID When CodeFusion Studio first launches, it automatically generates a unique user identifier stored under the setting: ``` "cfs.telemetry.userId" ``` This identifier is created on first run, even if telemetry is later disabled. It allows telemetry events to be linked across sessions for aggregate analysis, for example, identifying the type of workspace created (such as the selected SoC, board, or plugin). If you delete this setting, a new ID is generated automatically the next time CodeFusion Studio starts. The `cfs.telemetry.userId` value does not contain personal data and is used solely for usage analytics. Note The presence of this setting does not mean telemetry is active. Telemetry is only sent if both the global VS Code telemetry setting (`telemetry.telemetryLevel`) and the CFS setting (`cfs.telemetry.enable`) are enabled. ## View Telemetry requests You can view telemetry activity in two ways: the **Output** panel shows which events CodeFusion Studio attempts to send and which fields they include, and a network inspection tool shows the full content of each request. ### View telemetry events in the Output panel Use the **Output** panel to confirm that an action (such as creating a workspace or building a project) triggered a telemetry send attempt and to view the attempted event. 1. Select **View → Output**, or press `Ctrl+Shift+U` on Windows/Linux or `Cmd+Shift+U` on macOS. 1. Select **CodeFusion Studio** from the channel list. 1. Look for lines containing `[Telemetry]`. The panel retains logged events, so any actions you have already taken in this session appear here. Each line shows the event name and the event-specific metadata field names, for example: ``` [Telemetry] workspace_create_success - Data: ["soc","package","board","pluginId","projects"] ``` The **Output** panel lists event-specific field names, but not their values or the standard fields added to every request. To inspect the complete request values, use a network inspection tool. ### View the full request content Advanced users can use network inspection tools to view the full content of telemetry requests, including field values. 1. Install a network inspection tool that supports HTTPS decryption — for example, Fiddler Everywhere (cross-platform). For proxy-based tools, you’ll typically need to enable HTTPS traffic decryption and install a custom root certificate. 1. To inspect requests from the CLI, first make sure CLI telemetry is enabled. It's controlled separately from the VS Code settings, so run `cfsutil telemetry enable` to turn it on. For details, see [CLI telemetry](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/telemetry/index.md). Then route the CLI traffic through the proxy configured in your inspection tool, because the CLI does not use the system proxy settings. Set `HTTPS_PROXY` to the proxy address and `NODE_USE_ENV_PROXY=1` in the terminal before running a command. For example: ``` NODE_USE_ENV_PROXY=1 HTTPS_PROXY=http://127.0.0.1:8866 cfsutil plugins ``` ``` set NODE_EXTRA_CA_CERTS=C:\path\to\FiddlerRootCertificate.pem set NODE_USE_ENV_PROXY=1 set HTTPS_PROXY=http://127.0.0.1:8866 cfsutil plugins ``` Replace `127.0.0.1:8866` with the proxy address of your tool. Note On Windows, you might need to set `NODE_EXTRA_CA_CERTS` to point to the root certificate of your tool (`set NODE_EXTRA_CA_CERTS=`). The file must be in PEM (text) format (in Fiddler Everywhere, export it as PEM from **Settings → HTTPS**). 1. Trigger a telemetry event, like creating a new workspace. 1. Look for a POST request sent shortly after the event, targeting a domain that includes `telemetry` and a path ending in `/v1/logs`. The following example shows telemetry data sent as part of workspace creation. The `board` and `pluginId` values use Analog Devices hardware and plugins; the name of a custom board or plugin appears as `Custom`. ``` { "appId": "", "message": { "event": { "action": "workspace_create_success", "timestamp": 1759940462507, "metadata": { "soc": "MAX32690", "package": "TQFN", "board": "EvKit_V1", "pluginId": "com.analog.singlecore.msdk.helloworld", "projects": [ { "coreId": "CM4", "pluginId": "com.analog.singlecore.msdk.helloworld", "pluginVersion": "1.0.0", "firmwarePlatform": "msdk" } ], "cfsVersion": "2.4.0", "vscodeVersion": "1.101.0", "userId": "", "userType": "External", "sessionId": "", "hostOS": "osx" } } } } ``` # Build and flash Learn how to build and flash projects in CodeFusion Studio. This section covers IDE build tasks, environment configuration, terminal usage, Zephyr-specific workflows, and troubleshooting build issues. - Available [Tasks](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/build-and-flash/tasks/index.md) such as build, clean and flash - Configuring [CFS settings](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/build-and-flash/cfs-settings/index.md) - Using the [CFS Terminal](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/build-and-flash/cfs-terminal/index.md) - Managing [Zephyr RTOS projects](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/build-and-flash/zephyr/index.md) - [Troubleshooting](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/build-and-flash/troubleshooting/index.md) # CFS Settings ## Overview CodeFusion Studio provides additional settings within VS Code that allow you to configure your development environment, set up toolchains, customize debugging options, and more. These settings determine how CodeFusion Studio locates SDKs, compilers, and debuggers during build and flash operations. Use these settings when you need to: - Change or override the toolchain used for a specific SoC or target - Adjust build or debug options (for example, set the J-Link path, choose a debugger, or specify the ELF file to load) - Enable or disable specific CodeFusion Studio features ## Accessing CFS settings Settings are saved at either the User, Workspace, or Folder level and are applied hierarchically: `Folder > Workspace > User`. - User settings can be modified from Settings by selecting **File > Preferences > Settings** (on macOS: **Code > Settings > Settings**). You can also open Settings from the Command Palette (`Ctrl+Shift+P` / `⇧⌘P`) by searching for **Preferences: Open Settings (UI)**, or by using the keyboard shortcut (`Ctrl+,` on Windows/Linux; `⌘,` on macOS). - Workspace settings can be modified from Settings or by editing the `.vscode/settings.json` in your workspace. - Folder settings can be modified by editing the `.vscode/settings.json` in your subdirectory. When you create a new workspace, a corresponding set of workspace settings are automatically generated and will have values related to that workspace. ## Viewing CFS settings To view a complete list of available CFS settings in the CodeFusion Studio extension, complete the following steps: 1. Open the **Extensions** tab (`Ctrl+Shift+X` or `Cmd+Shift+X` on macOS) in the VS Code activity bar. 1. Select the **CodeFusion Studio** extension from the list of installed extensions. 1. In the **CodeFusion Studio** extension page, navigate to **Features > Settings** to view all available CFS settings. # CFS Terminal CodeFusion Studio (CFS) provides a custom terminal called the CFS Terminal. The CFS Terminal is the default terminal that opens when interacting with CodeFusion Studio and adds CodeFusion Studio tools to your `PATH` without any additional user configuration (for example, `cfsutil` and Zephyr's `west`). Most tasks available in the IDE (such as build, flash, and workspace management) have command-line equivalents in `cfsutil` that can be run from the CFS Terminal. See the [CFS Command Line Utility](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/index.md) documentation for more information. The underlying shell depends on your host operating system: - `cmd` on Windows - `zsh` on Mac - `bash` on Linux ## Launch new terminal 1. Open the terminal: - On macOS/Linux, select **Terminal > New Terminal**. - On Windows, select **View > Terminal**. - Use the `` Ctrl + Shift + ` `` keyboard shortcut. 1. In the terminal panel, click the dropdown arrow next to the **+** icon in the top right corner. 1. Choose **CFS Terminal** from the list. 1. Run `cfsutil` in the terminal to confirm it's working correctly. ## Clear the terminal Click on the **Views and More Actions...** menu (...) in the top right corner of the terminal window and select **Clear Terminal**. ## Copy and Paste in the terminal To copy text from the terminal, select the text, and right-clicking on the selected text. Keyboard shortcut: **CONTROL+C** (**COMMAND+C** on Mac). To paste text into the terminal, right-click in the desired location, or press `Ctrl+V` on Windows, `Ctrl+Shift+V` on Linux, or `Command+V` on macOS. ## Next steps See [Zephyr RTOS projects](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/build-and-flash/zephyr/index.md) for examples of using the CFS Terminal with `west build` commands. # Build, clean, flash, and debug tasks After [creating a workspace](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-new-workspace/index.md) and configuring it in [System Planner](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/index.md), you can run various tasks to create, flash, clean, and run applications. ## Access the tasks Tasks can be accessed in the following ways: 1. **Command Palette**: Open the Command Palette (`Ctrl+Shift+P` or `Cmd+Shift+P` on macOS), search for **Tasks: Run Build Task** or **Tasks: Run Task**, then select the desired task from the list. 1. **Actions view**: Click the **CFS icon** in the **Activity Bar**, then choose a task from the **Actions** view. You can also create new custom tasks by clicking **Copy and Edit** next to each task. 1. **Status Bar**: Click a relevant icon (build, clean, flash, debug) on the left side of the **Status Bar**. 1. **From the menu**: Go to **Terminal > Run Build Task**, then select the desired task. Note All tasks operate in the same way independent of the mechanism used to invoke them. ## Tasks ### CFS: build The **CFS: build** task compiles the code for your project. For MSDK projects, this uses **make**. For Zephyr projects, this uses **west build**. Build configuration variables (such as target, board, and toolchain) are read from the workspace `.vscode/settings.json` file (VS Code settings) and are set during workspace creation, or in the workspace, user, or system settings. The task creates the `./build` directory, which contains the output binary and all intermediary object files. Note Shortcut: `Ctrl` + `Shift` + `B` (Windows/Linux) or `Command` + `Shift` + `B` (Mac).\ The build task is also available with shortcuts on the left-hand side of the status bar. ### CFS: pristine build The **CFS: pristine build** task is available for Zephyr projects and performs a clean build from scratch, removing all previous build artifacts before compiling. This runs `west build -b --pristine=always`, which ensures a completely fresh build without relying on cached build outputs. Use this task to guarantee a clean slate or troubleshoot build issues that may be caused by stale artifacts. ### CFS: clean The **CFS: clean** task cleans the build output, removing the `./build` directory and all of its contents. Note The clean task is available with the shortcut on the left-hand side of the status bar. ### CFS: clean-periph The **CFS: clean-periph** task runs [CFS: clean](#cfs-clean) and removes the build output for the MSDK peripheral drivers. Use **CFS: clean-periph** to recompile the peripheral drivers from source on the next build. ### CFS: flash The flash task runs [CFS: build](#cfs-build) first, then flashes the output binary to the microcontroller using your configured debugger. The task name in the task picker will include the debugger type (for example, **CFS: flash (OpenOCD)** or **CFS: flash (JLink)**). After flashing completes, the target state (halted or running) depends on the debugger/runner; reset or power cycle the microcontroller, or use your debugger to resume execution as needed. A debugger must be connected correctly to use this task. See [Connect hardware](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/connect-hardware/index.md) and [Troubleshooting](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/build-and-flash/troubleshooting/index.md). Note The flash task is available with the shortcut on the left-hand side of the status bar. ### CFS: flash & run The flash & run task runs [CFS: build](#cfs-build) first, then flashes the output binary to the microcontroller and resumes execution of the program after flashing is complete. The task name in the task picker will include the debugger type (for example, **CFS: flash & run (OpenOCD)** or **CFS: flash & run (JLink)**). ### CFS: erase The erase task erases all of the application code in the flash memory bank using your configured debugger. The task name in the task picker will include the debugger type (for example, **CFS: erase (OpenOCD)** or **CFS: erase (JLink)**). After running this task, the target microcontroller is effectively blank. Use to recover from low power (LP) lockouts, bad firmware, or other issues. ### CFS: debug The **CFS: debug** task will launch the previous debug session. This may run the [CFS: flash](#cfs-flash) command before running the application and halting at the breakpoint at `main()`. The executable file will need to be built using the [CFS: build](#cfs-build) command before debugging. Care should be made to ensure the executable is up to date before debugging. Using the activity view you can select a debug session to launch. See [Debugging an application](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-an-application/index.md) for more information. Note The debug task is available with the shortcut on the left-hand side of the status bar. ## Create custom tasks To create a custom build or flash task, do one of the following: - Click the dropdown arrow in the **Terminal** panel and select **Configure Tasks**. Then choose a task from the list to copy. - In the **Actions** view, click **Copy and Edit** next to the task you want to duplicate. This opens your project's `.vscode/tasks.json` file and adds a copy of the selected task. You can now edit the copy without affecting the original. The new task also appears as a separate entry in the **Actions** view, with a label that starts with `CFS:` (for example, `CFS: build`). Tip To personalize your task, append a description to the `label` in `tasks.json`. For example: `"label": "CFS: build MAX32690-debug"` ## Modify build tasks To modify a custom build or flash task, do one of the following: - Click the dropdown arrow in the **Terminal** panel and select **Configure Tasks**. Then choose the task your previously created from the list. - In the **Actions** view, click **Edit** next to your custom task. The `.vscode/tasks.json` file opens in your editor. You can update the task directly in the file. For more information on modifying build tasks, see [Custom tasks](https://code.visualstudio.com/docs/editor/tasks#_custom-tasks) ## Custom tasks with dependencies Tasks defined in `.vscode/tasks.json` support the built-in `dependsOn` and `dependsOrder` properties in VS Code. See [Compound tasks](https://code.visualstudio.com/docs/editor/tasks#_compound-tasks) for the syntax. CodeFusion Studio also discovers custom tasks defined in a separate `.vscode/cfs.tasks.json` file in the project directory. These tasks appear in the **Actions** view alongside tasks from `tasks.json`, and support their own `dependsOn` property, which runs the dependency task first when the task is started from the **Actions** view. See [Run a task before another task with `dependsOn`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/tasks/#run-a-task-before-another-task-with-dependson) for the file format and examples. In the **Actions** view: - CodeFusion Studio resolves a dependency label only to a CFS task in the same project; it doesn't resolve tasks from `.vscode/tasks.json`. - The **Actions** view only lists tasks whose label contains a recognized keyword, such as `build`, `clean`, `erase`, `flash`, or `documentation`. A dependency task with an unrelated label still runs correctly but won't appear in the **Actions** view itself. - If a dependency task fails, CodeFusion Studio stops and doesn't run the dependent task. A notification names the failed task, its exit code, and the dependent task that was skipped. # Troubleshooting ## Build flags - Having build flags set in environment variables may cause unpredictable build behavior.\ If you are seeing flags that appear to be set incorrectly in your projects then check that there are no environment variables set which may be overriding them.\ Examples of such variables are **AS**, **ASFLAGS**, **CC**, **CFLAGS**, **CXX**, **CXXFLAGS**, **CPPFLAGS**, **LD**, **LDLIBS**, **LDFLAGS**. Note A list of environment variables can be produced by running `set` on Windows, or `env` on Linux or Mac. ## Flashing fails - Use a USB cable that supports data transfer to connect the board or debug probe to your computer. Charge-only cables might power the hardware but cannot be used for flashing. - Verify that the board and debug probe are connected correctly. See [Connect hardware](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/connect-hardware/index.md) or refer to the data sheet for the board. - Check that the board and debug probe have power by checking their LED indicators. # Zephyr RTOS projects ## Modify west commands CodeFusion Studio generates a default `west build` command for your current project (ex.: `west build -b apard32690/max32690/m4`). While the default west build command covers most common build cases, there are situations where you need to pass additional parameters to west. Examples of common cases where you want to alter the west build command include: - Setting one-off KConfig parameters that you only want to use for one build: `-DCONFIG_FAULT_DUMP=1` - Associating an optional config overlay file with your build: `-DOVERLAY_CONFIG=my-overlay.conf` - Specifying a 'shield' to use with your development board: `-DSHIELD=shield_name` There are two main ways you can customize the west build command in CodeFusion Studio: 1. [Modify the task](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/build-and-flash/tasks/#modify-build-tasks) associated with the 'build' action. 1. Manually enter a west command using [The CFS Terminal](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/build-and-flash/cfs-terminal/index.md). ### Example one To perform a west build with additional `OVERLAY_CONFIG` parameters, tell the build system to include this config file in the build operation by passing the parameters on the CFS terminal as follows: ``` west build -p auto -b apard32690/max32690/m4 -- -DOVERLAY_CONFIG=my-overlay.conf ``` ### Example two To debug an application and receive more details when hitting a fault handler, do a one-off build with the `CONFIG_FAULT_DUMP` KConfig flag set: ``` west build -p auto -b apard32690/max32690/m4 -- -DCONFIG_FAULT_DUMP=1 ``` Note The double dash `--` in the `west` command line will pass any following arguments directly to **CMake**. ## Edit west.yml in the West Editor To view and edit the projects, groups, and group filter of a `west.yml` manifest as cards instead of YAML, use the [West Editor](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/developer-tools/west-editor/index.md). ## Add an installed package to a west workspace CodeFusion Studio provides a `cfspkg://` Git protocol, so `west` can clone a package installed with the Package Manager into your own application. In the `west.yml` manifest, set the project `url` to `cfspkg:///`: ``` manifest: projects: - name: my-project url: cfspkg://my-package/1.0.0 revision: main # Example only. Replace with a ref that exists in the Git repository included in the package. ``` When you run `west update` from the [CFS Terminal](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/build-and-flash/cfs-terminal/index.md), or from a [custom task](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/tasks/#define-tasks-for-cli-use) that you run with `cfsutil tasks run`, Git resolves the URL to the installed package and clones it into your workspace. The `revision` is a branch, tag, or commit in the package's Git repository. It is separate from the package version in the URL, and `west update` fails if the repository doesn't have it. Before you use this protocol: - Install the exact package version with the [Package Manager](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/index.md) or `cfsutil pkg install /`. If the version isn't installed, the clone fails and the error message shows the install command. To find the name and version of an installed package, use the [Packages view](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/view-installed-packages/index.md) in the CodeFusion Studio sidebar, or run `cfsutil pkg list`. - The package must be a Git repository. Packages that aren't Git repositories aren't supported. ## Add compiler arguments To pass specific compiler switches to the build system, use **zephyr_cc_option** in **CMakeLists.txt**: ``` zephyr_cc_option(-fstack-usage) ``` # CFS command line utility **CFSUtil** is an executable which provides command-line access to CodeFusion Studio functionality. ## Accessing CFSUtil You can access `cfsutil` from the CFS terminal or from a system terminal. ### From the CFS terminal in VS Code (recommended) Open a new terminal in VS Code (**View > Terminal** or `` Ctrl+` ``), then: 1. In the terminal panel, click the dropdown arrow next to the **+** icon. 1. Select **CFS Terminal** from the list. 1. Run your command, for example: ``` cfsutil --help ``` ### From a system terminal outside VS Code If you prefer to run `cfsutil` outside of VS Code, use the following paths: - **Windows:** `/Utils/cfsutil/bin/cfsutil.cmd` - **Linux and macOS:** `/Utils/cfsutil/bin/cfsutil` Note This page refers to `cfsutil`, but the commands used are the same regardless of method used. Tip `cfs` is an alias for `cfsutil` and works with all commands. ## Structure CFSUtil contains a hierarchy of commands and sub-commands, each with their own parameters and help menus. ## Help Passing `--help` at any level of the hierarchy shows the help information about that component. You can access help at various levels: - `cfsutil --help` provides top-level help. - `cfsutil ai --help` provides help for the `ai` command group. - `cfsutil ai build --help` provides help for the `ai build` command. Example ``` cfsutil --help ``` Example ``` cfsutil ai --help ``` Example ``` cfsutil ai build --help ``` ## Command Categories CFSUtil provides various command categories for different tasks: - **[AI](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/index.md)** - Compile AI models, analyze compatibility, profile resources, and manage models within a workspace - **[CFS Plugins](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/cfs-plugins/index.md)** - List and manage CFS plugins - **[Catalog](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/catalog/index.md)** - Update or restore the SoC catalog - **[Convert](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/convert/index.md)** - Convert a profiling trace into a CodeFusion Studio report - **[Device Tree](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/device-tree/index.md)** - Parse and work with device tree files - **[Docker](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/docker/index.md)** - Pull Docker images - **[ELF Utilities](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/elf-utilities/index.md)** - Analyze and inspect ELF files - **[Generate](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/generate/index.md)** - Generate source code from configuration files - **[myAnalog Authentication](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/myanalog-auth/index.md)** - Authenticate with myAnalog for package access - **[API Key Authentication](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/apikey-auth/index.md)** - Create and manage API keys for use in automated workflows - **[Package Manager](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/package-manager/index.md)** - Install and manage SDKs, plugins, and toolchains - **[Plugins](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/oclif-plugins/index.md)** - Extend CFSUtil with additional CLI plugins - **[Port](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/port/index.md)** - Information about active serial ports - **[Project](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/project/index.md)** - Create and manage projects within workspaces - **[SoCs](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/socs/index.md)** - Manage SoC data models - **[Tasks](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/tasks/index.md)** - List tasks for a named workspace - **[Telemetry](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/telemetry/index.md)** - Manage telemetry preferences - **[Validate](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/validate/index.md)** - Validate CFS configuration files against the schema - **[Workspace](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/workspace/index.md)** - Create and manage CFS workspaces ## JSON output envelope Most commands, except `ai e2e`, return their output in a standard envelope when you use `--format json`. Note If you wrote scripts against the earlier JSON output of a command that now uses the envelope, read the result from `data`. Some commands wrap a top-level array in a named property, such as `data.models`. Note The following commands don't use the envelope yet, but are planned to: - Device tree: `dt parse` - Docker: `docker pull` - Generate: `generate` - myAnalog: `myanalog apikey create`, `myanalog apikey delete`, `myanalog apikey list` - Telemetry: `telemetry enable`, `telemetry disable`, `telemetry status` - Validate: `validate config`, `validate dependencies` A successful command returns: ``` { "ok": true, "command": "catalog update", "data": { "updated": true }, "warnings": [] } ``` A failed command returns: ``` { "ok": false, "command": "socs info", "errors": [ { "code": "SOC_NOT_FOUND", "message": "SoC 'abc' not found in catalog" } ] } ``` | Field | Description | | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ok` | `true` when the command succeeded, `false` when it failed. | | `command` | The canonical command identifier, with spaces between the topic and command name (for example, `socs list`). Aliases resolve to the canonical identifier. | | `data` | Command-specific result. Present only on success. | | `warnings` | List of objects with a `message` field. Present only on success. In JSON mode, warnings appear here instead of in the terminal. | | `errors` | List of objects with a `code` and a `message`. Present only on failure. | ## Verbose and quiet output Use `-v`/`--verbose` to show additional output, such as diagnostic messages or extra detail for each result. Use `-q`/`--quiet` to suppress non-error output, including warnings. Errors are still shown. Some commands still show some output, or hide error details, with `--quiet`. For details, see the command page. The two flags are mutually exclusive. `--quiet` works with most commands. The oclif plugin-management commands use their own output flags. `--verbose` is being added to commands individually and currently changes the output for the following command groups: - AI: `ai build`, `ai e2e`, and `ai model list` - Device tree - ELF utilities: `elf info` - Generate - myAnalog: `myanalog login` and `myanalog status` - Ports: `port list` - SoCs: `socs list` - Tasks - Validate: `validate config` - Workspace: `workspace configure` ## Working with multiple configuration files Some `cfsutil` commands work with `.cfsconfig` files. When `cfsutil` automatically discovers a configuration in your workspace, it expects only one `.cfsconfig` file in the `.cfs/` directory. Some commands require this file to use the filename expected by your workspace (`-.cfsconfig`). Others may select the first `.cfsconfig` file found in `.cfs/`. If multiple configuration files are present, selection may be non-deterministic and lead to unexpected results. To avoid this, ensure that only one `.cfsconfig` file is present in `.cfs/` before running a command. The `--config` option, if supported by the command (such as the `ai` commands), should be used to select a specific file directly. Otherwise, to switch configurations, copy the one you want into `.cfs/` using the expected active filename: Warning The `rm` command permanently deletes all `.cfsconfig` files in the `.cfs/` directory. Ensure you have backups or copies of any configurations you want to keep before running it. ``` rm -f .cfs/*.cfsconfig cp .my_configs/combination_i_want.cfsconfig .cfs/-.cfsconfig cfsutil ``` Or store alternates in `.cfs/` under a name that does not end in `.cfsconfig` and copy the one you want to activate to the expected filename: ``` cp .cfs/my.cfsconfig.a .cfs/-.cfsconfig cfsutil ``` Note The above examples use Unix-style commands (`rm`, `cp`). These work in the CFS Terminal, macOS, Linux, or Windows environments such as Git Bash or WSL. # API key authentication *API keys* provide an alternative way to authenticate CLI commands without an active myAnalog session. They are useful in automated workflows, CI/CD pipelines, and scripted environments where interactive login is not possible. Note API keys are supported in `cfsutil` only. The VS Code extension does not support API key authentication. ## Create an API key ``` cfsutil myanalog apikey create [--description ] ``` Creates a new API key. The key value is displayed once when the command succeeds — save it immediately, as it cannot be retrieved later. | Flag | Description | | ----------------------------- | ----------------------------------------------------------------------------------- | | `--description ` | Optional label to identify the key in the output of `cfsutil myanalog apikey list`. | Note Creating an API key requires an active myAnalog session. Run `cfsutil myanalog login` to sign in first. Example ``` cfsutil myanalog apikey create cfsutil myanalog apikey create --description "CI pipeline key" ``` ## Use an API key Set the `CFS_API_KEY` environment variable to your API key value before running a command. ``` CFS_API_KEY= cfsutil catalog update ``` To use the key for the current shell session, export the variable: ``` export CFS_API_KEY= cfsutil catalog update ``` Commands that support API key authentication include `catalog update`, `ai build`, `docker pull`, and package manager commands. For details, see [Catalog](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/catalog/index.md), [AI Build](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/build/index.md), [Docker](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/docker/index.md), and [Package Manager](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/package-manager/index.md). ## List API keys ``` cfsutil myanalog apikey list ``` Lists all API keys associated with your account, including each key's ID, masked value, and expiration date. Note Listing API keys requires an active myAnalog session. Run `cfsutil myanalog login` to sign in first. Example ``` cfsutil myanalog apikey list ``` ## Delete an API key ``` cfsutil myanalog apikey delete ``` Deletes an API key. The key ID is shown in the output of `cfsutil myanalog apikey list`. | Argument | Description | | ---------- | ------------------------------------------------------------- | | `` | The ID of the API key to delete, in the format `apikey_`. | Note Deleting an API key requires an active myAnalog session. Run `cfsutil myanalog login` to sign in first. Example ``` cfsutil myanalog apikey delete apikey_01234567890abcdef ``` # Catalog The SoC catalog provides the latest metadata for supported System-on-Chip (SoC) devices, ensuring access to up-to-date information on documentation, cores, boards, and packages. The `catalog` commands allow you to update the SoC catalog to the latest online version, or restore it to the version that was created when you installed CodeFusion Studio. ## Update the catalog ``` cfsutil catalog update [--format text|json] ``` Updates the catalog to the latest version available online. Requires an internet connection. If you don't have an active myAnalog session or a valid API key in `CFS_API_KEY`, the update uses the public catalog and might omit restricted SoCs. | Flag | Description | | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-f, --format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | With `--format json`, `data` is `{ "updated": true }` on success. If the update fails, the error code is `CATALOG_UPDATE_FAILED`. ## Restore the catalog ``` cfsutil catalog restore [--format text|json] ``` Restores the catalog to its original version using the backup stored in `/Data/SoC/catalog.zip`. This will delete the existing catalog. | Flag | Description | | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-f, --format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | ## Additional information - [myAnalog authentication](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/myanalog-auth/index.md) – Authenticate with your myAnalog account to update the catalog. - [API key authentication](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/apikey-auth/index.md) – Use an API key instead of a myAnalog session. - [Catalog Manager](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/developer-tools/catalog-manager/index.md) – Learn about the background service that manages the SoC catalog. # CFS plugins The CFS plugins command allows you to list CFS plugins. These commands work with plugins installed with CodeFusion Studio or added through the Package Manager, and with plugins built locally from the [CFS Plugins repository](https://github.com/analogdevicesinc/cfs-plugins). ## List ``` cfsutil cfsplugins list [-s ] [--soc ] [--board ] [--service ] [--config-options] [--format text|json] ``` Lists all available CFS plugins installed with CodeFusion Studio or added through the Package Manager. You can also specify additional search paths to include locally built plugins. Results can be filtered by SoC, board, or service type. | Flag | Description | | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-s=` | (Optional) Additional plugin search path. Can be used multiple times. | | `--soc=` | Filter results by supported SoC name | | `--board=` | Filter results by supported board name | | `--config-options` | Include configuration options (properties.project) in output | | `--service=` | Filter results by service type. Available services: `workspace`, `project`, `codegen`, `memory`, `peripheral`, `pinConfig`, `clockConfig` | | `-f, --format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | Example ``` # List all plugins cfsutil cfsplugins list # Filter by SoC cfsutil cfsplugins list --soc max32690 # Filter by board cfsutil cfsplugins list --board EvKit_V1 # Filter by service cfsutil cfsplugins list --service workspace # Combine multiple filters cfsutil cfsplugins list --soc max32690 --board EvKit_V1 --service project # Show configuration options cfsutil cfsplugins list --config-options ``` # Convert The `convert` command turns a profiling trace into a CodeFusion Studio report (`.cfsreport`). Use it to create a report from a trace file you already have. The [`cfsutil ai e2e`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/e2e/index.md) command runs it for you on the traces it captures. ## Convert a trace ``` cfsutil convert --input [--input-format ] [--output ] [--format text|json] ``` | Flag | Description | | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `--input` | **Required.** Path to the file to convert. | | `--input-format` | Format of the input file. Currently `tef` (Trace Event Format). If not set, the format is detected from the file extension. | | `--output` | Path to the output report file. The directory must already exist. Default: `_runtime_report.cfsreport`, next to the input file. | | `-f, --format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | If the input has an extension other than `.tef`, pass `--input-format` explicitly. Example ``` cfsutil convert --input trace.tef --output trace.cfsreport ``` # Device tree The device tree provides a command to parse device tree files (`*.dts`,`*.dtsi`, or `*.overlay`). The output is in JSON format. ## Parse `cfsutil dt parse [-v | -q] [-I ...] [-o ]` | Switch | Effect | | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-I, --includeDirs=...` | Specifies directories to include when parsing the Devicetree file. Can be used multiple times, e.g., -Idir1 -Idir2 -Idir3 | | `-o, --output=` | Specifies the output file in JSON format. | | `-v, --verbose` | Print a detailed trace of the parsing steps to standard output along with the parsed result. Use `-o` to write the result to a separate file. Mutually exclusive with `--quiet`. | | `-q, --quiet` | Suppress non-error output. Mutually exclusive with `--verbose`. | Example ``` cfsutil dt parse myfile.dts -o output.json ``` # Docker The CLI can be used to pull Docker images from the Analog Devices registry. If you are logged in to myAnalog or have set the `CFS_API_KEY` environment variable with a valid API key, your credentials are used for authentication. See [myAnalog authentication](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/myanalog-auth/index.md) and [API key authentication](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/apikey-auth/index.md) for more information. ## Requirements The CLI will invoke Docker or Podman to perform the `pull`, so one of these applications must be installed and found on `PATH`. - Docker - Podman ## Pull image ``` cfsutil docker pull IMAGE [-n] [-q] [-u] ``` | Flag | Description | | -------------------- | -------------------------------------------------------- | | `-n, --nocredential` | Do not use credentials when pulling the image. | | `-u, --update` | Pull the Docker image even if it already exists locally. | | `-q, --quiet` | Suppress output from the pull command. | Example ``` cfsutil docker pull docker.cloudsmith.io/adi/codefusion-public/EXAMPLE -q ``` # ELF Provides a series of commands to get information about an ELF file. ## Analyze `cfsutil elf analyze [--format text|json]` Provides high-level information about the ELF file, including the platform, stack/heap sizes and flash/sram sizes. | Flag | Description | | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-f, --format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | ## Info `cfsutil elf info [--format text|json] [-v | -q] [-h] [-a] [-c] [-s]` Provides more in depth information about the ELF file. At least one of the following switches are required. They can be used individually or in combination to select the required information. | Switch | Information | | ------ | ----------------------------------- | | `-a` | Attributes | | `-c` | Core information about the ELF file | | `-h` | Header | | `-s` | Size | Additional options are available to control the output. | Switch | Effect | | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-f, --format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | | `-v` | Print detailed ELF parser diagnostics. Text output only: cannot be used with `--format json`. Mutually exclusive with `-q`. | | `-q` | Suppress non-error output, including warnings. Mutually exclusive with `-v`. | ## Memory `cfsutil elf memory [-s] [-t] [-y] [-i ] [-n ] [--format text|json] [-d]` Provides information on symbols, sections or segments within the ELF file. Choose at least one of the available switches: | Switch | Effect | | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-d` | Print detailed information. Must be used with `-s`, `-t`, or `-y`. | | `-i` | Display from section or segment with id | | `-f, --format` | Output format: `text` (default) or `json`. Must be used with `-s`, `-t`, or `-y`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | | `-n` | Display from section or segment with name | | `-s` | List of segments | | `-t` | List of sections in each segment | | `-y` | List the symbols contain in each section | Note For `-t` and `-y`, the sections/symbols to display can be restricted to a segment/section using an id (`-i`) or a name (`-n`). For `-y`, the segment/symbols can be restricted to a segment/section using a name (`-n`). This command can generate a large amount of output. Consider sending the output to a file for viewing. ## Symbols `cfsutil elf symbols [--format text|json] [--full]` This command allows you to run SQL queries on the symbol table. This involves queries on a table called `symbols` with the following fields. | Name | Meaning | | ------------ | ----------------------------------------------------------------------- | | `name` | Symbol name | | `type` | The type associated with the symbol: None, Object, Function or Filename | | `address` | The start address of the symbol | | `section` | The section containing the symbol | | `size` | The size of the symbol | | `bind` | The binding type of the symbol: Weak, Local or Global | | `visibility` | The visibility of the symbol: Default or Hidden | | `path` | File path | Any valid SQL construct is supported, including `WHERE`, `ORDER`, `LIMIT`, `LIKE` and `REGEXP`. Some examples of queries are as follows: | Filter | Query examples | | ----------------------------- | ----------------------------------------------------------------------- | | Specific columns | `SELECT name,address FROM symbols` | | Symbols larger than 100 bytes | `SELECT * FROM symbols WHERE size > 100` | | Largest symbols | `SELECT * FROM symbols ORDER BY size DESC LIMIT 10` | | Symbols between addresses | `SELECT * FROM symbols WHERE address BETWEEN 0x10000000 AND 0x20000000` | The output can be modified with the following switches. | Switch | Effect | | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `--full` | Print full path (if debug info is available) | | `--format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | # Generate The generate command creates source code from configuration files. ## Generate code `cfsutil generate -i [-v | -q] [-o ] [-s ...]` Generates source code from a `.cfsconfig` file. The `-i ` switch is required. Additional switches are optional. The following switches are available: | Switch | Effect | | ---------------- | --------------------------------------------------------------------------------------------------------------------------- | | `-i=` | Required. The `.cfsconfig` file to generate from | | `-o=` | The output directory for the generated code | | `-s=` | Adds a directory to search for plugins. Can be used multiple times | | `-v` | Print the path of each generated file. In text mode, also print additional diagnostic output. Mutually exclusive with `-q`. | | `-q` | Suppress non-error output, including warnings. Mutually exclusive with `-v`. | Example ``` cfsutil generate -i=max32690-wlp.cfsconfig -v ``` # myAnalog authentication The `myanalog` commands allow you to authenticate with a myAnalog account in order to retrieve, install, and manage SDKs, plugins, and toolchains distributed using the Package Manager. These commands are the command-line equivalents of the authentication options available in the Command Palette, documented in [Access restricted packages](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/auth/index.md). ## Login `cfsutil myanalog login [-f json|text] [-v | -q]` Login with a myAnalog account. A dialog will prompt you to open an external website where you can log in with your myAnalog credentials. Once authenticated, VS Code will confirm that you can now proceed to install packages. | Flag | Description | | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-v, --verbose` | After a new login, also show the user ID and scopes of the session. If you're already logged in, use `cfsutil myanalog status --verbose` instead. Mutually exclusive with `--quiet`. | | `-q, --quiet` | Suppress non-error output, including warnings. Mutually exclusive with `--verbose`. | | `-f, --format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | Note Aliases: `cfsutil auth login` Example ``` cfsutil myanalog login cfsutil myanalog login --verbose ``` ## Logout `cfsutil myanalog logout [-f json|text]` Log out of the current myAnalog session. With `--format json`, output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). Note Aliases: `cfsutil auth logout` Example ``` cfsutil myanalog logout ``` ## Status `cfsutil myanalog status [-v | -q] [--format text|json]` Show myAnalog authentication status. | Flag | Description | | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-v, --verbose` | Also show the user ID and scopes of the session. Mutually exclusive with `--quiet`. | | `-q, --quiet` | Suppress non-error output, including warnings. Mutually exclusive with `--verbose`. | | `-f, --format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | Note Aliases: `cfsutil auth status` Example ``` cfsutil myanalog status cfsutil myanalog status --verbose ``` # Oclif plugins These plugins extend the `cfsutil` command-line interface. They allow users to add new commands to the CLI by installing plugins from npm or Git URLs. These plugins follow the Oclif plugin framework and are managed independently of CFS. They can be used for a variety of purposes, from verifying environment variables to integrating custom tooling into your CLI workflow. ## List plugins `cfsutil plugins [--json] [--core]` List installed plugins. | Flag | Description | | -------- | --------------------- | | `--core` | Show core plugins | | `--json` | Format output as JSON | Example ``` cfsutil plugins ``` ## Inspect plugin `cfsutil plugins inspect ` Displays installation properties of a plugin. | Flag | Description | | --------------- | --------------------- | | `-h, --help` | Show CLI help | | `--json` | Format output as JSON | | `-v, --verbose` | Show verbose output | Example ``` cfsutil plugins inspect myplugin ``` ## Install plugin `cfsutil plugins install ` Installs a plugin into the CLI from npm or a Git URL. Installation of a user-installed plugin will override a core plugin. If the installed plugin defines a command with the same name as an existing command, the installed plugin version will take priority and override the default. | Flag | Description | | --------------- | -------------------------------- | | `-f, --force` | Run yarn install with force flag | | `-h, --help` | Show CLI help | | `-s, --silent` | Silences yarn output | | `-v, --verbose` | Show verbose yarn output | | `--json` | Format output as JSON | Note Aliases: `cfsutil plugins add` Example ``` cfsutil plugins install myplugin cfsutil plugins install https://github.com/someuser/someplugin ``` ## Link plugin `cfsutil plugins link ` Links a plugin into the CLI for development. Installation of a linked plugin will override a user-installed or core plugin. If the linked plugin defines a command with the same name as a user-installed or core plugin, the linked version will take priority and override the existing implementation. | Flag | Description | | ---------------- | ----------------------------------------- | | `-h, --help` | Show CLI help | | `-v, --verbose` | Show verbose output | | `--[no-]install` | Install dependencies after linking plugin | Example ``` cfsutil plugins link ./myplugin ``` ## Reset plugins `cfsutil plugins reset [--hard] [--reinstall]` Removes user-installed and linked plugins. | Flag | Description | | ------------- | ------------------------------------------ | | `--hard` | Also delete node_modules and related files | | `--reinstall` | Reinstall all plugins after uninstalling | ## Uninstall plugin `cfsutil plugins uninstall ` Removes a plugin from the CLI. | Flag | Description | | --------------- | ------------------- | | `-v, --verbose` | Show verbose output | | `-h, --help` | Show CLI help | Note Aliases: `cfsutil plugins remove`, `cfsutil plugins unlink` Example ``` cfsutil plugins uninstall myplugin ``` ## Update plugins `cfsutil plugins update [-v]` Update installed plugins. | Flag | Description | | --------------- | ------------------- | | `-v, --verbose` | Show verbose output | | `-h, --help` | Show CLI help | # Package Manager The CFS Package Manager allows you to retrieve, install, and manage SDKs, plugins, and toolchains directly from a remote server, enabling access to new features and updates independently of full IDE releases. For additional information see [Install CFS components using the Package Manager](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/index.md). Package remotes can be either managed or custom. - Managed remotes are configured automatically by CodeFusion Studio. - Custom remotes are user-defined remotes that you add manually. Managed remotes cannot be deleted or edited, but you can enable or disable them. Additional managed remotes may be available when logged in with a myAnalog account or using an API key. ## Add remote `cfsutil pkg add-remote [--format text|json]` Registers a new custom package server to retrieve packages from. | Argument | Description | | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `` | The name used to identify the remote, such as `myserver`. This name is required to use other commands such as `auth-remote`, `disable-remote`, and `delete-remote`. | | `` | The URL of the package server. | | Flag | Description | | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-f, --format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | Example ``` cfsutil pkg add-remote myserver https://my.server.url ``` Note CodeFusion Studio configures managed remotes automatically. If you log in with a myAnalog account, `cfsutil` can configure additional remotes for restricted content. To check the configured remotes, run `cfsutil pkg list-remotes`. ## Authenticate remote `cfsutil pkg auth-remote [--format text|json]` Configures authentication for a remote package server. This command defines how `cfsutil` authenticates when accessing the specified remote, using either credentials you specify, or no authentication. This command can only be used with custom remotes. Managed remotes authenticate automatically and cannot be configured with `auth-remote`. | Argument | Description | | --------------- | ------------------------------------------------------------------------------------------ | | `` | The name of the remote to authenticate. This must match a remote added using `add-remote`. | | Flag | Description | | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `--user ` | Authenticate using a username. Prompts for a password if not provided. | | `--password ` | Password, API key, or token for authentication. | | `--none` | Disable authentication for the remote. | | `-f, --format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). When you use `--user` with JSON output, also provide `--password`. | Example ``` cfsutil pkg auth-remote myserver --user USERNAME --password PASSWORD cfsutil pkg auth-remote myserver --none ``` Note Some managed remotes obtain credentials automatically when you are logged in to myAnalog or have set the `CFS_API_KEY` environment variable with a valid API key. Run `cfsutil myanalog status` to check your session and `cfsutil myanalog login` to sign in, then run `cfsutil pkg list-remotes` to check which remotes are using managed credentials. ## Delete `cfsutil pkg delete [--format text|json]` Deletes packages from the local cache. Warning Deleting a package permanently removes it from the local cache. To use a deleted package again, reinstall it using the `cfsutil pkg install` command. | Argument | Description | | ----------- | ----------------------------------------------------------------------------- | | `` | A package pattern in the form `/`. Wildcards (\*) allowed. | | Flag | Description | | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-f, --format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | Delete all unused packages ``` cfsutil pkg delete "*" ``` Note Wrap the pattern in quotes to avoid issues with wildcard expansion. ## Delete remote `cfsutil pkg delete-remote [--format text|json]` Unregisters a custom package server so it is no longer considered for package retrieval. | Argument | Description | | --------------- | -------------------------------------------------------------------------------------------------------------------- | | `` | The name of the remote to delete. The `` should match the name provided using the `add-remote` command. | | Flag | Description | | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-f, --format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | Example ``` cfsutil pkg delete-remote myserver ``` Note Managed remotes cannot be deleted. Use `cfsutil pkg disable-remote ` if you want to prevent a managed remote from being used. ## Enable remote `cfsutil pkg enable-remote [--format text|json]` Enables a previously disabled remote package server. | Argument | Description | | --------------- | --------------------------------- | | `` | The name of the remote to enable. | | Flag | Description | | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-f, --format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | Example ``` cfsutil pkg enable-remote myserver ``` ## Disable remote `cfsutil pkg disable-remote [--format text|json]` Disables a remote package server. | Argument | Description | | --------------- | ---------------------------------- | | `` | The name of the remote to disable. | | Flag | Description | | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-f, --format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | Example ``` cfsutil pkg disable-remote myserver ``` ## View dependencies `cfsutil pkg dependencies [--format text|json]` Retrieves a list of all the dependencies of a given package, including transitive dependencies. The package does not need to be installed. | Argument | Description | | --------------------- | --------------------------------------------------- | | `` | Package reference in the format `pkg_name/version`. | | Flag | Description | | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-f, --format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | Example ``` cfsutil pkg dependencies zephyr/4.3.0 ``` ## Package information `cfsutil pkg info ` Retrieves metadata for a given package. The package does not need to be installed. | Argument | Description | | --------------------- | --------------------------------------------------- | | `` | Package reference in the format `pkg_name/version`. | | Flag | Description | | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-f, --format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | Example ``` cfsutil pkg info zephyr/4.3.0 -f=json ``` ## Install `cfsutil pkg install [] [-l|--local] [-t|--tar ] [--acceptLicense] [--format text|json]` Install a CFS package, including all its dependencies. | Argument | Description | | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `` | Package reference (`pkg_name/version`) or path to a manifest file (for example, `C:\Users\\cfs\2.4.0\my-sample-workspace\.cfs\.cfsdependencies`). Required unless you use `--tar`. | | Flag | Description | | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-l, --local` | Install packages from local cache only | | `-t, --tar ` | Install a package from a local tarball. Can't be combined with ``. | | `--acceptLicense` | Accept package license(s). Required for packages that include a license agreement. If not provided, you will be prompted interactively. Has no effect with `--tar`. | | `-f, --format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). For packages that require license acceptance, also use `--acceptLicense`. | Example ``` cfsutil pkg install zephyr/4.3.0 ``` Install packages from a workspace manifest file ``` cfsutil pkg install /path/to/workspace/.cfs/.cfsdependencies ``` ### Version range syntax The `cfsutil pkg install` command supports semantic versioning (SemVer) range expressions. Version ranges allow you to specify acceptable versions rather than a single fixed version. CFS packages use the semantic version format: `MAJOR.MINOR.PATCH`. Version range syntax limitations The `/` format supports a single version token only. This can be: - An exact version (for example, `2.1.0`) - A caret range (`^2.0.0`) - A tilde range (`~2.0.0`) - A single comparison operator (`>=2.0.0`) Compound constraints (for example, `>=2.0.0 <3.0.0`), logical OR (`||`), and wildcard patterns (`2.1.*`) are only supported when installing packages from a manifest file. #### Caret ranges (`^`) Allows updates that do not change the major version (minor and patch updates are permitted). Package Manager installs the newest available version that satisfies the range. Install plugins with ^2.0.0 - allows 2.0.1 through 2.x.x ``` cfsutil pkg install "cfs_base_plugins/^2.0.0" ``` **Result:** Installs `cfs_base_plugins/2.4.0` (highest available version within major version 2). #### Tilde ranges (`~`) Allows only patch-level updates within the specified minor version. Install latest patch version only ``` cfsutil pkg install "cfs_base_data_models/~2.0.0" ``` **Result:** Installs `cfs_base_data_models/2.0.1` (highest 2.0.x version, does not include 2.1.0 or 2.4.0) #### Comparison operators (`>=`, `<=`, `>`, `<`, `=`) Allows explicit version constraints using comparison operators. Greater than or equal to (>=) ``` cfsutil pkg install "cfs_base_plugins/>=2.0.0" ``` **Result:** Installs `cfs_base_plugins/2.4.0` (highest available version greater than or equal to 2.0.0). Less than (\<) ``` cfsutil pkg install "cfs_base_plugins/<2.1.0" ``` **Result:** Installs `cfs_base_plugins/2.0.1` (highest available version lower than 2.1.0). Greater than (>) ``` cfsutil pkg install "cfs_base_data_models/>2.0.1" ``` **Result:** Installs `cfs_base_data_models/2.4.0` (highest available version greater than 2.0.1). Note Version ranges must be enclosed in quotes to prevent shell interpretation of special characters. Default behavior Package versions follow [semantic versioning](https://semver.org/) in the form `MAJOR.MINOR.PATCH` with optional pre-release identifiers (for example, `-b.1`). When a version range is specified (for example, using caret `^`, tilde `~`, or comparison operators), Package Manager installs the newest available stable version that satisfies the constraint. For example, `cfsutil pkg install "cfs_base_data_models/~2.0.0"` installs the newest available `2.0.x` version. Pre-release versions Pre-release versions follow the semantic versioning pre-release syntax and are not selected by default when resolving version ranges. They must be specified explicitly, so `packageName/1.0.0-b.1` installs exactly that pre-release version. ### Manifest files In addition to installing individual packages, you can install multiple packages using a manifest file. Manifest files also support more advanced version expressions, such as compound constraints, which are not supported in the `/` format. In CodeFusion Studio, you can find an example manifest file (called `.cfsdependencies`) in the workspace `.cfs` directory. For example: `C:\Users\\cfs\2.4.0\my-sample-workspace\.cfs\.cfsdependencies`. The `.cfsdependencies` file is the standard workspace manifest used by CodeFusion Studio. You can also install packages from any manifest file that follows the same JSON format by providing its path to `cfsutil pkg install`. This file specifies the packages and versions required by the workspace. Example manifest file: ``` { "version": 1, "packages": [ { "name": "msdk", "version": "2.4.0" }, { "name": "cfs_base_data_models", "version": "2.4.0" }, { "name": "cfs_base_plugins", "version": "2.4.0" } ] } ``` The `version` field in a manifest file supports semantic version range syntax, including compound constraints. Example: ``` { "version": 1, "packages": [ { "name": "cfs_base_plugins", "version": ">=2.0.0 <3.0.0" } ] } ``` Install the manifest file ``` cfsutil pkg install /path/to/workspace/.cfs/.cfsdependencies ``` **Result:** Installs the newest available version that satisfies the version constraint specified in the manifest file (for example, `cfs_base_plugins/2.4.0`). ### Install from a local tarball Use the `-t` or `--tar` flag to install a package from a tarball on disk. The package contents come from the tarball instead of a package server. Specify either a package reference or `--tar`, not both. On a machine without network access, also use `--local` to skip setting up package remotes. Install a package from a tarball ``` cfsutil pkg install --tar /path/to/plugins.tgz ``` Warning The package in the tarball must match your operating system, unless it's a generic package. If the installation fails, delete the package from the cache with `cfsutil pkg delete ""` before you retry. #### Create a tarball To create a tarball from a package that is already installed, use the `conan cache save` command. Conan is the package manager that CodeFusion Studio uses and it is installed by the CodeFusion Studio installer. 1. Add the folder that contains `conan` to your `PATH`. Replace `` with your CodeFusion Studio installation folder. In Command Prompt: ``` set PATH=\Tools\python\Scripts;%PATH% ``` In PowerShell: ``` $env:PATH = "\Tools\python\Scripts;$env:PATH" ``` ``` export PATH="/Tools/python/bin:$PATH" ``` ``` export PATH="/Tools/python/bin:$PATH" ``` To check that it worked, run `conan --version`. 1. Set the `CONAN_HOME` environment variable to the folder where the package manager stores your installed packages. In Command Prompt: ``` set CONAN_HOME=%LOCALAPPDATA%\com.analog.cfs\Data\packages\conan ``` In PowerShell: ``` $env:CONAN_HOME = "$env:LOCALAPPDATA\com.analog.cfs\Data\packages\conan" ``` ``` export CONAN_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/com.analog.cfs/packages/conan" ``` ``` export CONAN_HOME="$HOME/Library/Preferences/com.analog.cfs/packages/conan" ``` 1. Save the package, including its binary packages, to a file. Replace `cfs_base_plugins/2.4.0` with the package you want to save. Create a tarball ``` conan cache save --no-source --file plugins.tgz "cfs_base_plugins/2.4.0:*" ``` The variables you set in steps 1 and 2 apply only to the current terminal session. Copy the resulting file to the target machine and install it with `cfsutil pkg install --tar`. Note The tarball contains only the package you save, not its dependencies. If the package has dependencies that aren't installed on the target machine, the installation fails. To install such a package, create a tarball for each dependency as well, and install the dependencies first. ### Install from local cache Use the `-l` or `--local` flag to install packages only from the local cache, without accessing remote repositories. Scenario: You have previously installed the following plugin versions, which are now available in the local cache: - `cfs_base_plugins/2.0.0` - `cfs_base_plugins/2.1.0` You want to install a version from the local cache without checking for newer versions remotely. Install a specific cached version ``` cfsutil pkg install cfs_base_plugins/2.0.0 --local ``` This installs exactly version `2.0.0` from the local cache. Install the newest compatible cached version using a range ``` cfsutil pkg install "cfs_base_plugins/^2.0.0" --local ``` This installs the newest cached version that satisfies the range (for example, `2.1.0`), without accessing remote repositories. Install workspace dependencies from a manifest file using local cache only ``` cfsutil pkg install /path/to/workspace/.cfs/.cfsdependencies --local ``` This installs all required workspace packages from the local cache. Note The `--local` flag restricts installation to packages available in the local cache only. If no cached version satisfies the specified version or range, the installation fails. ## List `cfsutil pkg list [] [--format text|json]` List installed packages. | Argument | Description | | ----------- | ----------------------------------------------------------------------------- | | `` | Optional pattern to match package names and versions. Supports wildcards `*`. | | Flag | Description | | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `--filter=KEY=VALUE` | Optional filter on package metadata. If used multiple times, all conditions must be satisfied. | | `--format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | Example ``` # List all installed packages cfsutil pkg list # Search for a package that supports MAX32690 cfsutil pkg list --filter soc=MAX32690 # Search for a package that supports CodeFusion Studio version 2.0.0 and SDK cfsutil pkg list --filter cfsVersion=^2.0 --filter type=sdk ``` Tip The `--filter` option accepts metadata keys shown by the `pkg info` command. ## List cache `cfsutil pkg list-cache [] [--format text|json]` Lists all packages stored in the local cache, including those that are not currently installed. | Argument | Description | | ----------- | ----------------------------------------------------------------------------- | | `` | Optional pattern to match package names and versions. Supports wildcards `*`. | | Flag | Description | | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-f, --format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | Example ``` # List all cached packages cfsutil pkg list-cache # Search cached packages matching a pattern cfsutil pkg list-cache "cfs_base*" # List specific package versions in cache cfsutil pkg list-cache "zephyr/4.*" # Output as JSON cfsutil pkg list-cache --format json ``` ## List remotes `cfsutil pkg list-remotes [--format text|json]` Lists all remote servers that have been registered for package retrieval. | Flag | Description | | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-f, --format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | Example ``` ┌────────────────┬───────────────────────────────────────────────────────┬──────────────────┬────────┬────────────────────┐ │ Name │ URL │ Auth │ Custom │ Status │ ├────────────────┼───────────────────────────────────────────────────────┼──────────────────┼────────┼────────────────────┤ │ cfs-public │ https://conan.cloudsmith.io/adi/codefusion-public │ None │ No │ OK │ ├────────────────┼───────────────────────────────────────────────────────┼──────────────────┼────────┼────────────────────┤ │ my-remote │ https://packages.example.com/ │ username: user1 │ Yes │ OK │ ├────────────────┼───────────────────────────────────────────────────────┼──────────────────┼────────┼────────────────────┤ │ old-remote │ https://old-server.example.com/ │ N/A │ Yes │ Disabled │ └────────────────┴───────────────────────────────────────────────────────┴──────────────────┴────────┴────────────────────┘ ``` ### Output fields | Column | Description | | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Name** | The name of the remote. | | **URL** | The URL of the package server. | | **Auth** | Shows the configured authentication method for the remote. This may be `None`, `myAnalog session`, `username: `, or `N/A` for disabled custom remotes. | | **Custom** | Indicates whether the remote is user-defined (`Yes`) or managed by CodeFusion Studio (`No`). | | **Status** | The remote status. This may be `OK`, `Disabled`, or an error status if remote configuration fails. | ## Local consumers `cfsutil pkg local-consumers [--format text|json]` Retrieves a list of all installed packages that depend on a given package, including transitive consumers. This command is useful when attempting to uninstall a package, as it helps identify which other packages depend on it. | Argument | Description | | -------- | ------------------------------ | | `` | Name of the installed package. | | Flag | Description | | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-f, --format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | Example ``` cfsutil pkg local-consumers zephyr ``` Sample output ``` zephyr is not required by any other package ``` ## Path `cfsutil pkg path [--format json|text]` Retrieves the absolute filesystem path of an installed package. | Argument | Description | | -------- | ------------------------------------- | | `` | Name of the package, without version. | | Flag | Description | | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-f, --format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | Note The package must be installed. If it is not, the command returns an error: `Package is not installed`. Example ``` cfsutil pkg path zephyr ``` ## Search `cfsutil pkg search [--format text|json]` Retrieve packages available for install. | Argument | Description | | ----------- | --------------------------------------------------------------------- | | `` | Search pattern in the format `pkg_name/version`. Use * as a wildcard. | | Flag | Description | | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-f, --format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | Example ``` cfsutil pkg search "zephyr*" ``` Note Wrap the pattern in quotes to avoid issues with wildcard expansion. ## Uninstall `cfsutil pkg uninstall [--format text|json]` Uninstalls a package. It remains in the local cache for reuse without re-downloading. Warning A package cannot be uninstalled if it is required by another installed package. Use the `local-consumers` command to identify dependent packages that must be removed first. | Argument | Description | | -------- | ------------------------------ | | `` | Name of the installed package. | | Flag | Description | | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-f, --format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | Example ``` cfsutil pkg uninstall zephyr ``` # Port The CLI can list active serial ports and, optionally, list detailed information such as Vendor ID about each port. The port information can be used to determine the correct port ID to use with the `--port` switch in the `tasks run` command. ## List ports ``` cfsutil port list [-v | -q] [--format text|json] ``` Lists the active serial ports on the host PC. | Flag | Description | | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-v, --verbose` | Display detailed information about each serial port. Mutually exclusive with `--quiet`. | | `-q, --quiet` | Suppress non-error output, including warnings. Mutually exclusive with `--verbose`. | | `-f, --format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | Example ``` cfsutil port list -v ``` # Project The `project` command manages projects defined in a CFS workspace (`.cfsworkspace` file). It can be used to regenerate projects from the command line. ## Create project ``` cfsutil project create -w -p [-s ] ``` Regenerates a project defined within an existing `.cfsworkspace` file. Important The workspace and its `.cfsworkspace` file must already exist before using this command. This command **regenerates** projects that are already defined in the `Projects` array. It cannot create new projects or add projects to an existing workspace—it only rebuilds existing projects, typically after a plugin upgrade or workspace update. The command **overwrites the project structure** based on the latest plugin templates. **Known limitation:** Workspaces created from templates may have an empty `Projects` array. **Because this command only regenerates existing projects, it will fail if the `Projects` array is empty.** To use `cfsutil project create`, ensure your workspace has a populated `Projects` array by using the [**Manually configure the workspace**](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-new-workspace/#manually-configure-the-workspace) option in the Workspace Creation Wizard or by running `cfsutil workspace configure` followed by `cfsutil workspace create -i`. See [Known issues](https://developer.analog.com/docs/codefusion-studio/latest/release-notes/2.2.0/#cfs-command-line-cfsutil) for details. Refer to the example below. The `-p` flag must match the **Name** value of the project you want to generate. ``` { "Copyright": "(C) Analog Devices, Inc 2026. Generated by CodeFusion Studio CLI", "Timestamp": "2026-04-09T10:58:19.956Z", "Soc": "MAX32690", "Package": "WLP", "Board": "AD-APARD32690-SL", "WorkspaceName": "Apard_ws", // Ensure that the workspace already exists "Location": "C:\\Users\\\\cfs\\2.4.0", "WorkspacePluginId": "", "WorkspacePluginVersion": "", "Projects": [ { "Core": "CM4", "Project": "", "Path": "", "Soc": "MAX32690", "Package": "WLP", "CoreId": "CM4", "Id": "corepart_01jrdgezrce69rsqvja125h3v2", "Name": "Arm Cortex-M4F", // Use as `-p` flag (wrap in quotes if it contains spaces) "FirmwarePlatform": "MSDK", "IsPrimary": true, "IsEnabled": true, "PluginId": "com.analog.project.msdk.plugin", "PluginVersion": "1.2.0", "PlatformConfig": { "ProjectName": "CM4", "MsdkBoardName": "APARD", "Cflags": "-fdump-rtl-expand\n-fdump-rtl-dfinish\n-fdump-ipa-cgraph\n-fstack-usage\n-gdwarf-4\n" } } ], "DataModelVersion": "1.3.913", "DataModelSchemaVersion": "1.5.1" } ``` | Flag | Description | | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-f, --format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | | `-p=` | **Required.** Name of the project to generate. Must match a **Name** field in the JSON. If the name contains spaces or special characters (for example, `ARM Cortex-M4F`), wrap it in quotes. | | `-s=` | (Optional) Additional directory paths to search for plugins and data models. Can be used multiple times. | | `-w=` | **Required.** Path and filename of the `.cfsworkspace` file | Example ``` cfsutil project create -w /path/to/workspace/Apard_ws/.cfs/.cfsworkspace -p "Arm Cortex-M4F" ``` # SoCs Each SoC supported by CodeFusion Studio is associated with an SoC Data Model. This data model is a JSON file that contains information on the package, available memory, config settings and register details, and other essential information required to enable the graphical config tools and code generation functionality. The `socs` command allows you to interact with the SoC data models known to cfsutil. ## Export `cfsutil socs export [-p ] [-f json] [-i ] [-m] [-o ] [-s ...] [--version ]` Outputs the SoC data model in JSON format for the specified SoC. | Switch | Effect | | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `SOCNAME` | Required. The name of the SoC to export, not including package. | | `-f, --format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). Files written with `-o` don't use the envelope. | | `-i ` | The number of spaces for JSON indentation (use `$'\t'` for tabs). Default is 2 spaces. Applies only to output without `-f json` and to files written with `-o`. | | `-m` | Minify the JSON output. Applies only to output without `-f json` and to files written with `-o`. | | `-o ` | Output destination (`stdio` or a file path). Default is `stdio`. | | `-p ` | Package name of the SoC to export. Required if the SoC has more than one package. | | `-s ` | Specifies additional search paths for SoC data models. Refer to DEVELOPMENT.md in the [CodeFusion Studio GitHub repository](https://github.com/analogdevicesinc/codefusion-studio/tree/main/packages/cli) for instructions on generating a `.cfsdatamodels` index file. | | `--version ` | Optional data model version (defaults to latest if not specified). | Deprecated flag The `-n, --name` flag is deprecated. Use the `SOCNAME` positional argument instead, and the `-p, --package` flag if the SoC has more than one package. ## Info `cfsutil socs info [--format text|json] [-b] [-c] [-d] [-p]` Display detailed information about a specific SoC from the catalog. The `` argument is required; all other switches are optional. | Switch | Effect | | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-b, --boards` | Display supported boards for the SoC. | | `-c, --cores` | Display supported cores for the SoC. | | `-d, --docs` | Display documentation links for the SoC. | | `-p, --packages` | Display supported packages for the SoC. | | `-f, --format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | Note Aliases: `cfsutil soc info` Example ``` cfsutil socs info MAX32660 ``` Show supported boards ``` cfsutil socs info MAX32660 --boards ``` Show cores and packages ``` cfsutil socs info MAX32660 --cores --packages ``` Output as JSON ``` cfsutil socs info MAX32660 --docs --format json ``` ## List `cfsutil socs list [-f text|json] [-v | -q] [-l] [-s ...]` Provide a list of available SoC data models. | Switch | Effect | | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `-f, --format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). The shape of `data` depends on the other switches, as described in the following table. | | `-l, --legacy` | Use legacy format for output. | | `-s ` | Specifies additional search paths for SoC data models. Refer to DEVELOPMENT.md in the [CodeFusion Studio GitHub repository](https://github.com/analogdevicesinc/codefusion-studio/tree/main/packages/cli) for instructions on generating a `.cfsdatamodels` index file. | | `-v` | Show additional details for each SoC data model. Mutually exclusive with `-q`. | | `-q` | Suppress non-error output, including warnings. Mutually exclusive with `-v`. | Example ``` cfsutil socs list -s /path/to/codefusion-studio-repo/packages/cfs-data-models/socs/.cfsdatamodels -f json ``` With `-f json`, the contents of `data` depend on the switches you use: | Switches | Contents of `data` | | -------- | ---------------------------------------------------------------------------------------------------------------------- | | None | An object keyed by SoC name. Each value is the list of packages for that SoC. | | `-v` | `{ "socs": [...] }`. Each entry has `Name`, `Package`, `Version`, `Timestamp`, `Description`, `Schema`, and `AICores`. | | `-l` | `{ "socs": [...] }`. Each entry is a `-` name. | | `-l -v` | An object keyed by `-`. Each value has `Name`, `Version`, `Timestamp`, `Description`, and `Schema`. | `data.socs` is present only when you use exactly one of `-v` and `-l`. # Tasks The CLI can list and run tasks from a generated CFS workspace. Task discovery combines the platform tasks generated for each project with any custom tasks defined in `.vscode/cfs.tasks.json`. Important Task commands operate on a generated workspace directory that contains a `.cfs` folder. - For `cfsutil tasks list`, pass the workspace root with `--workspace`, or run the command from a project directory inside that workspace. - For `cfsutil tasks run`, pass the workspace root with `--workspace` and the project directory with `--project`, or run the command from that project directory. - Do not pass the source `.cfsworkspace` file to these commands. When you run tasks that flash and run an application on a board, use `--capture` and `--port` to capture output from a serial port. The output is echoed to the terminal window. By default, the CLI continues to capture output until you press Ctrl+C. Use `--timeout` to stop the capture session automatically after a specified number of seconds, measured from when the task completes successfully. For more information on viewing active serial ports, see [`cfsutil port list`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/port/index.md). The CLI will detect when a Zephyr application emits CTF tracing and will direct all subsequent output to a CTF file. When capture stops, either by Ctrl+C or because `--timeout` elapsed, the CLI automatically generates a TEF ("Trace Event Format") file from this file. ## List tasks ``` cfsutil tasks list [-w ] [-p ] [-v | -q] [--format text|json] ``` Lists the tasks available in a generated workspace. | Flag | Description | | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-w, --workspace=` | Workspace root to inspect. Defaults to the current directory. The directory must either contain `.cfs`, or be a project directory inside a workspace that contains `.cfs`. | | `-p, --project=` | Optional project folder name to filter the output. | | `-v, --verbose` | Also display the command associated with each task. Mutually exclusive with `--quiet`. | | `-q, --quiet` | Suppress non-error output, including warnings. Mutually exclusive with `--verbose`. | | `-f, --format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | Example ``` cfsutil tasks list -w /home//analog/cfs/2.4.0/MyWorkspace cfsutil tasks list -w /home//analog/cfs/2.4.0/MyWorkspace -p m4 -v cd /home//analog/cfs/2.4.0/MyWorkspace/m4 cfsutil tasks list ``` Note The list output is grouped by project and shown in alphabetical order. The displayed task name is a command-line-friendly rendering of the task label. ## Run a task ``` cfsutil tasks run [-w ] [-p ] [-v | -q] [--capture --port [--timeout ]] [-z ] ``` Runs a task from a project inside a generated workspace. | Argument / Flag | Description | | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `` | Task to run. Use the task names listed in `tasks list`. | | `-c, --capture` | Capture serial port output after task execution. By default, capturing continues until the process is terminated, or until `--timeout` elapses if specified. Used with `--port` and `--project`. | | `-f, --format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). Serial capture, `--verbose` output, and failure output go to stderr, so stdout contains only the JSON document. | | `-p, --project=` | Project folder name, relative to the workspace root. Identifies which project's task to run. | | `--timeout=` | Number of seconds after which the CLI stops the capture session automatically, counted from when the task completes successfully (not from when capture starts). Set `0`, or omit the flag, to capture indefinitely until you press Ctrl+C. Requires `--capture`. | | `-v, --verbose` | Show the full output of the task as it runs. Without `--verbose`, task output is hidden, and error output is shown only if the task fails. Mutually exclusive with `--quiet`. | | `-q, --quiet` | Suppress non-error output, including warnings. If the task fails, only the failure message is shown, not error output from the task. Mutually exclusive with `--verbose`. | | `-w, --workspace=` | The workspace path used for task discovery. Defaults to the current directory. | | `-z, --zephyrTraceFile=` | TEF (Trace Event Format) output file path for Zephyr tracing. The CLI captures raw CTF data to an intermediate file and generates the TEF file when capture is stopped. Used with `--capture`. | | `--port=` | Specify the serial port name (e.g., COM3, /dev/ttyUSB0). Used with `--capture`. | Example ``` cfsutil tasks run build -w /home//analog/cfs/2.4.0/MyWorkspace -p m4 cfsutil tasks run flash_run_JLink -w /home//analog/cfs/2.4.0/MyWorkspace -p m4 --capture --port COM4 cfsutil tasks run flash_run_JLink -w /home//analog/cfs/2.4.0/MyWorkspace -p m4 --capture --port COM4 --timeout 30 cd /home//analog/cfs/2.4.0/MyWorkspace/m4 cfsutil tasks run build ``` Note `cfsutil tasks run` only accepts sanitized task names printed by `cfsutil tasks list`. Note When a task fails and the workspace or the task's project declares unmet package dependencies in its `.cfs/.cfsdependencies` manifest, `cfsutil tasks run` adds the unmet packages and a pointer to [`cfsutil validate dependencies`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/validate/#validate-dependencies) to the failure message. Dependency validation never blocks or delays task execution — it only runs after a task fails, and only affects that failure message. ## Define tasks for CLI use Custom CLI tasks must be defined in the project file `.vscode/cfs.tasks.json`. Use the same project directory layout generated by CodeFusion Studio: ``` / .cfs/ / .vscode/ cfs.tasks.json settings.json ``` Minimal example: ``` { "version": "2.0.0", "tasks": [ { "label": "build", "type": "shell", "command": "make -j8", "options": { "cwd": "${workspaceFolder}", "env": { "EXTRA_INCLUDE": "${config:cfs.sdk.path}/SDK/Libraries" } } } ] } ``` ### Run a task before another task with `dependsOn` Add a `dependsOn` property to a task defined in `.vscode/cfs.tasks.json` to run one or more other tasks first. ``` { "version": "2.0.0", "tasks": [ { "label": "clean", "type": "shell", "command": "make clean" }, { "label": "build", "type": "shell", "command": "make -j8", "dependsOn": ["clean"] } ] } ``` In this example, running the dependent task, `build` first runs the dependency task,`clean`. - `dependsOn` accepts a single label or an array of labels. Dependency tasks run in the order listed, before the dependent task that declares them. - You can chain dependencies. If a dependency task also declares its own `dependsOn`, those dependencies run first. - The CLI resolves a dependency label to a discovered task in the same project, and falls back to the first matching task in the workspace. - If a dependency task fails, the CLI stops and doesn't run the dependent task. The CLI reports an error that includes the task exit code. - A circular `dependsOn` chain (for example, task A depends on task B, and task B depends on task A) results in an error rather than an infinite loop. For **Actions** view-specific behavior, see [Custom tasks with dependencies](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/build-and-flash/tasks/#custom-tasks-with-dependencies). ### Authoring guidance - Define custom tasks in `.vscode/cfs.tasks.json` under each project. - Keep task `label` values simple and shell-friendly. The CLI resolves tasks by `label`. - Use `options.cwd` when the command must run from a specific project directory. - Use `options.env` for task-specific environment variables. - Use `cfs.environment` in `.vscode/settings.json` for environment variables that should apply to every task in the project. Variable references such as `${config:...}` are resolved before injection. - Use `linux`, `windows`, and `osx` overrides when the command or options differ by platform. - Keep `.vscode/settings.json` in the same project if your task uses `${config:...}` variables. - Treat `.vscode/settings.json` as the source of truth for CLI task settings. Changes made in the VS Code Settings UI are not written back automatically for CLI use unless the setting is explicitly stored in that file. - If you need a setting key or JSON snippet, use VS Code's `Copy Setting ID` or `Copy Setting as JSON`, then paste the result into the project's `.vscode/settings.json` and set the value manually. ## Settings, environment, and path resolution The CLI resolves task settings from these sources, with later sources overriding earlier ones: 1. Built-in CFS setting defaults packaged inside `cfsutil` 1. User `config.json` settings 1. Workspace `.code-workspace` settings (when running within a workspace file) 1. Project `.vscode/settings.json` (when running tasks within a workspace folder) ### Configuration file location The CLI reads configuration from `config.json`. The installer creates this file automatically at: | Platform | Default Location | | ----------- | ------------------------------------ | | Linux/macOS | `~/.config/cfsutil/config.json` | | Windows | `%LOCALAPPDATA%\cfsutil\config.json` | The default file contains: ``` { "cfs.jlink.path": "" } ``` The installer only creates this file if it doesn't already exist, preserving any modifications you have made. J-Link path required for erase tasks J-Link erase tasks (`erase_JLink`) require the `cfs.jlink.path` setting to be configured. Set `cfs.jlink.path` to your J-Link installation directory (for example, `/opt/SEGGER/JLink_` on Linux, `/Applications/SEGGER/JLink_` on macOS, or `C:\Program Files\SEGGER\JLink_` on Windows). This requirement exists because the erase command invokes `JLinkExe` directly rather than going through `west`, and therefore cannot automatically resolve the J-Link executable path. For detailed installation and configuration instructions, see [Install Segger J-Link debugger drivers](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-drivers/install-jlink-drivers/index.md). You can override the default location using environment variables: - `CFSUTIL_CONFIG_HOME` – overrides the config directory path - `XDG_CONFIG_HOME` – (Linux only) follows XDG base directory spec Custom config location If `CFSUTIL_CONFIG_HOME` is set to `c:/cygwin64/home//config`, the config file will be `c:/cygwin64/home//config/cfsutil/config.json`. To customize CLI behavior, edit `config.json` in a text editor. The file uses JSON format and supports the configuration options shown in the example below. ### Example configuration ``` { "cfsInstallPath": "/home//analog/cfs/2.4.0", "toolSearchPaths": ["/opt/toolchains/arm-gnu-toolchain/bin"], "env": { "ARM_GCC_DIR": "/opt/toolchains/arm-gnu-toolchain/bin", "PATH": "/opt/toolchains/arm-gnu-toolchain/bin" } } ``` Use these fields as follows: - `cfsInstallPath`: Fallback path to the CFS installation directory (must contain `cfs.json`). Used when `CFS_INSTALL_DIR` environment variable and `cfs.sdk.path` are not set. Setting this avoids expensive directory traversal during startup. - `toolSearchPaths`: CLI-wide custom directories used for tool discovery. - `env`: CLI-wide environment variables added to every task execution. For end users, prefer project-local values in `.vscode/settings.json` whenever a setting is required to resolve a task consistently for that project. Use `config.json` for machine-wide overrides that should apply across multiple workspaces. ### Project-level environment variables Use the `cfs.environment` key in `.vscode/settings.json` to define environment variables that apply to every task in that project. This is equivalent to adding `options.env` to each task individually, but maintained in a single place. ``` { "cfs.environment": { "TOOLCHAIN_VER": "RJ-2025.5-linux", "XTENSA_TOOLCHAIN_PATH": "/opt/toolchains/xtensa", "XTENSA_CORE": "${config:cfs.xtensa.core}", "ZEPHYR_BASE": "${command:cfs.tool.path.zephyr}", "WORKSPACE_OUT": "${workspaceFolder}/build" } } ``` Variable references are resolved before the variables are injected into the task process environment. All variable families supported in task commands are also supported here: `${config:...}`, `${env:...}`, `${command:...}`, `${workspaceFolder}`, `${cfs:...}`, and the predefined variables listed in [Supported variables in CLI tasks](#supported-variables-in-cli-tasks). When the same key is defined in both `cfs.environment` and a task's `options.env`, the task-level value wins. ## Supported variables in CLI tasks The CLI resolves these variable families in `cfs.tasks.json`: - `${config:}` from merged CFS settings. - `${env:}` from the current shell environment. - `${command:}` for supported CFS commands such as tool path lookups. - `${workspaceFolder}` from the current project directory used to run the task. - `${workspaceFolderBasename}`, `${userHome}`, `${pathSeparator}`, and `${/}`. - `${cfs:...}` values handled by the shared CFS variable resolver. The CLI does not provide editor-only VS Code variables such as `${file}`, `${relativeFile}`, `${lineNumber}`, or `${selectedText}`. ## PATH handling during task execution Task execution starts from the composed CFS shell environment, which already includes discovered tool paths and SDK-related paths. Then the CLI applies additional environment variables from the task definition and from `config.json`. If either the task or `config.json` defines `PATH`, that value is prepended to the composed `PATH` instead of replacing it. This keeps required CFS toolchain paths available while still letting you add custom tool directories. # Telemetry The `cfsutil telemetry` commands let you manage diagnostic and usage data preferences for the CodeFusion Studio CLI. For background on what telemetry collects and how it works, refer to [Telemetry](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/about/telemetry/index.md). ## First-run consent The first time you run an interactive `cfsutil` command, the CLI asks whether you consent to telemetry. The prompt doesn't appear for telemetry commands or when you request JSON output: ``` CodeFusion Studio CLI collects diagnostic and usage data, including tool version, operating system, command categories, performance metrics, and error codes, to improve usability and performance. A randomly generated usage identifier is stored locally to link your sessions. No source code, file paths, credentials, or personal details are collected. To distinguish ADI-internal from external use, CFS checks locally whether you are signed in to myAnalog with an ADI account or using an ADI-managed computer; only the result is shared. To learn more, view our Privacy Policy at https://www.analog.com/en/who-we-are/legal-and-risk-oversight/data-privacy/privacy-policy.html. You can change this setting at any time by running: cfs telemetry disable Press Y to consent to data sharing, or press N to decline. ``` Tip `cfs` is an alias for `cfsutil`, so `cfs telemetry disable` and `cfsutil telemetry disable` do the same thing. Enter `Y` to share telemetry data or `N` to decline. The entry is not case-sensitive. Any other input is rejected and the prompt asks again. The CLI saves your selection in its [configuration file](#configuration) and doesn't prompt you again. In non-interactive environments (CI pipelines, piped input, or when `DO_NOT_TRACK=1` is set), the prompt is skipped and telemetry is not sent. ## Commands ### Enable telemetry ``` cfsutil telemetry enable ``` Enables telemetry and creates a random usage identifier if one doesn't already exist. ### Disable telemetry ``` cfsutil telemetry disable ``` Disables telemetry. The stored usage identifier is preserved if you enable telemetry later. ### Check telemetry status ``` cfsutil telemetry status ``` Displays the current telemetry preference, whether the session is non-interactive, and the privacy disclosure. When no preference is set, `status` displays that state and guidance to run `cfsutil telemetry enable` or `cfsutil telemetry disable`; it doesn't prompt or change the configuration. The next eligible interactive `cfsutil` command prompts for consent. Run `enable` or `disable` to explicitly set the preference; running `status` doesn't change it. Use `--format json` for machine-readable output, which reports the preference and session state without the disclosure: ``` cfsutil telemetry status --format json ``` Example output: ``` { "telemetryEnabled": true, "telemetrySuppressed": false, "nonInteractiveSession": false } ``` ## Environment variables The following environment variables affect telemetry behavior without changing the stored preference: | Variable | Effect | | -------------------------- | ------------------------------------------------------------------------ | | `CFS_TELEMETRY_DISABLED=1` | Suppresses telemetry for the current invocation or environment. | | `DO_NOT_TRACK=1` | Industry-standard signal that disables telemetry and the consent prompt. | ## Configuration The telemetry preference is stored in the CLI configuration file: - **Linux/macOS**: `~/.config/cfsutil/config.json` - **Windows**: `%LOCALAPPDATA%\cfsutil\config.json` An annotated example of the full configuration file, including the telemetry section, is available at `packages/cli/config/cfsutil/config.jsonc.example` in the repository. To use it, copy it to your config directory as `config.json` and remove the comments (standard JSON does not support comments). The `telemetry` key contains: ``` { "telemetry": { "version": 1, "enabled": true, "userId": "", "userType": "External" } } ``` | Field | Description | | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `version` | Schema version. Always `1` for now. | | `enabled` | `true` or `false`. Set by the consent prompt or by `cfsutil telemetry enable` / `cfsutil telemetry disable`. When absent, the CLI prompts on the next interactive run. | | `userId` | Random identifier (UUID) stored locally to link telemetry sessions. | | `userType` | `External` or `Internal`, based on a local check of your myAnalog account or ADI-managed computer when telemetry is enabled. A first-time `cfsutil telemetry disable` stores `External` as an unshared placeholder without local classification. Only the classification result is shared. | # Validate The validate commands check CFS configuration files against the schema and report any errors or warnings. ## Validate config ``` cfsutil validate config [-w ] [-i ] [-v | -q] [--format text|json] ``` Validates a CFS workspace or a standalone `.cfsconfig` file against the schema. Note `--workspace` and `--input` are mutually exclusive. If neither flag is provided, the current working directory is used as the workspace. | Flag | Description | | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `--format=text\|json` | Output format. `text` (default) prints human-readable results. `json` returns a structured object — see [JSON output](#json-output). | | `-i, --input=` | Path to a standalone `.cfsconfig` file to validate. | | `-v, --verbose` | Display additional detail for each diagnostic, where available: the value found and, for enum-style violations, the list of allowed values. Mutually exclusive with `--quiet`. | | `-q, --quiet` | Suppress non-error output, including warnings. Mutually exclusive with `--verbose`. | | `-w, --workspace=` | Path to the CFS workspace directory. Defaults to the current directory. | ### Pin and peripheral control checks In addition to schema validation, `cfsutil validate config` checks a `.cfsconfig` file against the SoC data model when one is available for the target SoC. Use `-s ` or `--search-path ` to add a data model search path; you can repeat the flag for multiple paths. - **`pin-conflict`:** Reported when two or more incompatible signals are assigned to the same physical pin. - **`control-invalid`:** Reported when a pin contains a persisted control error. - **`control-invalid-value`:** Reported when a persisted value for an unconditional peripheral control doesn't satisfy its type, range, or pattern constraints. Controls with a `Condition`, values with no matching control definition, and peripherals with no controls are skipped. These diagnostics are `critical` severity and fail the command. If the data model can't be resolved for the target SoC, the command emits a warning and falls back to schema-only validation. ### Text output - **Pass:** `'' is valid.` - **Fail:** `Error: Command failed with N errors:` followed by a numbered list of diagnostics. The command exits with a non-zero code. - Warnings and informational diagnostics are printed grouped by file, regardless of overall validity. ### JSON output Pass `--format json` to get machine-readable results. The command returns a structured object and still exits with a non-zero code when any file fails validation. ``` { "valid": true, "results": [ { "path": "", "kind": "cfsconfig", "valid": true, "diagnostics": [] } ] } ``` | Field | Description | | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `valid` | `true` if all validated files passed; `false` if any file has an error-severity diagnostic. | | `results` | Array of per-file results. | | `results[].path` | Absolute path to the validated file. | | `results[].kind` | File type: `cfsconfig` or `cfsworkspace`. Note: `.cfsworkspace` files are accepted but schema checking is not yet implemented — the result is always `valid: true` with an informational diagnostic. | | `results[].valid` | `true` if this file has no error-severity diagnostics. | | `results[].diagnostics` | Array of diagnostic objects for this file. | Validate the workspace in the current directory ``` cfsutil validate config ``` Validate a specific workspace ``` cfsutil validate config --workspace ./my-workspace ``` Validate a standalone .cfsconfig file ``` cfsutil validate config --input ./my.cfsconfig ``` Validate with verbose output ``` cfsutil validate config -w ./my-workspace -v ``` Validate and return JSON output ``` cfsutil validate config --format json ``` ## Validate dependencies ``` cfsutil validate dependencies [-w ] [-i ] [--format text|json] ``` Validates that every package declared in CFS dependency manifests is installed at a compatible version. The public alias `cfsutil validate deps` behaves identically. Note `--workspace` and `--input` are mutually exclusive. If neither flag is provided, the command searches the current directory and its ancestors for the nearest CFS workspace and validates the shared `.cfs/.cfsdependencies` manifest for that workspace, plus the `.cfs/.cfsdependencies` manifest of each project folder directly inside the workspace. Each manifest is validated and reported separately. | Flag | Description | | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `--format=text\|json` | Output format. `text` (default) prints human-readable results. `json` returns an array of structured results, one per manifest — see [Dependency JSON output](#dependency-json-output). | | `-i, --input=` | Path to a standalone `.cfsdependencies` manifest to validate. | | `-w, --workspace=` | Path to the CFS workspace directory. Defaults to the current directory. | ### Dependency text output - **All requirements satisfied:** `All packages declared in '' are installed.` followed by the status of each package. - **Unmet requirements:** `Unmet package dependencies in '':` followed by the status of each package. The command exits with a non-zero code. - Each package line reports its name, requested version, installed version when available, and status: `installed`, `missing`, `version-mismatch`, or `unsupported`. ### Dependency JSON output Pass `--format json` to get machine-readable results. The command returns an array with one result per validated manifest and still exits with a non-zero code when any declared package is unmet. ``` [ { "manifestPath": "", "valid": true, "packages": [ { "name": "example_pkg", "requiredVersion": "^1.0.0", "installedVersion": "1.2.0", "status": "installed" } ] } ] ``` | Field | Description | | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `manifestPath` | Absolute path to the validated manifest. | | `valid` | `true` if every declared package is installed; `false` if any package is missing, mismatched, or unsupported. | | `packages` | Array of per-package results, in manifest declaration order. | | `packages[].name` | Package name. | | `packages[].requiredVersion` | Version or version range declared in the manifest. | | `packages[].installedVersion` | Installed version, present only for `installed` and `version-mismatch` results. Always absent for `missing` and `unsupported` results, even if a same-name package happens to be installed locally. | | `packages[].status` | One of `installed`, `missing`, `version-mismatch`, `unsupported`. | | `packages[].reasonCode` | Machine-readable reason code, present only when `status` is `unsupported`. | Validate the manifests for the current workspace ``` cfsutil validate dependencies ``` Validate a specific workspace ``` cfsutil validate dependencies --workspace ./my-workspace ``` Validate a standalone manifest file ``` cfsutil validate dependencies --input ./workspace/.cfs/.cfsdependencies ``` Validate using the deps alias ``` cfsutil validate deps ``` Validate and return JSON output ``` cfsutil validate dependencies --format json ``` # Workspace The workspace commands allow you to configure and create a CFS workspace from the command line. ## Before you begin Before configuring a workspace, you will need the following information: - The SoC name - Either the board identifier or the SoC package (when you provide only the board, the package is inferred from it) - The core name(s) - The template ID for each core Use the following commands to discover these values: | Command | Purpose | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | | [`cfsutil socs list`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/socs/#list) | List all available SoCs and their packages | | [`cfsutil socs info --boards --packages --cores`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/socs/#info) | Display boards, packages, and cores for a specific SoC | | [`cfsutil cfsplugins list --soc `](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/cfs-plugins/#list) | List available plugins and their template IDs for a specific SoC | ## Configure workspace ``` cfsutil workspace configure --soc --core ... --template-id ... [-w ] [--name ] [-o ] [--board ] [--package ] [--template-version ...] [-s ...] [-v | -q] ``` Generates a workspace configuration file from command-line options. The file can be reviewed and edited before being passed to `cfsutil workspace create -i` to create the workspace. Note `--core` and `--template-id` are paired flags. Each `--core` must be immediately followed by `--template-id`. For multi-core projects, repeat the pair for each core. Note Provide `--board`, `--package`, or both; at least one is required. If you specify only `--board`, the package is inferred from the board. If you specify only `--package`, the generated file contains an empty `Board` value. Note `--name` and `-o` are optional flags but must be provided either here or edited into the generated file before passing it to `workspace create`. Without them, `workspace create` will fail. | Flag | Description | | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-f, --format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | | `-o, --output=` | Sets the `Location` field in the generated configuration file, which determines where the workspace will be created. **Recommended**. | | `-s, --search-path=...` | Additional search path for plugins and data models. Can be used multiple times. | | `-v, --verbose` | Print a template validation message for each core. Mutually exclusive with `--quiet`. | | `-q, --quiet` | Suppress non-error output, including warnings. Mutually exclusive with `--verbose`. | | `-w, --workspace-file=` | Name of the generated workspace configuration file. Default: `cfsworkspace.json`. | | `--board=` | Board name. Required unless `--package` is specified. | | `--core=` | **Required.** Core name. Repeat for each core, each followed by `--template-id`. | | `--name=` | Name for the new workspace. **Recommended**. | | `--package=` | Package name. Required unless `--board` is specified. When only `--board` is given, the package is inferred from the board. | | `--soc=` | **Required.** SoC name. | | `--template-id=` | **Required.** Template ID for the preceding `--core`. Must be specified for each `--core`. | | `--template-version=` | Optional template version for the preceding `--template-id`. Can be specified more than once. | Single-core project ``` cfsutil workspace configure \ --soc MAX32690 \ --board AD-APARD32690-SL \ --core CM4 \ --template-id com.analog.project.msdk.plugin \ --name myWorkspace \ -o /path/to/output ``` Multi-core project ``` cfsutil workspace configure \ --soc ADSP-SC835 \ --board ADSPSC835-EV-SOM \ --core FX --template-id com.analog.project.sharcfx.plugin \ --core CM33 --template-id com.analog.project.sharcfx.plugin \ --name myNewWorkspace \ -o /path/to/output \ -w myWorkspaceConfig.json ``` ### Optional: configure a workspace using local plugins and data models Specify additional directories to search for plugins and data models using `--search-path`. This option can be used with either workspace creation method. Tip Plugin directories must contain valid CFS plugins; data model directories must include a generated data model index file. For information on developing CFS plugins, see the [CFS Plugins repository](https://github.com/analogdevicesinc/cfs-plugins/blob/main/DEVELOPMENT.md). For information on generating a data model index file, see the [CodeFusion Studio GitHub repository](https://github.com/analogdevicesinc/codefusion-studio/blob/main/packages/cli/DEVELOPMENT.md). | Flag | Description | | ----------------------------- | ---------------------------------------------------------------------------------------- | | `-s, --search-path=...` | Additional directories to search for plugins and data models. Can be used multiple times | Example ``` cfsutil workspace configure \ --soc MAX32690 \ --board AD-APARD32690-SL \ --core CM4 \ --template-id com.analog.project.msdk.plugin \ --name myWorkspace \ -o /path/to/output \ -s /path/to/local/plugins \ -s /path/to/local/data-models ``` ## Create workspace ``` cfsutil workspace create [-s ...] [-i ] [-o ] [--name ] [--soc ] [--board ] [--package ] [--template-id ] [--template-version ] ``` Creates a CFS workspace from an existing `.cfsworkspace` file or with command-line parameters. Usage modes The command supports two mutually exclusive modes: - `--input` mode (workspace defined by a `.cfsworkspace` file, with optional `--name` and `--output` overrides) - Flag-driven mode (workspace defined using command-line parameters) The `--search-path` option can be used with either mode. You can create a workspace in one of two ways: - From an existing `.cfsworkspace` file - By specifying workspace parameters directly as flags ### Create a workspace from an existing `.cfsworkspace` file ``` cfsutil workspace create -i [--name ] [-o ] [-s ...] ``` Generates a workspace from an existing `.cfsworkspace` file. Using .cfsworkspace files **Compatibility requirements:** - `.cfsworkspace` files can be generated from the CFS UI or using `cfsutil workspace configure`. - Older `.cfsworkspace` files that reference outdated versions may fail. **Parameter restrictions:** - When using `--input`, workspace definition parameters come from the `.cfsworkspace` file. - The `--name` option may be used alongside `--input` to override the `WorkspaceName` field in the `.cfsworkspace` file, or to fill it in if empty. - The `--output` option may be used alongside `--input` to override the `Location` field in the `.cfsworkspace` file, or to fill it in if empty. - The `--search-path` option may be used alongside `--input` to specify additional plugin or data model directories. See [Configure a workspace using local plugins and data models](#optional-configure-a-workspace-using-local-plugins-and-data-models). - Workspace definition flags such as `--soc`, `--board`, and `--template-id` are not supported with `--input` and will cause errors. **Avoiding conflicts:** - The generated workspace path is: `/`. - If `/` already exists, you can either: - Use `--name` to specify a different workspace name, or - Use `--output` to specify a different location, or - Edit the `WorkspaceName` or `Location` fields in the `.cfsworkspace` file - This prevents the error: `A folder with this name already exists`. | Flag | Description | | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-f, --format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | | `-i, --input=` | Path to an existing `.cfsworkspace` file | | `--name=` | Optional. Override the `WorkspaceName` field in the `.cfsworkspace` file, or fill it in if empty | | `-o, --output=` | Optional. Override the `Location` field in the `.cfsworkspace` file, or fill it in if empty | | `-s, --search-path=...` | Optional. Additional directories to search for plugins and data models. Can be used multiple times | Sample .cfsworkspace file ``` { "Copyright": "(C) Analog Devices, Inc 2026. Generated by CodeFusion Studio CLI", "Timestamp": "2026-04-09T10:38:53.862Z", "Soc": "MAX32690", "Package": "WLP", "Board": "AD-APARD32690-SL", "WorkspaceName": "Apard_ws", "Location": "C:\\Users\\\\cfs\\2.4.0", "WorkspacePluginId": "", "WorkspacePluginVersion": "", "Projects": [ { "Core": "CM4", "Project": "", "Path": "", "Soc": "MAX32690", "Package": "WLP", "CoreId": "CM4", "Id": "corepart_01jrdgezrce69rsqvja125h3v2", "Name": "Arm Cortex-M4F", "FirmwarePlatform": "MSDK", "IsPrimary": true, "IsEnabled": true, "PluginId": "com.analog.project.msdk.plugin", "PluginVersion": "1.2.0", "PlatformConfig": { "ProjectName": "CM4", "MsdkBoardName": "APARD", "Cflags": "-fdump-rtl-expand\n-fdump-rtl-dfinish\n-fdump-ipa-cgraph\n-fstack-usage\n-gdwarf-4\n" } } ], "DataModelVersion": "1.3.913", "DataModelSchemaVersion": "1.5.1" } ``` ### Create a workspace using command-line flags Generates a workspace from command-line parameters. The generated workspace path is determined by combining `--output` and `--name`. | Flag | Description | | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-f, --format` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | | `-o, --output=` | **Required**. Output directory for the new workspace (excluding workspace name). | | `--board=` | **Required**. Board name. | | `--name=` | **Required**. Name of the new workspace. | | `--package=` | Optional. Package name. If not specified, defaults to the board name. | | `--soc=` | **Required**. SoC name. | | `--template-id=` | **Required**. Template ID. | | `--template-version=` | Optional. Template version. If not specified, uses the latest available version. | Example ``` cfsutil workspace create -o "C:/Users//cfs/2.4.0" --name myNewWorkspace --soc MAX32690 --board AD-APARD32690-SL --template-id com.analog.multicore.msdk.helloworld ``` # AI The `cfsutil ai` commands allow you to compile and analyze AI models for Analog Devices embedded targets directly from the command line. Use these commands to build deployable C/C++ code, check model compatibility, profile resource usage, and manage models within a workspace. - [`cfsutil ai backends`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/backends/#backends-command) — List available AI backends and their supported hardware. - [`cfsutil ai build`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/build/index.md) — Compile a model into deployable C/C++ source code using a `.cfsconfig` file or command-line flags. - [`cfsutil ai clean-cache`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/clean-cache/index.md) — Clear the cache of remotely downloaded files. - [`cfsutil ai compat`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/compat/index.md) — Check model compatibility with a target SoC and core. - [`cfsutil ai e2e`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/e2e/index.md) — Run the full workflow from compatibility check to flash and serial capture on hardware. - [`cfsutil ai model`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/model/index.md) — Add, list, update, and remove AI models within a workspace. - [`cfsutil ai profile`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/profile/index.md) — Profile model resource usage before deployment. - [`cfsutil ai workspace`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/workspace/index.md) — Generate a workspace from an AI model file. Windows dependency On Windows, `cfsutil ai` commands require the [Visual C++ Redistributable for Visual Studio 2015](https://aka.ms/vs/16/release/vc_redist.x64.exe) to be installed. Install this redistributable manually before running `cfsutil ai` commands. ## Help Pass `--help` at any level to view available options: ``` cfsutil ai --help cfsutil ai backends --help cfsutil ai build --help cfsutil ai clean-cache --help cfsutil ai compat --help cfsutil ai e2e --help cfsutil ai model --help cfsutil ai profile --help cfsutil ai workspace --help ``` ## Global options The following option is available for all `cfsutil ai` commands. | Flag | Description | | -------- | ------------------------------------------------------------------------ | | `--json` | Format output as JSON. Affects console output only, not generated files. | Example ``` cfsutil ai build --soc MAX32690 --core CM4 --model model.tflite --json ``` ## Data model search path The `ai build`, `ai compat`, and `ai profile` commands rely on a `.cfsdatamodels` index file to look up supported SoCs, cores, and accelerators. A default data model is bundled with the installation, but users can override it by generating their own data model index file. See the [CodeFusion Studio GitHub repository](https://github.com/analogdevicesinc/codefusion-studio/tree/main/packages/cli/development.md) for instructions on generating a data model index file. Use `--search-path` (`-x`) to provide an additional directory containing data model files. This flag can be specified multiple times. Example ``` cfsutil ai build --search-path /path/to/data-models --soc MAX32690 --core CM4 --model model.tflite ``` # Backends The `cfsutil ai backends` commands let you inspect available AI backends. ## Backends command The `cfsutil ai backends list` command lists the AI backends available in your environment, or displays detailed information about a specific backend including its supported hardware and extension fields. ``` cfsutil ai backends list [--format text|json] [-n ] ``` With `--format json`, output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). Sample output ``` tflm: Generation for Tflite-micro run-time izer: ai8x-izer generation for MAX78002 CNN ``` ### List a specific backend Use `--name` (`-n`) to display detailed information about a specific backend, including supported hardware targets and available extension fields. ``` cfsutil ai backends list --name ``` Example ``` cfsutil ai backends list --name tflm cfsutil ai backends list --name izer ``` Output in JSON format ``` cfsutil ai backends list --format json ``` Sample output — izer backend ``` izer: ai8x-izer generation for MAX78002 CNN Model Formats: pytorch Advanced Tool Support: false Supported hardware: SoC: max78002, Core: CM4, Acc: CNN, Firmware: msdk Extension fields: Softmax: Enable softmax layer generation Type: boolean, Default: true. Timer: Inference timer Type: enum, Default: 0. Prefix: Test name prefix Type: string, Default: undefined. AvgPoolRounding: Round average pooling results Type: boolean, Default: true. ClockDivider: CNN Clock divider Type: enum, Default: 1. InputShape: Input shape Type: string, Default: undefined. Fifo: Use FIFO Type: boolean, Default: true. NetworkConfig: Network Configuration File Type: File, Default: undefined. ``` Listing supported targets To see the full list of supported SoCs and cores, use [`cfsutil socs list`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/socs/index.md). # Build The `cfsutil ai build` command compiles an AI model for an embedded target. It generates C or C++ source and headers, depending on the target, that allow the model to be used from within an embedded application. ``` cfsutil ai build [--format text|json] [-v | -q] [--config ] [-s ] [-p ] [-c ] [-a ] [-m ] [--dataset ] [--cwd ] [-o ] [--network-config ] [-b ] [-e ...] [-x ...] [--ignore-cache] ``` ## Before you start You can run `cfsutil ai build` with command-line flags alone — no workspace is required. If you are integrating AI into an existing project, [creating a workspace](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-new-workspace/index.md) with an AI-based template (for example, *Zephyr Single Core TensorFlow AI Model* for MAX32690) generates a `.cfsconfig` file that you can pass to `cfsutil ai build --config` to compile all defined models in one command. C/C++ build compatibility If the build produces C++ source and header files (`.cpp`, `.hpp`), and your project is based on a non-AI template that uses a `main.c` source file, you may see compiler warnings when integrating the generated files. Use an AI-based template (for example, *Zephyr Single Core TensorFlow AI Model*), or replace `main.c` with `main.cpp` or a C++ wrapper. For details on supported processors, see [supported processors and model formats](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/about/supported-ai-model-formats/index.md). ## Build options - Build with a `.cfsconfig` file. The configuration file can define one or more models along with the target SoC, core, and firmware platform. - Build a single model using required flags. Provide the model path with `--model` and the target with `--soc`, and optionally `--core`, `--package`, and `--acc`. For CNN accelerator builds, see [CNN accelerator (Izer backend)](#cnn-accelerator-izer-backend). Note When `--config` is provided, `--model`, `--soc`, and `--core` are ignored. Pass these flags only when building without a `.cfsconfig` file. ### Build with a `.cfsconfig` file Use a `.cfsconfig` file to build one or more models in a single command. The `.cfsconfig` file defines models, target SoC, core, and firmware platform. ``` cfsutil ai build --config ``` Example ``` cfsutil ai build --config .cfs/max78002-csbga.cfsconfig ``` Sample output ``` Created file "m4/src/adi_tflm/hello_world_f32.cpp" Created file "m4/src/adi_tflm/hello_world_f32.hpp" Created model "hello_world_f32" Created file "m4/src/adi_tflm/adi_tflm.hpp" ``` ### Build using flags Supply the model path with `--model` (`-m`) and the target using `--soc` (`-s`), and optionally `--core` (`-c`), `--package` (`-p`), and `--acc` (`-a`). Only one model is compiled per command using this method. | Flag | Short | Description | Example | | ----------- | ----- | ------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------- | | `--acc` | `-a` | Hardware AI accelerator (optional). For CNN builds, see [CNN accelerator (Izer backend)](#cnn-accelerator-izer-backend). | `CNN` | | `--core` | `-c` | Target processor core (optional when only one AI-capable core exists for the SoC — inferred automatically). | `CM4`, `FX`, `CM33` | | `--model` | `-m` | Path or URL to the model file | `model.tflite`, `https://example.com/model.tflite` | | `--package` | `-p` | Package variant of the SoC (optional) | `WLP`, `TQFN` | | `--soc` | `-s` | Target SoC | `MAX78002`, `MAX32690`, `ADSP-SC835` | ``` cfsutil ai build --model --soc ``` Tip If the SoC has exactly one AI-capable core, `--core` is inferred automatically. If the SoC has multiple cores but only one supports AI, it is still inferred — but a warning is shown confirming which core was selected. If multiple AI-capable cores are available, you must specify `--core`. Run [`cfsutil socs info --cores`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/socs/index.md) to see available cores for a given SoC. Example ``` # Single core, single AI core — inferred silently cfsutil ai build --model model.tflite --soc MAX32657 # Multiple cores, one AI core — inferred with a warning cfsutil ai build --model model.tflite --soc MAX32690 # Multiple AI cores — --core required cfsutil ai build --model model.tflite --soc ADSP-SC835 --core FX ``` Tip Run [`cfsutil socs list`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/socs/index.md) to see the complete list of supported SoCs and cores in your environment. The `--model` flag accepts both local file paths and remote URLs. Remote files are cached for offline reuse and refreshed after one hour if the URL is available. Use [`cfsutil ai clean-cache`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/clean-cache/index.md) to clear the cache and force a re-download. Model names must not exceed 64 characters. When building from `--config`, this applies to each enabled model name in the `.cfsconfig` file. When building directly from `--model`, the name is derived from the model file name — if the derived name is too long, rename the model file to a shorter name. Remote URLs Use raw download URLs, not repository page URLs. For example, use `https://raw.githubusercontent.com/org/repo/branch/file.tflite`, not `https://github.com/org/repo/blob/branch/file.tflite`. ### Additional flags | Flag | Short | Description | | ------------------ | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `--backend` | `-b` | Name of the backend to use. Inferred from `--soc`, `--core`, and `--acc` when not specified. Specify explicitly to override the inferred value. | | `--extension` | `-e` | Backend-specific fields as `key=value` pairs. Can be repeated. Requires a backend — either inferred from `--soc`, `--core`, and `--acc`, or specified with `--backend`. | | `--output-path` | `-o` | Output directory for generated files, relative to `--cwd`. | | `--search-path` | `-x` | Additional search path for templates and data models. Can be repeated. | | `--cwd` | | Change the working directory. Used as the base path for relative file paths. | | `--dataset` | | Path or URL to the sample dataset for the model. | | `--ignore-cache` | | Bypass the cache and fetch the latest remote files. | | `--network-config` | | Path or URL to the Izer network configuration YAML. Required when using the `izer` backend. | | `--verbose` | `-v` | Enable verbose mode. Mutually exclusive with `--quiet`. | | `--quiet` | `-q` | Suppress non-error output. Mutually exclusive with `--verbose`. | | `--format` | `-f` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | ### Common options #### Run the build from a different working directory Use `--cwd` to set the base directory for resolving relative model file paths defined inside the `.cfsconfig`. The `--config` path itself must be absolute or relative to your shell's current directory. ``` cfsutil ai build --config /path/to/project/.cfs/max78002-csbga.cfsconfig --cwd /path/to/project ``` #### Write output to a custom folder ``` cfsutil ai build --config .cfs/max78002-csbga.cfsconfig --output-path ./custom_folder ``` ### CNN accelerator (Izer backend) #### Set Izer network config Provide a network configuration YAML file (path or URL) when targeting the MAX78002 CNN accelerator. ``` cfsutil ai build \ --soc MAX78002 --core CM4 --acc CNN \ --model path/to/model.pth.tar \ --network-config path/to/config.yaml ``` Example ``` cfsutil ai build --soc MAX78002 --core CM4 --acc CNN --model https://raw.githubusercontent.com/analogdevicesinc/ai8x-synthesis/develop/trained/ai85-catsdogs-qat8-q.pth.tar --network-config https://raw.githubusercontent.com/analogdevicesinc/ai8x-synthesis/develop/networks/cats-dogs-hwc-no-fifo.yaml ``` Sample output ``` Created file "src/adi_cnn/cnn.h" Created file "src/adi_cnn/weights.h" Created file "src/adi_cnn/sampledata.h" Created file "src/adi_cnn/softmax.c" Created file "src/adi_cnn/cnn.c" Created file "src/adi_cnn/sampleoutput.h" ``` Note For reference on how to train PyTorch models compatible with MAX78002, see the open-source [ai8x-synthesis repository](https://github.com/analogdevicesinc/ai8x-synthesis). #### Provide backend-specific extensions Pass custom flags defined by the backend to modify generation behavior. ``` cfsutil ai build \ --soc MAX78002 --core CM4 --acc CNN \ --model path/to/model.pth.tar \ --network-config path/to/config.yaml \ --backend izer \ -e Softmax=True ``` Example ``` cfsutil ai build --soc MAX78002 --core CM4 --acc CNN --model https://raw.githubusercontent.com/analogdevicesinc/ai8x-synthesis/develop/trained/ai85-catsdogs-qat8-q.pth.tar --network-config https://raw.githubusercontent.com/analogdevicesinc/ai8x-synthesis/develop/networks/cats-dogs-hwc-no-fifo.yaml --backend izer -e Softmax=True ``` Tip Use [`cfsutil ai backends list --name `](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/backends/#list-a-specific-backend) to see available extension fields for a given backend. If using a custom network configuration file, pass the model's input shape using the `--extension` option. ``` cfsutil ai build \ --soc MAX78002 --core CM4 --acc CNN \ --model path/to/model.pth.tar \ --network-config path/to/config.yaml \ --backend izer \ -e InputShape=1,32,32 ``` Tip The `-e` / `--extension` flag can be repeated to pass multiple key-value pairs. For example: `-e InputShape=1,32,32 -e Softmax=True`. Authentication If a build needs to pull a backend's compiler image from ADI, authenticate first with `cfsutil myanalog login`, or set the `CFS_API_KEY` environment variable. See [API key authentication](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/apikey-auth/index.md). ### JSON output Output machine-readable results. Useful for CI pipelines or script parsing. The output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). ``` cfsutil ai build --config .cfs/max32690-tqfn.cfsconfig --format json ``` # Clean cache The `cfsutil ai clean-cache` command clears cached files that `cfsutil ai` has downloaded from remote URLs. `cfsutil ai` automatically caches remote files (such as model files provided by a URL) so they can be reused consistently and when offline. If the remote file is accessible, the cache will refresh automatically after one hour to keep model files up to date. ``` cfsutil ai clean-cache [--format text|json] ``` With `--format json`, output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). Use `cfsutil ai clean-cache` to: - Save local disk space by removing cached files. - Force `cfsutil ai` to re-download a remote model instead of using the cached copy. ``` cfsutil ai clean-cache ``` Output in JSON format ``` cfsutil ai clean-cache --format json ``` # Compat The `cfsutil ai compat` command checks whether a machine learning model can run on a supported processor. It validates operator support, memory constraints, and data type compatibility on the selected target. To resolve issues, you may need to replace unsupported operators, apply memory optimizations, or convert unsupported data types. After applying changes, re-run the command to confirm compatibility. Note This is an early version of the reporting feature, and it may evolve in future releases. Currently, only TFLM models are supported. CNN accelerator models on MAX78002, which use PyTorch (izer backend), are not supported for reporting. Tip The analyzer logic is located in [`analyze_compatibility.py`](https://github.com/analogdevicesinc/codefusion-studio/tree/main/cfs-ai/packages). This script can be adapted or extended to suit your own use cases. ``` cfsutil ai compat [--format text|json] [-s ] [-p ] [-c ] [-a ] [-m ] [-d ] [--report-file ] [-x ...] [--ignore-cache] ``` To run the `cfsutil ai compat` command, you must provide: - The model path with `--model` (or `-m`) - The target SoC with `--soc` (or `-s`) `--core` is optional for SoCs with a single AI-capable core — it is inferred automatically. ``` cfsutil ai compat --soc --model ``` Tip If the SoC has exactly one AI-capable core, `--core` is inferred automatically. If the SoC has multiple cores but only one supports AI, it is still inferred — but a warning is shown confirming which core was selected. If multiple AI-capable cores are available, you must specify `--core`. Run [`cfsutil socs info --cores`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/socs/index.md) to see available cores for a given SoC. Example ``` # --core inferred (MAX32657 has one AI-capable core) cfsutil ai compat --soc MAX32657 --model model.tflite # --core required (ADSP-SC835 has two AI-capable cores) cfsutil ai compat --soc ADSP-SC835 --core FX --model model.tflite ``` ## Flags | Flag | Short | Description | | ---------------- | ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `--acc` | `-a` | Target accelerator. | | `--core` | `-c` | Target core (optional when only one AI-capable core exists for the SoC — inferred automatically). | | `--dataset` | `-d` | Path or URL to the dataset file to use for compatibility analysis. | | `--model` | `-m` | Path or URL to the model file. | | `--package` | `-p` | SoC package. | | `--soc` | `-s` | Target SoC. | | `--search-path` | `-x` | Additional search path for templates and data models. Can be repeated. | | `--ignore-cache` | | Bypass cache and fetch latest remote files. | | `--format` | `-f` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). `ok` reports whether the command ran, not whether the model is compatible. Check `data` for the result. | | `--report-file` | | Path to output JSON report file. | Check compatibility for a specific SoC package variant ``` cfsutil ai compat --soc MAX32690 --core CM4 --package WLP --model model.tflite ``` Output in JSON format ``` cfsutil ai compat --soc MAX32690 --core CM4 --model model.tflite --format json ``` ## Understanding the compatibility report output The Compatibility Analyzer report checks whether your model fits the target hardware by evaluating three categories: - Memory constraint issues — flash/RAM overflows. - Operator compatibility issues — Unsupported operators and suggested alternatives. - Data type compatibility issues — Unsupported data types. Report formats The examples below show the terminal output. Use the `--report-file` flag to generate machine-readable JSON output for programmatic analysis or integration with other tools. ### Memory constraint issues Memory constraint issues occur when the model exceeds the flash or RAM limits defined in the hardware profile. These are reported as `CRITICAL` or `WARNING` in the analyzer output. In CFS, they do not block code generation, but they may appear as errors in the report to indicate that the generated model is unlikely to run correctly on hardware. #### How to read the output Memory issues are reported in the terminal using the following structure: `ISSUE_IDENTIFIER – MEMORY_SCOPE` Where: - **ISSUE_IDENTIFIER** identifies the type of memory constraint. - **MEMORY_SCOPE** indicates whether the issue applies to flash, RAM, or both. #### Memory issue identifiers | Memory issue | Meaning | | ----------------------------------------------- | ------------------------------------ | | `model_storage_memory_overflow – flash_and_ram` | Model exceeds both flash and RAM | | `model_storage_flash_overflow – flash` | Exceeds flash, but fits in RAM | | `model_storage_ram_overflow – ram` | Exceeds RAM, but fits in flash | | `ram_memory_overflow – ram` | Peak runtime RAM usage exceeds limit | Sample output ``` Model incompatible - (1) issues identified: Memory issue: model_storage_memory_overflow - flash_and_ram memory ``` #### How to fix memory constraint issues - Apply quantization. Refer to the [TensorFlow Lite post-training quantization guide](https://tensorflow.org/lite/performance/post_training_quantization) for details. - Use weight pruning. Refer to the [TensorFlow Model Optimization documentation](https://tensorflow.org/model_optimization) for details. - Optimize the model architecture. Redesign the model to use more hardware-efficient layers or data flows (for example, replacing standard convolutions with depthwise separable convolutions). - Reduce model complexity. Refer to the [TensorFlow Model Optimization documentation](https://tensorflow.org/model_optimization) for details. - For runtime-only RAM issues: lower batch size, enable layer fusion, or optimize tensor life. ### Operator compatibility issues Operator compatibility issues indicate that a model layer uses an operator not supported by the target implementation. Code generation should not proceed until the operator has been replaced. #### How to read the operator issues output Operator issues are reported in the terminal using the following structure: `OPERATOR Layer(s) . ALTERNATIVE_IF_AVAILABLE.` Where: - **OPERATOR** is the unsupported operator name. - **Layer(s)** indicates where the operator appears in the model graph. - **ALTERNATIVE_IF_AVAILABLE** is shown if a hardware-compatible replacement exists. #### Operator issue fields | Field | Description | | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Operation | Operator name from the model. For example, `MEAN`, `CONV_2D`, `SOFTMAX`. | | Suggested alternative | Replacement operator, if one exists. For example, `ELU → RELU`, `ADVANCED_CONV → CONV_2D`. If none exists `no hardware-compatible alternative identified` is displayed. | | Layer index | Position of the layer or layers in the model graph. | Sample output ``` Model incompatible - (1) issues identified: Unsupported operator: MEAN Layer(s) 50, 51. no hardware-compatible alternative identified. ``` #### How to fix operator compatibility issues - Replace the unsupported operator. The report may include a suggestion to consider. - If no alternative is provided (for example, the report shows `no hardware-compatible alternative identified`), remove the unsupported operator or redesign the layer and retrain. ### Data type compatibility issues Data type compatibility issues occur when a model layer uses a data type that is not supported by the target. These issues are flagged during analysis. Code generation should not proceed until an appropriate data type is used. #### How to read the data type issues output Data type issues are reported in the terminal using the following structure: `OPERATOR operation uses DATA_TYPE. Layer(s) ` | Field | Description | | ------------- | --------------------------------------------------------------------------------- | | Operator type | Operator name such as `CONV_2D` or `SOFTMAX`, taken directly from the model. | | Data type | Unsupported type such as `FLOAT32`, `FLOAT16`, or `BF16`. | | Layer index | Position of the layer or layers where this operator–data type combination occurs. | Sample output ``` Model incompatible - (1) issues identified: Unsupported type: CONV_2D operation uses FLOAT32. Layer(s) 0. ``` #### How to fix data type compatibility issues Apply quantization to convert the model to a hardware-supported data type (for example, `INT8` or `UINT8`). Refer to the [TensorFlow Lite post-training quantization guide](https://tensorflow.org/lite/performance/post_training_quantization) for details. # End-to-end workflow The `cfsutil ai e2e` command runs the full workflow for deploying and testing an AI model on a target board in a single command: compatibility check, workspace creation, build, flash, and serial capture. ``` cfsutil ai e2e --soc --board --model --debugger --port [-v | -q] [--core ] [--dataset ] [-o ] [--name ] [--skip-compat] [--run-profiler] [-x ...] [--timeout ] [--no-create-reports] ``` ## What happens during the workflow Before running any workflow step, `cfsutil ai e2e` verifies that `--soc` matches a known SoC and that `--port` matches a currently detected serial port. The command fails immediately if either check doesn't pass. When you run `cfsutil ai e2e`, the following steps run in sequence: 1. **Compatibility check** — Runs [`cfsutil ai compat`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/compat/index.md) against the target SoC and core (passing `--dataset` through when provided), unless `--skip-compat` is set. If the model isn't compatible, `cfsutil ai e2e` stops here; rerun with `--skip-compat` to bypass the check. 1. **Profiling (optional)** — Runs [`cfsutil ai profile`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/profile/index.md) and writes a `.cfsreport` file at `/.cfsreport` when `--run-profiler` is set. 1. **Workspace creation** — Runs [`cfsutil ai workspace create`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/workspace/index.md) to generate a workspace with the model integrated and an initial build performed. 1. **Flash and capture** — Looks up the flash-and-run task for the specified `--debugger` in the hardware profiling data of the new workspace. It then runs [`cfsutil tasks run`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/tasks/#run-a-task) with `--capture` and `--port` to flash the built firmware and capture serial output. The command fails if the workspace has no task for the requested debugger. 1. **Report creation** — Runs [`cfsutil convert`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/convert/index.md) on each TEF trace file produced by the capture to create CodeFusion Studio reports. This step is skipped when you set `--no-create-reports` or when the workspace outputs text traces. If the capture produced no TEF traces, the command warns that no reports were created. ## Create a workspace and test on hardware To run the full workflow, you must provide: - The target hardware configuration: SoC with `--soc`, board with `--board`, and (optionally) core with `--core` - The model file path or URL with `--model` (or `-m`) - The debugger to use with `--debugger` (or `-d`): `JLink` or `CMSIS-DAP` - The serial port to capture from with `--port` ``` cfsutil ai e2e \ --soc \ --board \ --model \ --debugger \ --port ``` Example ``` cfsutil ai e2e --soc MAX32690 --board EvKit_V1 --model model.tflite --debugger JLink --port /dev/ttyUSB0 ``` If `--port` doesn't match an available serial port, the command lists the ports it detected. Run [`cfsutil port list`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/port/index.md) to check available ports beforehand. ## Flags | Flag | Short | Description | | ------------------ | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `--board` | | (required) Board name. | | `--core` | `-c` | Target core. Inferred automatically when exactly one core in the SoC supports AI. | | `--create-reports` | | Convert the captured TEF traces into CodeFusion Studio reports. Enabled by default. Use `--no-create-reports` to skip. Supported only by workspaces that output CTF traces. | | `--dataset` | | Path or URL to the sample dataset for the model. | | `--debugger` | `-d` | (required) Debugger to use for flash and run after build: `JLink` or `CMSIS-DAP`. | | `--format` | `-f` | Output format. Only `text` is supported; `--format json` fails with an error. Default is `text`. | | `--model` | `-m` | (required) Path or URL to the model file. | | `--name` | | Name for the new workspace. Defaults to `ws...`. | | `--output` | `-o` | Output path for the new workspace, excluding the workspace name. Default is the current directory. | | `--port` | | (required) Serial port name (for example, `COM3` or `/dev/ttyUSB0`). | | `--quiet` | `-q` | Suppress non-error output, including warnings, from every step of the workflow. Errors are still shown. Mutually exclusive with `--verbose`. | | `--run-profiler` | | Run static profiling analysis and write a `.cfsreport` file. | | `--search-path` | `-x` | Additional search path for templates and data models. Can be used multiple times. | | `--skip-compat` | | Skip the model compatibility check. | | `--soc` | `-s` | (required) SoC name. | | `--timeout` | | Stop the serial capture automatically after the specified number of seconds, measured from when the flash-and-run task completes. Default is 20 seconds. Set it to `0` to capture until you stop it manually. | | `--verbose` | `-v` | Enable verbose mode. Mutually exclusive with `--quiet`. | Tip Run [`cfsutil socs list`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/socs/#list) to list available SoCs. Then run `cfsutil socs info --boards --cores` to list the boards and cores for a target SoC. Warning Skipping the compatibility check with `--skip-compat` may result in build errors or runtime failures if the model is not compatible with the target hardware. # Model management The `cfsutil ai model` commands let you manage AI models within a workspace. Use these commands to add new models, list configured models, update model properties, and remove models from a workspace. ## Add command Adds a model to a workspace. The command adds a new entry to the `AIModels` array in the `.cfsconfig` file. For example, adding a TFLM model targeting `CM4` produces an entry like: ``` { "Name": "hello_world_f32", "Files": { "Model": "path/to/hello_world_f32.tflite" }, "Target": { "Core": "CM4" }, "Backend": { "Name": "tflm", "Extensions": {} }, "Enabled": true } ``` The model name is derived from the file name. Note The name is taken from the model file name (without extension) and must not exceed 64 characters. If the derived name is longer, rename the model file to a shorter name. Identifier collisions `cfsutil ai model add` and `cfsutil ai model update` normalize and compare both `Name` and `Symbol` (when set) for every model. They reject a model when either value collides case-insensitively with either value from another model in the same workspace. Run `cfsutil ai model list --verbose` to review existing values, then select unique `Name` and `Symbol` values. Paths and URLs are stored as provided `cfsutil ai model add` stores the `--model`, `--dataset`, and `--network-config` values in the `.cfsconfig` file as provided, not resolved to absolute paths. `cfsutil ai model update` does the same for `model`, `dataset`, and `networkconfig` values passed through `--set`. Enter relative paths relative to the workspace root, and run both commands from the workspace root because `cfsutil ai build` resolves relative paths from there. ``` cfsutil ai model add --core -m [--format text|json] [-w ] [--config ] [--dataset ] [-a ] [--network-config ] [-e ...] [--ignore-cache] ``` ### Required flags | Flag | Short | Description | | --------------------------- | ----- | --------------------------------------------------------------------------------------- | | `--model` | `-m` | Path or URL to the model file. | | `--config` or `--workspace` | | One must be provided. `--config` takes precedence over `--workspace` if both are given. | | `--core` | | Target core (for example, `CM4`, `CM33`). | Example ``` cfsutil ai model add --config .cfs/max32690.cfsconfig --core CM4 --model path/to/model.tflite ``` Sample output ``` Model added successfully. ``` C/C++ build compatibility For TFLM models, `cfsutil ai build` generates C++ source and header files (`.cpp`, `.hpp`). If your project uses a non-AI template with `main.c`, you may see compiler warnings when integrating the generated files. Replace `main.c` with `main.cpp` or use a C++ wrapper. ### Optional flags | Flag | Short | Description | | ------------------ | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `--acc` | `-a` | Target accelerator (for example, `CNN`). | | `--extension` | `-e` | Backend-specific fields as `key=value` pairs. Can be repeated. For example, for `tflm`: `-e Symbol=my_model -e Section=.data`; for `izer`: `-e Softmax=true -e ClockDivider=4`. Use [`cfsutil ai backends list --name `](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/backends/#list-a-specific-backend) to see available extension fields for a given backend. | | `--dataset` | | Path or URL to a sample dataset for quantization calibration (for example, a folder of representative input images). | | `--ignore-cache` | | Bypass the cache and fetch the latest remote files. | | `--network-config` | | Path or URL to the Izer network configuration YAML. Required for `izer` backends. | | `--format` | `-f` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | Note For reference on how to train PyTorch models compatible with MAX78002, see the open-source [ai8x-synthesis repository](https://github.com/analogdevicesinc/ai8x-synthesis). Add a TFLM model with custom symbol and memory section ``` cfsutil ai model add \ --config .cfs/max32690.cfsconfig \ --core CM4 \ --model path/to/hello_world_f32.tflite \ -e Symbol=hello_world_model \ -e Section=.data ``` Add an izer model for MAX78002 with network config `--acc CNN` selects the izer backend, which activates `--network-config`. Both `--model` and `--network-config` accept local paths or URLs. ``` cfsutil ai model add \ --config .cfs/max78002.cfsconfig \ --core CM4 \ --acc CNN \ --model path/to/model.pth.tar \ --network-config path/to/network.yaml \ -e Softmax=true ``` Warning If `--acc CNN` is omitted, the model is treated as a `tflm` model and `--network-config` is silently ignored. ## List command Lists the AI models configured in a workspace. Use `--core` to filter by a specific core, or `--verbose` to show full model details. ``` cfsutil ai model list [--format text|json] [-v | -q] [-w ] [--config ] [-c ] ``` ### Required flags | Flag | Short | Description | | --------------------------- | ----- | --------------------------------------------------------------------------------------- | | `--config` or `--workspace` | | One must be provided. `--config` takes precedence over `--workspace` if both are given. | ### Optional flags | Flag | Short | Description | | ----------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `--core` | `-c` | Filter models by target core. | | `--format` | `-f` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | | `--verbose` | `-v` | Show file name, backend, and extension details for each model. Mutually exclusive with `--quiet`. | | `--quiet` | `-q` | Suppress non-error output. Mutually exclusive with `--verbose`. | Example ``` cfsutil ai model list --config .cfs/max32690-tqfn.cfsconfig cfsutil ai model list --config .cfs/max32690-tqfn.cfsconfig --core CM4 --verbose ``` Sample output (verbose) ``` CM4: Hello World Float 32 Backend: tflm Files: Model: ./m4/hello_world_f32.tflite Extensions: Symbol: hello_world_model_f32 Section: .data Enabled: true ``` ## Remove command Removes a model from a workspace by name. The command deletes the corresponding entry from the `AIModels` array in the `.cfsconfig` file. ``` cfsutil ai model remove --name [--format text|json] [-w ] [--config ] ``` ### Required flags | Flag | Short | Description | | --------------------------- | ----- | ----------------------------------------------------------------------------------------------------------------- | | `--name` | | Name of the model to remove. Use quotes if the name contains spaces, for example `--name "Hello World Float 32"`. | | `--config` or `--workspace` | | One must be provided. `--config` takes precedence over `--workspace` if both are given. | ### Optional flags | Flag | Short | Description | | ---------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `--format` | `-f` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | Example ``` cfsutil ai model remove --name hello_world_f32 --config .cfs/max32690-tqfn.cfsconfig ``` ## Update command Updates properties of an existing model in a workspace. Use `--set key=value` to specify the fields to change. The `--set` flag can be repeated to update multiple fields in one command. ``` cfsutil ai model update --name --set ... [--format text|json] [-w ] [--config ] [-c ] [--ignore-cache] ``` ### Required flags | Flag | Short | Description | | --------------------------- | ----- | ----------------------------------------------------------------------------------------------------------------- | | `--name` | | Name of the model to update. Use quotes if the name contains spaces, for example `--name "Hello World Float 32"`. | | `--set` | | Field to update as `key=value`. Can be repeated. | | `--config` or `--workspace` | | One must be provided. `--config` takes precedence over `--workspace` if both are given. | ### Optional flags | Flag | Short | Description | | ---------------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `--core` | `-c` | Target core. | | `--ignore-cache` | | Bypass the cache and fetch the latest remote files. | | `--format` | `-f` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | ### Updatable fields #### Core fields | Key | Description | | --------- | -------------------------------------------------------------------------------------------------------------------------------- | | `enabled` | Enable or disable the model (`true` or `false`). | | `model` | Replace the model file path or URL. Stored as provided; see [Paths and URLs are stored as provided](#add-command). | | `name` | Rename the model. Must not exceed 64 characters. See [Identifier collisions](#add-command) for name and Symbol uniqueness rules. | Update core fields ``` cfsutil ai model update --config .cfs/max32690-tqfn.cfsconfig --name hello_world_f32 --set name=hello_world_renamed cfsutil ai model update --config .cfs/max32690-tqfn.cfsconfig --name hello_world_f32 --set model=path/to/new_model.tflite cfsutil ai model update --config .cfs/max32690-tqfn.cfsconfig --name hello_world_f32 --set enabled=false ``` #### tflm extension fields | Key | Description | | ---------------- | -------------------------------------------------------------------------------------------------------- | | `ArenaSection` | Memory section for the arena. | | `ArenaSize` | Arena size for the model. | | `Dataset` | Dataset file path or URL. Stored as provided; see [Paths and URLs are stored as provided](#add-command). | | `DatasetSection` | Memory section for the dataset. | | `Section` | Memory section for model data. | | `Symbol` | Symbol name for model data. | Update tflm extension fields ``` cfsutil ai model update --config .cfs/max32690-tqfn.cfsconfig --name hello_world_f32 --set Symbol=hello_world_model --set Section=.data ``` #### izer extension fields | Key | Description | | ----------------- | ---------------------------------------------------------------------------------------------------------------------- | | `AvgPoolRounding` | Round average pooling results. | | `ClockDivider` | CNN clock divider. | | `Fifo` | Use FIFO. | | `InputShape` | Input shape. | | `Prefix` | Test name prefix. | | `NetworkConfig` | Izer network configuration path or URL. Stored as provided; see [Paths and URLs are stored as provided](#add-command). | | `Softmax` | Enable softmax layer generation. | | `Timer` | Inference timer. | Update izer extension fields ``` cfsutil ai model update --config .cfs/max78002-csbga.cfsconfig --name cats-dogs --set Softmax=true --set ClockDivider=4 ``` Tip Use [`cfsutil ai backends list --name `](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/backends/#list-a-specific-backend) to see all available extension fields for a given backend. # Profile The `cfsutil ai profile` command estimates memory usage, hardware performance, per-layer efficiency, and optimization opportunities for a model on the target device. Unlike `cfsutil ai compat` (which flags unsupported features), it focuses on performance characteristics and optimization opportunities. You can apply the suggested optimizations to improve efficiency and better fit the model to your hardware. Note This is an early version of the reporting feature, and it may evolve in future releases. Currently, only TFLM models are supported. CNN accelerator models on MAX78002, which use PyTorch (izer backend), are not supported for reporting. Tip The `cfsutil ai profile` logic is located in [`profile_resources.py`](https://github.com/analogdevicesinc/codefusion-studio/tree/main/cfs-ai/packages). This script can be adapted or extended to suit your own use cases. ``` cfsutil ai profile [--format text|json] [-s ] [-p ] [-c ] [-a ] [-m ] [--report-file ] [--report-format text|json] [-x ...] [--ignore-cache] ``` To run the `cfsutil ai profile` command, you must provide: - The model path with `--model` (or `-m`) - The target SoC with `--soc` (or `-s`) `--core` is optional for SoCs with a single AI-capable core — it is inferred automatically. ``` cfsutil ai profile --soc --model ``` Tip If the SoC has exactly one AI-capable core, `--core` is inferred automatically. If the SoC has multiple cores but only one supports AI, it is still inferred — but a warning is shown confirming which core was selected. If multiple AI-capable cores are available, you must specify `--core`. Run [`cfsutil socs info --cores`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/socs/index.md) to see available cores for a given SoC. Example ``` # --core inferred (MAX32657 has one AI-capable core) cfsutil ai profile --soc MAX32657 --model model.tflite # --core required (ADSP-SC835 has two AI-capable cores) cfsutil ai profile --soc ADSP-SC835 --core FX --model model.tflite ``` ## Flags | Flag | Short | Description | | ----------------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `--acc` | `-a` | Target accelerator. | | `--core` | `-c` | Target core (optional when only one AI-capable core exists for the SoC — inferred automatically). | | `--model` | `-m` | Path or URL to the model file. | | `--package` | `-p` | SoC package. | | `--soc` | `-s` | Target SoC. | | `--search-path` | `-x` | Additional search path for templates and data models. Can be repeated. | | `--ignore-cache` | | Bypass cache and fetch latest remote files. | | `--format` | `-f` | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | | `--report-file` | | Path to output report file. | | `--report-format` | | Report output format: `json` (default) or `text`. | Check for a specific SoC package variant ``` cfsutil ai profile --soc MAX32690 --core CM4 --package WLP --model model.tflite ``` Output in JSON format ``` cfsutil ai profile --soc MAX32690 --core CM4 --model model.tflite --format json ``` ## Report output The Resource Profiling report provides resource and performance estimates for your model on the target hardware. The report progressively drills down from high-level summaries to detailed layer-by-layer analysis across five key categories: - **Model summary** — Basic details about the model file and its size. - **Memory analysis** — Peak RAM usage, utilization, and whether it fits in the target hardware (includes optional memory issues and recommendations when problems are detected). - **Hardware performance** — Overall compute cycles, latency, and acceleration metrics. - **Per-layer performance** — Detailed cycles, energy, and memory usage for each layer, highlighting bottlenecks. - **Optimization opportunities** — Suggested strategies such as quantization, pruning, and layer-level alternatives for large or compute-heavy layers. Report formats The examples below show the terminal output. Use `--report-format json` with `--report-file` to generate machine-readable JSON output for programmatic analysis or integration with other tools. ### Model summary The model summary provides a high-level overview of the analyzed model before detailed profiling. | Field | Description | | ----------- | ----------------------------------------------------------------- | | Model name | Filename of the model under test. | | Model path | Path to the model file on disk. | | Framework | ML framework type. Currently only `TensorFlow Lite` is supported. | | Model size | Memory required to store the model. | | Data type | Numerical precision defined in the model file. | | Layer count | Total number of layers parsed from the model. | Sample output ``` == MODEL SUMMARY === | Metric | Value | | -------------------- | ---------------------------------------- | | Model Name | resnet.tflite | | Model Path | /Users/.../resnet.tflite | | Framework | TensorFlow Lite | | Model Size | 5787.48 KB | | Data Type | float32 | | Layer Count | 54 | ``` ### Memory analysis Memory analysis shows how much RAM the model requires at runtime and compares it to the available RAM defined in the target hardware profile. | Field | Description | | ----------------- | ------------------------------------------------------------------------------------------------------- | | Peak RAM Required | Maximum RAM usage observed during model execution. | | RAM Status | Indicates whether RAM usage fits the target hardware constraints. | | Available RAM | Total RAM available on the target hardware, from the hardware profile. | | RAM Utilization | Percentage of available RAM consumed by peak usage. Formula: (Peak RAM Required ÷ Available RAM) × 100. | In the example below, the model requires 576 KB of RAM at runtime, which fits comfortably within the target hardware's 1 MB RAM. This corresponds to 56.2% utilization, so the RAM status is marked as OK. Sample output ``` === MEMORY ANALYSIS === | Memory Metric | Value | | ------------------------- | ----------------------------------- | | Peak RAM Required | 576.00 KB (0.56 MB) | | RAM Status | OK | | Available RAM | 1024.00 KB (1.00 MB) | | RAM Utilization | 56.2% | ``` #### Memory issues Lists the critical problems identified. This section appears only if the profiler detects over-usage or excessive utilization. For example, model peak RAM exceeds target RAM. Sample output ``` Memory Issues: • Peak RAM usage (5880.0 KB) exceeds available RAM (1024.0 KB) ``` #### Memory recommendations Provides recommendations tailored to the model and target hardware. The set of recommendations varies depending on the severity level, model architecture, computational complexity and memory usage patterns. Sample output ``` Memory Recommendations: • URGENT: Model requires 4856 KB (474%) more RAM than available • Evaluate quantization potential with representative dataset ``` ### Hardware performance This section estimates how the model performs on the target hardware. Metrics are aggregated from per-layer analysis and the hardware profile. | Field | Description | | ------------------ | ------------------------------------------------------------------------------------------- | | Total cycles | Total number of compute cycles required for full model execution. | | Estimated latency | End-to-end inference time in milliseconds, derived from cycles and max CPU clock frequency. | | Peak memory | Maximum RAM required during inference. | | Accelerated layers | Number of layers executed using hardware accelerators (such as DSP, NPU). | | CPU-only layers | Number of layers that must run on the CPU because no hardware acceleration is available. | For example, in the sample output below, the model runs in about 1.8 seconds (1802.62 ms), requires 576 KB of RAM at peak, and executes 37 layers on accelerators with 17 layers falling back to the CPU. Sample output ``` === HARDWARE PERFORMANCE === | Metric | Value | | -------------------- | ------------------------------------| | Total Cycles | 180,261,962 | | Estimated Latency | 1802.62 ms | | Peak Memory | 576.00 KB | | Accelerated Layers | 37 | | CPU-Only Layers | 17 | ``` ### Per-layer performance This section provides a detailed breakdown of compute and memory requirements for each model layer. It helps identify which specific layers are the performance bottlenecks. | Field | Description | | -------- | -------------------------------------------------------------------------------------------------- | | Layer | Index of the layer in the model (e.g. `0`, `1`, `2`). Matches the parser output. | | Operator | Operator type used in this layer (e.g. `CONV_2D`, `ADD`, `SOFTMAX`). | | Cycles | Total compute cycles required to execute the layer. | | Latency | Estimated runtime of the layer in milliseconds. | | Energy | Estimated energy consumption of the layer in microjoules (µJ). | | Power | Average power draw while executing the layer in milliwatts (mW). Currently disabled and shows `-`. | | MACs | Number of multiply-accumulate operations performed by the layer. | | Memory | Memory footprint of the layer in KB (if available). | | Accel | Whether the layer is executed on hardware acceleration (`Yes`) or CPU only (`No`). | For example, in the sample output below, layers 2 and 5 (`CONV_2D`) have significantly higher cycles and latency than the other layers, making them the primary performance bottlenecks. Sample output ``` === PER-LAYER PERFORMANCE === | Layer | Operator | Cycles | Latency (ms) | Energy (uJ) | Power (mW) | MACs | Memory (KB) | Accel | | -------- | --------------- | ---------- | ------------ | ----------- | ----------- | ---------- | ------------ | ------ | | 0 | CONV_2D | 442,368 | 4.4237 | 110.59 | - | 442,368 | 1.75 | Yes | | (CONV_2… | | | | | | | | | | 1 | CONV_2D | 7,077,888 | 70.7789 | 1769.47 | - | 7,077,888 | 27.19 | Yes | | (CONV_2… | | | | | | | | | | 2 | CONV_2D | 21,233,664 | 212.3366 | 5308.42 | - | 21,233,664 | 81.19 | Yes | | (CONV_2… | | | | | | | | | | 3 | CONV_2D | 786,432 | 7.8643 | 196.61 | - | 786,432 | 3.19 | Yes | | (CONV_2… | | | | | | | | | | 4 (ADD) | ADD | 49,152 | 0.4915 | 12.29 | - | 49,152 | - | No | | 5 | CONV_2D | 21,233,664 | 212.3366 | 5308.42 | - | 21,233,664 | 81.19 | Yes | | (CONV_2… | | | | | | | | | ``` ### Optimization opportunities The Optimization Opportunities section provides baseline metrics about your model's resource requirements. These summary values help you understand the overall optimization potential before diving into layer-specific recommendations. | Field | Description | | ---------------------- | ----------------------------------------------------------------------------------------------------- | | Total parameter memory | Size of all model parameters (weights) in KB, as parsed from the model. | | Total MACs | Multiply–accumulate operations required to run the model. Higher values indicate more compute demand. | These baseline metrics serve as reference points for measuring optimization impact. The actual optimization suggestions appear in the layerwise sections that follow. Sample output ``` === OPTIMIZATION OPPORTUNITIES === | Metric | Value | | ---------------------- | ----------- | | Total Parameter Memory | 5787.48 KB | | Total MACs | 180,261,962 | ``` #### Layerwise memory optimization opportunities This section highlights individual layers with high parameter memory (weights), which are the most likely to benefit from targeted optimizations. | Field | Description | | ---------------- | -------------------------------------------------------------------------------------------------- | | Layer index | Index of the layer in the model (e.g. `34`). | | Operation type | Operator type, usually `CONV_2D`, comes from the model. | | Parameter memory | Estimated parameter memory footprint of the layer (in KB), if applicable. | | MACs | Number of multiply–accumulate operations for this layer. | | Kernel info | Kernel tensor shape information for the layer (e.g. `[128, 3, 3, 128]`), if available. | | Suggestion | Context-aware optimization hint (such as depthwise separable convolution, low-rank factorization). | The report lists only layers that exceed certain thresholds, such as large `CONV_2D` layers with floating-point weights. For these layers, suggestions are generated dynamically. For example, a convolution layer with 576 KB of parameters might receive a recommendation to use depthwise separable convolution or low-rank factorization to reduce memory usage on constrained hardware. Sample output ``` | | | Param Mem | | | | | Layer | Op Type | (KB) | MACs | Kernel Info | Suggestion | | -------- | --------------- | ------------- | ---------- | ------------ | ---------------------| | 34 | CONV_2D | 576.50 | 147,456 | [[128, 3, 3, | Consider depthwise | | | | | | 128], [128]] | separable | | | | | | | convolution or | | | | | | | low-rank | | | | | | | factorization | | 37 | CONV_2D | 576.50 | 147,456 | [[128, 3, 3, | Consider depthwise | | | | | | 128], [128]] | separable | | | | | | | convolution or | | | | | | | low-rank | | | | | | | factorization | ``` #### Layerwise MAC optimization opportunities This section highlights layers with very high multiply–accumulate operations (MACs), which often dominate the overall compute cost. The report lists only layers that exceed certain thresholds and provides targeted suggestions for reducing total cycles, latency, and energy usage. For example, large `CONV_2D` layers may be flagged with a recommendation to use depthwise convolution as a more efficient alternative. Sample output ``` | | | Param Mem | | | | | Layer | Op Type | (KB) | MACs | Kernel Info | Suggestion | | -------- | --------------- | ------------- | ---------- | ------------ | -------------------- | | 2 | CONV_2D | 81.19 | 21,233,664 | [[48, 3, 3, | Replace with | | | | | | 48], [48]] | depthwise | | | | | | | convolution to | | | | | | | reduce MACs | | 5 | CONV_2D | 81.19 | 21,233,664 | [[48, 3, 3, | Replace with | | | | | | 48], [48]] | depthwise | | | | | | | convolution to | | | | | | | reduce MACs | ``` ## Next steps Apply the recommended optimizations (such as quantization, pruning, or layer restructuring), then re-run `cfsutil ai profile` to verify improved efficiency and hardware compatibility. # Workspace The `cfsutil ai workspace create` command generates a CodeFusion Studio workspace based on an AI model file. It creates a complete project structure with the specified SoC, board, and core configuration, automatically integrates the model, and performs an initial build. ``` cfsutil ai workspace create -o --name --soc --board --core --model [--search-path ...] [--dataset ] [--skip-compat] [--set ...] ``` ## Create a workspace from a model To create a workspace, you must provide: - The output directory path with `--output` (or `-o`) — workspace will be created inside this directory - The workspace name with `--name` - The target hardware configuration: - SoC with `--soc` - Board with `--board` - Core with `--core` - The model file path or URL with `--model` (or `-m`) ``` cfsutil ai workspace create \ --output \ --name \ --soc \ --board \ --core \ --model ``` Example ``` cfsutil ai workspace create \ -o c:/tmp \ --name myNewWorkspace \ --soc MAX32690 \ --board EvKit_V1 \ --core CM4 \ --model c:/models/model.tflite ``` ## What happens during workspace creation When you run `cfsutil ai workspace create`, the following actions occur automatically: 1. **Compatibility check** — The command runs [`cfsutil ai compat`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/compat/index.md) to verify the model is compatible with the target hardware. 1. **Workspace generation** — Creates a new workspace at the specified location using the appropriate template for the target SoC and board. 1. **Model integration** — Adds the model to the workspace configuration using [`cfsutil ai model update`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/model/#update-command). 1. **Initial build** — Compiles the model into C/C++ source code using [`cfsutil ai build`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/build/index.md). The resulting workspace is ready to open in the CodeFusion Studio IDE or build from the command line. ## Flags | Flag | Short | Description | | --------------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `--board` | `-b` | (required) Board name. | | `--core` | `-c` | (required) Target core. | | `--dataset` | `-d` | Path or URL to the sample dataset for the model. | | `--format` | | Output format: `text` (default) or `json`. JSON output uses the [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). | | `--model` | `-m` | (required) Path or URL to the model file. | | `--name` | `-n` | (required) Name for the new workspace. | | `--output` | `-o` | (required) Output path for the new workspace (excluding workspace name). | | `--set` | | Model field to set in the new workspace, as `key=value`. Can be used multiple times. See [Set model fields](#set-model-fields). | | `--search-path` | `-x` | Additional search path for plugins and data models. Can be used multiple times. | | `--skip-compat` | | Skip the model compatibility check. | | `--soc` | `-s` | (required) SoC name. | Tip Run [`cfsutil socs list`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/socs/index.md) to see the complete list of supported SoCs, boards, and cores in your environment. ## Skip compatibility check By default, the command runs a compatibility check before generating the workspace. To skip this step and create the workspace without validation, use the `--skip-compat` flag. ``` cfsutil ai workspace create \ -o c:/tmp \ --name myNewWorkspace \ --soc MAX32690 \ --board EvKit_V1 \ --core CM4 \ --model c:/models/model.tflite \ --skip-compat ``` Warning Skipping the compatibility check may result in build errors or runtime failures if the model is not compatible with the target hardware. Use this option only when you are certain the model will work on the target. ## Using a sample dataset Provide a sample dataset file (path or URL) to include test data with your model. The dataset is used during the build process and can be helpful for validating model inference. ``` cfsutil ai workspace create \ -o c:/tmp \ --name myNewWorkspace \ --soc MAX32690 \ --board EvKit_V1 \ --core CM4 \ --model c:/models/model.tflite \ --dataset c:/datasets/sample_data.bin ``` Tip Example dataset files (`.bin`) are located in the `cfs-ai/examples/` directory of the [CodeFusion Studio repository](https://github.com/analogdevicesinc/codefusion-studio). ## Set model fields Use `--set key=value` to set model fields in the new workspace, such as turning a model off or changing backend configuration values. Repeat the flag to set multiple fields. ``` cfsutil ai workspace create \ -o c:/tmp \ --name myNewWorkspace \ --soc MAX32690 \ --board EvKit_V1 \ --core CM4 \ --model c:/models/model.tflite \ --set enabled=false ``` For a MAX32690 workspace that uses the `tflm` backend, you can set the `Section`, `ArenaSize`, `ArenaSection`, and `DatasetSection` fields: ``` cfsutil ai workspace create \ -o c:/tmp \ --name myNewWorkspace \ --soc MAX32690 \ --board EvKit_V1 \ --core CM4 \ --model c:/models/model.tflite \ --set Section=.data \ --set ArenaSize=4096 \ --set ArenaSection=.bss \ --set DatasetSection=.data ``` Note The `name`, `symbol`, `model`, and `dataset` keys aren't supported with `--set` during workspace creation. Use the `--model` and `--dataset` flags to set the model file and sample dataset. Use [`cfsutil ai model update`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/model/#update-command) after the workspace is created to rename the model or change its symbol. ## Custom search paths Use the `--search-path` (or `-x`) flag to specify additional directories containing plugins or data models. This flag can be specified multiple times. ``` cfsutil ai workspace create \ -o c:/tmp \ --name myNewWorkspace \ --soc MAX32690 \ --board EvKit_V1 \ --core CM4 \ --model c:/models/model.tflite \ --search-path /path/to/custom/plugins \ --search-path /path/to/custom/data-models ``` Tip Plugin directories must contain valid CFS plugins; data model directories must include a generated data model index file. For information on developing CFS plugins, see the [CFS Plugins repository](https://github.com/analogdevicesinc/cfs-plugins/blob/main/DEVELOPMENT.md). For information on generating a data model index file, see the [CodeFusion Studio GitHub repository](https://github.com/analogdevicesinc/codefusion-studio/blob/main/packages/cli/DEVELOPMENT.md). ## Remote model files The `--model` and `--dataset` flags accept both local file paths and remote URLs. Remote files are cached for offline reuse and refreshed after one hour if the URL is available. Use [`cfsutil ai clean-cache`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/clean-cache/index.md) to clear the cache and force a re-download. Remote URLs Use raw download URLs, not repository page URLs. For example, use `https://raw.githubusercontent.com/org/repo/branch/file.tflite`, not `https://github.com/org/repo/blob/branch/file.tflite`. Paths and URLs are stored as provided The `--model` and `--dataset` values are stored in the `.cfsconfig` file as provided, not resolved to absolute paths. The command performs an initial build from the new workspace root, so use an absolute path or URL. Relative paths are first validated from the directory where you run the command and then resolved from the new workspace root. Using remote models from the CFS repository ``` cfsutil ai workspace create \ -o c:/tmp \ --name myNewWorkspace \ --soc MAX32690 \ --board EvKit_V1 \ --core CM4 \ --model https://raw.githubusercontent.com/analogdevicesinc/codefusion-studio/main/cfs-ai/examples/hello_world_f32.tflite \ --dataset https://raw.githubusercontent.com/analogdevicesinc/codefusion-studio/main/cfs-ai/examples/hello_world_f32.bin ``` # Debugging This section provides information on debugging in CodeFusion Studio. Before debugging applications on hardware, install the drivers relevant to your setup: - [Install debug drivers](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-drivers/index.md) - Driver installation for Olimex, J-Link, and ICE debuggers After installing drivers, connect your hardware: - [Connect hardware](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/connect-hardware/index.md) - Physical connections for debugger and serial/UART communication Then refer to the following guides for debugging and troubleshooting information: - [Debug an application](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-an-application/index.md) - [Debug interface](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-interface/index.md) - [Debug a multicore MSDK application](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-multi-core-application/index.md) - [Debug a SHARC-FX application](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-sharc-fx/index.md) - [Debug with SEGGER Ozone](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-with-ozone/index.md) - [Troubleshooting](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/troubleshooting/index.md) - [Debug tools](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/index.md) # Connect hardware This guide shows how to physically connect debuggers and serial cables to Analog Devices development boards. Find your board below for specific connection instructions. ## Before you start Install the appropriate drivers for your debug probe: - [Install Segger J-Link drivers](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-drivers/install-jlink-drivers/index.md) (for J-Link debuggers) - [Install ICE drivers](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-drivers/install-ice-drivers/index.md) (for SHARC-FX ICE debuggers) - [Install Olimex drivers](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-drivers/install-olimex-drivers/index.md) (for Olimex JTAG probes) Use a data-capable USB cable — some cables are charge-only and won't let your computer recognize the debugger or board, which can cause flashing to fail. ## Board examples Select your board below for specific connection instructions: ### MAX32690 (MAX32690EVKIT) **Debug connection:** - Connect to **J3** (10-pin SWD header) - Debugger options: - Segger J-Link with 10-pin SWD ribbon cable - MAX32625PICO debugger with 10-pin SWD ribbon cable **UART connection:** - Connect USB cable to **CN2** (USB mini connector) - Provides serial console output and profiling data **Setup:** The numbered labels in the diagram below correspond to the physical connections on the board (steps 1-3). Complete all connections before powering on. 1. Connect external debugger to **J3** (SWD header) using a 10-pin ribbon cable 1. Connect USB-A to Mini-USB cable to **CN2** (UART) 1. Connect debugger to your computer using USB and flip the power switch on the board to ON (board is powered through the CN2 USB connection) 1. Identify the serial port (see [Identify your serial port](#identify-your-serial-port)) ### MAX78002 (MAX78002EVKIT) Dual-core board The MAX78002 has two processor cores: Arm Cortex-M4 and RISC-V. If you're debugging or developing for both cores, connect both debuggers. If you're only using one core, you only need to connect the debugger for that core. **Debug connections:** - **JH8 (SWD header):** Arm Cortex-M4 core - Use MAX32625PICO debugger or Segger J-Link - 10-pin SWD ribbon cable - **JH5 (RV JTAG header):** RISC-V core - Use Olimex ARM-USB-OCD-H adapter with ARM-JTAG-20-10 converter - Pre-configured for RISC-V debugging - Only needed if debugging or profiling on the RISC-V core **UART connection:** - Connect USB cable to **CN2** (USB connector) - Captures serial output from both cores **Power:** - Connect 5V power supply to **J1** (power input connector) - External 5V power required - board is not USB-powered **Setup:** The numbered labels in the diagram below correspond to the physical connections on the board (steps 1-4). Complete all connections before powering on. 1. Connect 5V power supply cable to **J1** 1. Connect USB cable to **CN2** (UART) 1. Connect Arm debugger (MAX32625PICO or J-Link) to **JH8** (SWD header) 1. *For dual-core debugging:* Additionally connect RISC-V debugger (Olimex ARM-USB-OCD-H) to **JH5** (RV JTAG) 1. Connect debugger(s) to your computer using USB 1. Turn on the 5V power supply and flip the power switch on the board to ON 1. Identify the serial port (see [Identify your serial port](#identify-your-serial-port)) ### MAX32657 (MAX32657EVKIT) **Debug connection:** - **On-board J-Link debugger** via USB-C connection to **J1** (default) - External debugger options: - Segger J-Link with 10-pin SWD ribbon cable - MAX32625PICO debugger with 10-pin SWD ribbon cable **UART connection:** - Connect USB-C cable to **J1** (USB-C connector) - Provides serial console output, profiling data, and board power **Setup:** 1. Connect USB-C cable to **J1** and your computer 1. Identify the serial port (see [Identify your serial port](#identify-your-serial-port)) Advanced: External debugger For advanced debugging scenarios, you can connect an external J-Link to **J3** (10-pin SWD header). If you experience conflicts with multiple debuggers, you can disable the on-board J-Link by removing the shunt on **JP6**. For details, see [Troubleshooting](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/troubleshooting/#max32657-and-max32658-configure-for-an-external-j-link). ### SHARC-FX (ADSP-SC835W with ICE Debugger) **ICE emulator connection:** - Required: ICE-1000, ICE-1500, or ICE-2000 emulator - Connect ICE emulator to **P6** (JTAG header) using the ICE ribbon cable - Connect ICE emulator to computer using USB **Power and data connection:** - Connect USB-C cable to **P1** (power and data) - Provides board power and communication with the host computer **Boot mode:** Set the **Boot Mode Select** rotary switch (**S1**) to **1**. This is the default position, and it's the position shown in the SHARC-FX connection diagram. Use boot mode 1 to debug, flash, and erase from CFS. Boot mode 1 and boot mode 0 Boot mode 1 is serial peripheral interface (SPI) controller boot. After a reset, the processor loads and runs the application stored in the on-board SPI flash. CFS flashes your application as an SPI boot image, so the application runs each time the board resets or powers on. Boot mode 0 is No boot. After a reset, the processor doesn't load an application. Code runs only when the debugger loads it. The CFS SHARC-FX templates don't use the other S1 positions. For all boot modes, see the [ADSPSC835W-EV-SOM schematic](https://www.analog.com/media/en/technical-documentation/eval-board-schematic/adspsc835w-ev-som-schem.pdf). **Setup:** The numbered labels in the diagram below correspond to the physical connections (steps 1-3). 1. Connect USB-C cable to **P1** (power and data) 1. Connect ICE emulator to computer using USB 1. Connect ICE ribbon cable to **P6** (JTAG header on board) Note SHARC-FX debugging requires additional configuration including ICE model selection and toolchain setup. For complete instructions, see [Debug a SHARC-FX application](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-sharc-fx/index.md). ## Identify your serial port After connecting the UART cable, identify which serial port your board is using: **Windows:** Open Device Manager → Ports (COM & LPT) → note the COM port (e.g., `COM3`). Alternatively, run `mode` in Command Prompt or PowerShell to list available serial devices (note that it may not list all devices). **macOS:** Run `ls /dev/tty.*` in Terminal → look for `/dev/tty.usbserial-*` or `/dev/tty.usbmodem*` **Linux:** Run `ls /dev/ttyUSB* /dev/ttyACM*` in terminal → look for `/dev/ttyUSB0` or `/dev/ttyACM0` Tip Unsure which port? Disconnect the UART cable, note which ports disappear, then reconnect. ## Troubleshooting **Issue**: Multiple serial ports appear and I'm unsure which to use - Disconnect the UART cable, note which ports disappear, then reconnect - Check board documentation for UART port COM number assignment - Try each port - the correct one will show application output when your program runs **Issue**: Debug probe not recognized by my computer - Verify debug probe drivers are installed correctly - Connect the debug probe directly to a USB port on your computer — USB hubs and docking stations can prevent the probe from being recognized - Try a different USB cable or USB port on your computer — some USB cables are charge-only and don't carry data - Check that the debug probe has power (look for LED indicators) - For J-Link, ensure you're using an official Segger probe or compatible clone **Issue**: Can't see serial port in Device Manager / `/dev/tty.*` - Verify the USB cable is connected to the UART port, not just the power port - Some USB cables are power-only and don't carry data - try a different cable - Check that board is powered on - On Linux, ensure you have permissions to access serial ports (add user to `dialout` group) - Driver may be needed for USB-to-UART chip on your board (check board documentation) **Issue**: Board appears to be stuck or not responding - Try power cycling the board (disconnect power/USB, wait 5 seconds, reconnect) - Some boards have a reset button - try pressing it - Check that you're using the correct power supply voltage (5V vs 3.3V) - Verify no short circuits or loose connections ## Next steps With your hardware connected, you can proceed with: - [Debug an application](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-an-application/index.md) - Start an interactive debugging session - [Deploy and profile an AI model](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/deploy-and-profile-ai-model/index.md) - Deploy AI models and capture profiling data - [View serial output](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-interface/#serial-output) - Monitor console output using Serial Monitor tools # Debug an application CodeFusion Studio automatically generates a default debug configuration for each new project. In most cases, you can start debugging immediately without any manual setup. ## Before you start - If you are debugging using external hardware probes, ensure the required drivers are installed. Refer to the relevant setup guides: - [Install Segger J-Link drivers](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-drivers/install-jlink-drivers/index.md) - [Install Olimex Arm JTAG drivers (RISC-V)](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-drivers/install-olimex-drivers/index.md) - [Install ICE drivers (SHARC-FX devices)](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-drivers/install-ice-drivers/index.md) - Make sure you have a successful build for the project you intend to debug. Debugging requires a generated ELF file in the project’s build folder, for example `build/m4.elf`. For information on how to build a project, refer to [CFS build task](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/build-and-flash/tasks/index.md). - Debug configuration settings are automatically selected based on your CFS workspace. If any required settings are undefined, CFS prompts you to resolve them. For information on how to adjust settings, see [CFS Settings](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/build-and-flash/cfs-settings/index.md). ## Start a debug session 1. Select the **Run and Debug** icon in the Activity Bar. 1. Select a debug configuration from the dropdown menu that matches your target and debugger, such as **CFS: Debug with GDB and OpenOCD (Arm Embedded)**. 1. Click on the **Start Debugging** icon to the left of your selection (green play icon) or press **F5**. Note When using the **CFS: Debug with GDB and OpenOCD (Arm Embedded)** configuration, CFS automatically locates and loads the appropriate SVD file from the CMSIS Pack directory. For other targets, you may be prompted to select an SVD file manually. ### Controls When connected to a debug session, the **Run and Debug** view provides a toolbar to control the application execution. This debugging toolbar contains the following debugging actions: | Name | Action | | --------- | ----------------------------------------------------------------- | | Reset | Performs a stop and reload | | Pause | Suspends execution to allow debugging | | Step Over | Steps to the next line, stepping over any function calls | | Step Into | Steps into any callee functions | | Step Out | Steps out of the current function to the calling function | | Restart | Resets the PC to reset address without disconnecting or reloading | | Stop | Terminates execution and closes the debug session | ### Next steps While a debug session is active, use the debugging features in the **Run and Debug** view to inspect variables, control execution, and analyze program state. For more information, see [Debugging interface](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-interface/index.md). ## Advanced debugging options For advanced debugging options, including how to create and customize debug configurations, and connect to remote hardware, refer to the sections below. ### Create new debug configuration New debug configurations can be created using the following steps: 1. Click the **Run** tab, and select **Add Configuration...** 1. Select the appropriate debugger. Tip For CMSIS devices (such as Cortex-M based targets), the **Cortex Debug** debugger is recommended since it supports peripheral registers using SVD files. 1. Select the debug configuration template matching your target: | Supported Targets | Type | | ----------------- | ------------------------------------------------------- | | Cortex-M (CMSIS) | CFS: Debug with GDB and OpenOCD (Arm Embedded) | | Cortex-M (CMSIS) | CFS: Debug with JlinkGDBServer and JLink (Arm Embedded) | | RISC-V | CFS: Debug with GDB and OpenOCD (RISC-V) | 1. Save the `launch.json` file which now contains the chosen debug configuration. The new configuration is added to your workspace and can be selected from the **Run and Debug** dropdown. ### Modify an existing debug configuration Use the following steps to modify an existing debug configuration: 1. From the VS Code menu bar, select **Run > Open Configurations**, or open the `.vscode/launch.json` file directly. 1. Make any necessary edits, then save the file. ### Debug remotely using an external GDB server You can debug hardware that is physically connected to a different machine by running a GDB server on the remote machine and connecting to it over the network from your local CodeFusion Studio environment. This setup is useful when hardware is located on a shared system or in a lab, while development is done from a personal laptop. #### Prerequisites - The remote machine must have physical access to the debug probe and target hardware. - Your local machine must be able to reach the remote machine over the network. - You must know the target device name (for example, MAX32690), and the IP address and port on which the GDB server is listening. #### Start the GDB server on the remote machine On the remote machine that is connected to the hardware, start the GDB server. For example, using a SEGGER J-Link GDB server: ``` # Windows (GUI version) JLinkGDBServer.exe -device [-port ] # macOS / Linux (command-line version) ./JLinkGDBServerCLExe -device [-port ] ``` If you are connecting from a different machine over the network: - Select the correct debug interface (for example, `-if SWD`). - Use `-nolocalhostonly` so the server allows remote connections. - Restrict the GDB server port to trusted hosts (for example, by using a firewall or VPN). This ensures the GDB server port is not exposed on untrusted or public networks, since remote debug access can allow intrusive control over the target. Example ``` "C:\Program Files\SEGGER\JLink\JLinkGDBServerCL.exe" ^ -device MAX32690 ^ -if SWD ^ -nolocalhostonly ^ -port 2331 ``` By default, the J-Link GDB server listens on TCP port 2331. In this example, the port is specified explicitly to avoid ambiguity and prevent port conflicts. Note To debug a multi-core device, start a separate J-Link GDB server instance for each core. Each instance must use a unique TCP port (for example, 2331 for one core and 3334 for another). Ensure that the `gdbTarget` setting in `launch.json` matches the port used for the corresponding core. The GDB server listens for a GDB client connection. Keep the server running for the duration of the debug session. Note If the GDB server cannot connect to the J-Link probe (for example, you encounter a `Connecting to J-Link failed` error), ensure that no other J-Link tools (such as another GDB server instance or JLinkExe) are currently using the probe. Only one process can access the probe at a time. #### Configure `launch.json` to use an external server On your local machine, open the `.vscode/launch.json` file in your CFS workspace. In the **CFS: Debug with JlinkGDBServer and JLink** configuration, update the following settings: - Set "servertype" to "external" - Set "gdbTarget" to `:`. Example ``` { "servertype": "external", "gdbTarget": "192.168.1.50:2331" } ``` Start debugging from the **Run and Debug** view. CodeFusion Studio connects to the remote GDB server over the network and debugs the target as if it were locally connected. When the connection succeeds, the debugger is active in VS Code and the server output updates to indicate a GDB client has connected. Example GDB server output (on the remote machine) ``` Connecting to target... Connected to target Waiting for GDB connection... Connected to 192.168.1.50:2331 GDB client (conn. 18) requested target.xml from GDB Server ``` # Debugging interface When you debug an application in CodeFusion Studio, the interface builds on VS Code’s native **Run and Debug** view and adds additional embedded-focused tools. This includes VS Code’s standard debugging features, such as execution controls, variable inspection, breakpoints, and call stack information, along with additional embedded-focused tools provided by CodeFusion Studio, such as the GDB Toolbox and Core Dump Analysis. ## Before you start - Launch a debug session. For instructions, see [Debug an application](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-an-application/index.md). - Ensure the application is paused. Most debugging views, such as **Variables**, **Watch**, **Call Stack**, and **Breakpoints**, only become available once execution is paused. ## Variables The variables view presents all of the variables visible to the current scope and file of debugging. They are split into different sections for ease of use, detailed below. Double clicking on a value allows you to edit the value, right clicking provides a menu of additional options. ### Local Local variables are the variables in the current function scope. ### Global Global variables are the variables in the global scope, visible to anywhere in the application. ### Static Static variables are shown for the current file being viewed from the current PC or call stack selection. ### Registers Registers provides a list of all of the core (non-memory-mapped) registers. ## Watch Allows you to set expressions which are evaluated. These can be simple variables or complex statements. Warning Expressions aren't context aware, so viewing a local variable from another context will fail to evaluate. Expressions can set variable values, which will happen each time the expression is evaluated (on step or pause). ## Call stack Displays the current call stack, with function name, PC address and source information where known. Selecting a function in the call stack will show the registers and local variables applicable to that function. ### Disassembly view Right-click on the main program being executed in the **Call Stack** view and select **Open Disassembly View** to view details of the machine-level instructions corresponding to the source code during a debugging session. Note Stepping while this view is in focus performs a single assembly instruction step. ## Breakpoints Breakpoints allow you to pause execution at a specific line of code and inspect program behavior. To view all set breakpoints, toggle them on/off, or add new ones, open the breakpoints view in the **Run and Debug** view. Right-click on a breakpoint to access a list of available actions. ### Line breakpoints Line breakpoints pause execution at the beginning of a specific line in the source code, allowing you to inspect variables, step through execution, and debug effectively. To set a breakpoint, click on the left margin of the editor next to the line number where you want to pause. A red dot will appear, indicating the breakpoint. Alternatively, right-click in the left margin and select **Add breakpoint**. ### Conditional breakpoints Conditional breakpoints allow execution to pause only when a specified condition is met. This is useful when debugging loops or tracking specific variable values. To create a conditional breakpoint, right click on an existing breakpoint, select **Edit breakpoint**, choose **Expression**, and enter your condition. ### Inline breakpoints Inline breakpoints allow execution to stop inside specific expressions within a line of code, such as inside a loop or within method chains. They are useful when you need to debug a particular part of an expression rather than stopping at the start of the line. To set an inline breakpoint: 1. Click on the exact position where you want to place the inline breakpoint. 1. Go to **Run > New Breakpoint > Inline Breakpoint**. You can also use the shortcut **Shift + F9** (Windows/Linux) or **Cmd + F9** (Mac). 1. The inline breakpoint will now be set at the cursor position. ## GDB Toolbox The GDB Toolbox provides access to both built-in and user-defined JSON-based scripts that help inspect program state during a halted debug session. You can use it to create GDB scripts that log output, display messages, or save memory and register dumps.\ For additional information, see [GDB Toolbox](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/gdb-toolbox/index.md). ## Core Dump Analysis The Core Dump Analysis Tool enables retrospective debugging for supported Zephyr-based projects, such as those running on the MAX32690. When a core dump is retrieved over JTAG (from flash) or UART (from serial log output), the tool displays the state of the program at the time of the crash, including active threads, stack usage, register values, and memory state. For additional information, see [Core Dump Analysis](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/core-dump-analysis/index.md). ## CFS Memory Viewer The CFS Memory Viewer is a multi-core-aware tool that lets you inspect device memory during live and retrospective debug sessions. It integrates directly with CFS debug infrastructure and provides a native alternative to the [Cortex-Debug Memory tab](#memory). The viewer automatically re-reads memory each time the debugger halts, displays memory in a scrollable hex and ASCII grid, and supports configurable byte grouping, endianness, and display formats. For additional information, see [Memory Viewer](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/memory-viewer/index.md). ## Peripheral registers The **XPeripherals** view provides a nested structure of peripheral registers and user-modifiable bits. Hover over a register or bit to view more information, copy the value to the clipboard or modify the value. Warning Some bits are reserved and not provided in the list. When writing to an entire register, make sure reserved bits are not set. ## GDB interface You can interact directly with the debugger by entering GDB commands in the **Debug Console**. 1. Start a debug session. 1. In the toolbar above the terminal, select the **Debug Console** tab. 1. Enter GDB commands at the prompt (`>`), for example `info registers` For additional information about GDB, refer to the [GDB Basics](https://developer.analog.com/docs/codefusion-studio/latest/tutorials/gdb-tutorial/gdb-basics/index.md). Note Many commonly used GDB commands, such as inspecting registers or dumping memory, are also available as preconfigured actions in the **GDB Toolbox**. For additional information, see [GDB Toolbox](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/gdb-toolbox/index.md) ## Memory The **Memory** tab in the toolbar above the terminal shows the working memory. This displays a detailed image of what is currently being stored in memory as the program executes. This tab is provided by the Cortex-Debug extension. For an alternative with multi-core support and retrospective debugging, see [CFS Memory Viewer](#cfs-memory-viewer). ### Customizing the memory view To view a specific region of memory, click on the **+** icon and enter a memory address. To customize that memory view, click on the pencil icon to edit the address, display name, width, and endianness: ## Serial output You can view UART serial output from the target using one of the following tools. ### VS Code Serial Monitor Warning Arm CMSIS-DAP debuggers, including the MAXPICO and MAX32xxxx onboard debuggers, use the serial `Break` to trigger a target reset. Microsoft's Serial Monitor in VS Code sends the `Break` before connecting to the serial port, which causes the processor to reset when using these debuggers. J-Link debuggers do not exhibit this behavior. It is recommended to connect to the serial port before starting a debug session, or use an external serial terminal like [Minicom](#minicom) or [PuTTY](#putty). Note You need the **Serial Monitor** extension for VS Code to use this tool. You can install it from the VS Code marketplace. 1. Click on **Serial Monitor** in the toolbar above the terminal. 1. Set the Monitor Mode to **Serial**. 1. Set the Port to the port in use by the hardware. 1. Set the Baud rate to **115200** 1. Click **Start Monitoring**. This prints the outputs associated with the source code. Info To determine the correct port, view the available ports with the required port disconnected, connect the port and see which value appears in the dropdown list Example When using the example "Hello World" program, the output looks like this: ### Tera Term Tera Term is a free, open source terminal emulator commonly used to capture UART serial output from embedded systems. To capture UART output in Tera Term: 1. Install [Tera Term](https://github.com/TeraTermProject/teraterm/releases). 1. Launch Tera Term and select the correct **COM port** (such as COM5). 1. Go to **Setup > Serial port**, and set the **baud rate** to **115200**. 1. Click **OK** and view the log output in the terminal window. ### Minicom [Minicom](https://help.ubuntu.com/community/Minicom) is a command line utility for serial port communication on Unix platforms. Note You need **minicom** installed to use this tool. 1. Run the following from a terminal: `$ minicom -D /dev/tty.usbxxx -b 115200` where `/dev/tty.usbxxx` matches your serial device. Example When using the example "Hello World" program, the output looks like this: ``` Welcome to minicom 2.9 OPTIONS: Compiled on Sep 22 2023, 21:10:41. Port /dev/tty.usbmodem21302, 10:07:03 Press Meta-Z for help on special keys Hello World! count = 0 count = 1 count = 2 count = 3 count = 4 count = 5 ``` ### PuTTY [PuTTY](https://www.putty.org/) is an open source SSH and telnet client for Windows. Note You need **PuTTY** installed to use this tool. 1. In the **Session** category, select **Serial** as the **Connection type**. 1. Set the **Serial line** to the correct COM port for your device. Use the Windows **Device Manager** to find your device under **Ports (COM & LPT)**. 1. Set the **Speed** (baud rate) to **115200**. 1. Click **Open** to start the serial terminal. Example When using the example "Hello World" program, the output looks like this: ### Linux configuration On Linux, add the user to the **dialout** group in order to use your serial ports. ``` sudo usermod -aG dialout ``` ## RTOS status When running an RTOS like Zephyr, you can view essential thread information for the RTOS at a breakpoint using the **XRTOS** tab. ### RTOS requirements Some RTOSes may require changes in order to provide the debug information required by the XRTOS View. For **Zephyr**, the following config flags must be enabled in your prj.conf file: ``` # Enable thread awareness when debugging CONFIG_THREAD_NAME=y CONFIG_DEBUG_THREAD_INFO=y CONFIG_THREAD_ANALYZER=y ``` Other RTOSes have their own required config flags. Consult the relevant documentation for configuration information. Note You need the **RTOS Views** extension for VS Code to use this tool. # Debug a multicore MSDK application CodeFusion Studio provides debugging for supported MSDK microcontrollers with multiple cores. The multi-core architecture of the `MAX32xxx` and `MAX78xxx` microcontrollers requires secondary images contained within the image for the primary core. This means only a single image is required to boot and run a multi-core microcontroller. The secondary core is enabled with a code sequence on the primary core. Debugging the secondary core is available after `MXC_SYS_RISCVRun()` has been called on the primary core. Note Not all of the dual core evaluation boards have external debug ports for the secondary core. Care should be taken when selecting a board to work with. See [Supported processors](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/about/supported-processors/index.md) for a full list of supported processors. ## Create a multi-core workspace To get started, create a new multi-core workspace using the Workspace Creation Wizard. 1. Click the CodeFusion Studio icon in the VS Code activity bar. 1. Click **New Workspace**. 1. Select the **MAX78002** processor and **EvKIT_V1** board. 1. Choose **Select a workspace template** and select the MSDK multi-core example. 1. Click **Continue**. 1. Enter a name for your workspace and click **Create Workspace**. ## Build the project Run the [CFS: build](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/build-and-flash/tasks/index.md) to create the build directory and generate the ELF files needed for debugging. - Click the **CFS icon** in the **Activity Bar**. - Select **Build (m4)** in the **Actions** view. This action creates the following files: - `build/m4.elf` - `build/buildrv/riscv.elf` ## Debug settings 1. Select the **Run and Debug** icon on the activity bar. 1. Select the **CFS: Debug with GDB and OpenOCD (Arm Embedded)** from the dropdown menu. 1. Click on the **Start Debugging** icon (green play button) to the left of your selection or press **F5**. 1. Select configuration or image files if prompted. Note If prompted to specify the Arm ELF binary, use the following path from your generated workspace: `/m4/build/m4.elf` 1. When the Arm debug session reaches the breakpoint in the main.c code, press **Continue** on the debugging tool bar or **F5**. 1. Confirm RISC-V is running by observing LED0 blinking, or pause the Arm core to check it has passed the call to `MXC_SYS_RISCVRun();` 1. Launch the RISC-V debug instance using the **CFS: Debug with GDB and OpenOCD (RISC-V)** debug configuration. 1. Select configuration/image files if prompted. Note If prompted to specify the RISC-V ELF binary, use the following path from your generated workspace: `/m4/build/buildrv/riscv.elf` ## Control the session The **Call Stack** can be used to navigate between each debug instance. This provides quick access to the debugging taking place on each processor. Note On MAX32xxx and MAX78xxx evaluation boards, clicking **Restart** during a RISC-V debug session causes a `Protocol error with Rcmd: FC`.\ This is expected behavior and occurs because the RISC-V JTAG port must be re-enabled by the Arm core before reconnecting. For example, execute `MXC_SYS_RISCVRun()` on the Arm core (as documented in the previous section) to re-enable the RISC-V JTAG interface, allowing the RISC-V debug session to be restarted. # Debug a SHARC-FX application Use this guide to connect, configure, and debug SHARC-FX processors in CodeFusion Studio. The SHARC-FX family includes both single-core DSPs (such as the ADSP-2183x series) and multicore SoCs (such as the ADSP-SC83x family) that combine a SHARC-FX DSP with an ARM Cortex-M33 core. Most of the setup steps, including toolchain installation and ICE emulator configuration, apply to all SHARC-FX devices. For single-core DSPs, debugging is performed directly on the SHARC-FX core. For multicore SoCs, the debugging process requires starting the SHARC-FX core before attaching to the ARM core. Platform support The SHARC-FX toolchain and related workspace plugins are supported on **Windows and Linux**. ## Before you start 1. Install ADI ICE drivers. Ensure the ICE-1000, ICE-1500, or ICE-2000 drivers are installed so CodeFusion Studio can communicate with your SHARC-FX target. - **Windows:** If you selected **ADI ICE Drivers (Requires Administrator)** during CodeFusion Studio installation, you’re all set. If you skipped that option, see [Install ICE drivers](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-drivers/install-ice-drivers/index.md). - **Linux:** Run the USB permissions setup script after installation. See [Install ICE drivers](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-drivers/install-ice-drivers/#linux) for details. 1. Log in using your myAnalog account and install the required SHARC-FX toolchain. ### Log in to access the SHARC-FX toolchain Authentication is required to download the SHARC-FX toolchain. 1. Follow the steps in [Access restricted packages (using myAnalog login)](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/auth/index.md). 1. Install the toolchain using one of the following methods: - **Command Palette:** Open the Command Palette and run **CFS: Install Required Packages**. Find `xtensa_sharcfx_toolchain/15.5.2` in the list and select it to install. - **Command line:** From `cfsutil`, run ``` cfsutil pkg install xtensa_sharcfx_toolchain/15.5.2 ``` 1. When prompted to accept the license agreement, review the license text and any referenced URLs, then: - **Command Palette:** Select **Accept**. - **Command line:** Enter `y` at the `(y/n)` prompt (or use `--acceptLicense` for automation). ## Create a SHARC-FX workspace 1. Follow the steps in [Create a new workspace](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-new-workspace/index.md) to launch the Workspace Creation Wizard. 1. Select a SHARC-FX device, such as the **ADSP-SC835W** SoC and corresponding **ADSPSC835W-EV-SOM** board. 1. Choose a SHARC-FX workspace template, such as **SHARC-FX Multi-Core with TFLM running on the ARM core**. 1. Follow the prompts to complete workspace setup. ## Connect the ICE emulator The ICE-1000, ICE-1500, or ICE-2000 emulators are required for JTAG debugging on all SHARC-FX projects. Follow the recommended setup for your ICE emulator: 1. Connect the emulator and board: - Attach the main power/data cable from the ADSP-SC835W board to your computer. - Attach the main USB cable from the ICE emulator to your computer. - Connect the emulator ribbon cable (ICE-1000, ICE-1500, or ICE-2000) to the board’s JTAG header. - Verify that both the board and emulator LEDs flash green, indicating that the hardware is powered and communication is established. Tip For detailed connection diagrams and port-specific instructions, see [Connect hardware](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/connect-hardware/#sharc-fx-adsp-sc835w-with-ice-debugger). 1. Confirm the emulator is detected by your system: - **Windows:** Open **Device Manager** and confirm the emulator appears under **CrossCore Tools**. - **Linux:** Run `lsusb | grep 064b` to verify the probe is visible. 1. By default, CodeFusion Studio templates use the **ICE-2000** interface. If you are using a different model, update the `.vscode/settings.json` for each project accordingly: ``` "cfs.openocd.interface": "interface/ice1000.cfg" ``` 1. If you are using and ICE-1000 and ICE-1500 emulator, the value of adapter speed in `.vscode/launch.json` should also be updated in the SHARC-FX project. For ICE-1000 and ICE-1500, the maximum speed is 5000: ``` "openOCDLaunchCommands": ["adapter speed 5000"], ``` Note For additional information on installing the emulator hardware and software on your PC, see the [ICE-1000/ICE-2000 Emulator User’s Guide (PDF)](https://www.farnell.com/datasheets/1880733.pdf). ## Build the projects Run the [CFS: build](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/build-and-flash/tasks/index.md) to create the build directory and generate the ELF files needed for debugging. - Click the **CFS icon** in the **Activity Bar**. - In the **Actions** view, select the appropriate build task for your project: - Select **Build (m33)** and **Build (sfx)** for multicore SHARC-FX SoCs. - Select **Build (sfx)** for single-core SHARC-FX SoCs. ## Start debugging The steps below apply to multicore SHARC-FX SoCs such as the ADSP-SC83x family. For **ADSP-SC83x** projects, debugging on the ARM core works only if the SHARC-FX core is started first, then the ARM debug session is started. If you are using a single-core SHARC-FX DSP, start a standard debug session for the SHARC-FX project only. To start debugging: 1. Select the **Run and Debug** icon on the activity bar. 1. Select the **Debug with GDB and OpenOCD (sfx)** from the dropdown menu. 1. Click on the **Start Debugging** icon (green play button) to the left of your selection or press **F5**. This will load and run the preload application, which will configure clocks and DMC settings. The main application can then be loaded and run by clicking on the Reset device icon. 1. When the SHARC-FX debug session starts and the core halts at `main()`, leave it running. 1. Launch the ARM debug instance using the **Debug with GDB and OpenOCD (ARM)** debug configuration. Note During an active debug session, the ICE emulator LED changes to purple, indicating that it is connected and debugging. ## Troubleshooting | **Error Message** | **Solution** | | ------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------- | | `Failed to launch GDB: could not connect (error 138): The system tried to join a drive to a directory on a joined drive` | Start debugging with the SHARC-FX core first. | | `Cannot find: "C:/analog/cfs//Tools/xtensa/RJ-2024.4/XtensaTools"` | Ensure you install the Xtensa toolchain package. | | `OpenOCD: GDB Server Quit Unexpectedly.` | Update the `.vscode/settings.json` for each project with the correct ICE emulator model | # Debug with SEGGER Ozone SEGGER Ozone is a graphical debugger for embedded applications that provides advanced debugging features, including instruction trace, code profiling, and performance analysis. CodeFusion Studio can launch Ozone debugging sessions directly from the Actions panel, with automatic project configuration through generated `.jdebug` files. CodeFusion Studio supports Ozone debugging for supported Arm Cortex-M targets, including MAX32xxx, MAX78xxx, and the Cortex-M33 core on SHARC-FX devices. It supports MSDK and Zephyr projects. ## Prerequisites Before using Ozone with CodeFusion Studio, ensure the following are installed: - **SEGGER J-Link drivers**: Required for J-Link hardware probe support. See [Install Segger J-Link drivers](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-drivers/install-jlink-drivers/index.md). - **SEGGER Ozone**: Download and install Ozone from the [SEGGER website](https://www.segger.com/products/development-tools/ozone-j-link-debugger/). - **Built project**: Ozone requires a generated ELF file in the project build folder, for example `build/m4.elf`. For information on how to build a project, refer to [CFS build task](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/build-and-flash/tasks/index.md). ## Configure Ozone executable path (optional) CodeFusion Studio automatically detects the Ozone executable when installed in standard locations. If auto-detection doesn't work, or if Ozone is installed in a custom location, you can manually configure the path: 1. Open VS Code **Settings** (`Ctrl+,` on Windows/Linux, `⌘,` on macOS). 1. Search for `cfs.ozone.executable`. 1. Set the **CFS Ozone Executable** path to your Ozone installation. Typical installation paths: - **Windows:** `C:\Program Files\SEGGER\Ozone_V\Ozone.exe` - **macOS:** `/Applications/SEGGER/Ozone_V/Ozone.app` - **Linux:** `/opt/SEGGER/Ozone_V/Ozone` macOS application bundles On macOS, you can specify either the `.app` bundle path (for example, `/Applications/SEGGER/Ozone_V340i/Ozone.app`) or the full path to the executable inside the bundle (for example, `/Applications/SEGGER/Ozone_V340i/Ozone.app/Contents/MacOS/Ozone`). CodeFusion Studio automatically handles `.app` bundle paths and locates the correct executable. 1. Replace `` with your installed Ozone version (for example, `V340i`). ## Launch an Ozone debug session CodeFusion Studio generates a `.jdebug` project file for Ozone based on your workspace configuration. This file configures the target device, debug interface, and ELF file path. ### Start debugging with Ozone 1. Connect your J-Link debug probe to your computer and target hardware. See [Connect hardware](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/connect-hardware/index.md) for details. 1. Build your project to generate an ELF file in the `build/` directory. 1. Click the **CFS icon** to open the CFS sidebar. 1. From the **Context Filter**, select **Workspace** to view an action for every Ozone-capable core, or select a specific core to view only the action for that core. 1. From the **Actions** panel, select the **Debug with Ozone (``)** action for the core you want to debug, for example **Debug with Ozone (CM33)**. Note CodeFusion Studio shows a separate **Debug with Ozone (``)** action for each Ozone-capable core (Arm Cortex-M and RISC-V). Cores that don't support Ozone, such as SHARC-FX, don't show an action. CodeFusion Studio launches Ozone and loads a debug configuration file (`.jdebug`). Ozone connects to the target hardware, loads the compiled application, and opens the graphical debugging interface. You can now use Ozone debugging features—source code view, breakpoints, register inspection, memory viewer, and instruction trace—to debug your application. ### Debug configuration files CodeFusion Studio automatically generates a `.jdebug` Ozone project file in your project directory when you create a workspace. This file configures the target device, debug interface, and ELF file path for the debug session. CodeFusion Studio names the file based on the core name (for example, `m4.jdebug`). You can use the generated `.jdebug` file without modification. ## Additional information - [Ozone User Guide & Reference Manual](https://www.segger.com/downloads/jlink/UM08025_Ozone.pdf) - [SEGGER J-Link documentation](https://www.segger.com/products/debug-probes/j-link/) - [Install Segger J-Link drivers](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-drivers/install-jlink-drivers/index.md) - [Debug an application](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-an-application/index.md) # Troubleshooting ## Debugging - If you don't select an option from the quick pick menu, the debug session ends. An error notification lets you reopen the menu and select the required setting: Example - If no SVD files are present in the CMSIS Pack directory, an error notification allows you to browse your file system for an SVD file: Example ## MAX32657 and MAX32658: Configure for an external J-Link If the MAX32657 or MAX32658 EV kit jumpers are misconfigured, the external debugger may fail to connect, or you may see errors such as multiple J-Link devices being detected. You can use an external J-Link probe instead of the on-board (OB) J-Link on MAX32657 or MAX32658 EV kits. To route SWD to the external J-Link: 1. Remove the shunt from **JP6** to disable the on-board J-Link (J-Link OB-MAX32690-ADI) when using an external debugger. 1. Connect the external J-Link to the **EXT SWD** header (**J3**). 1. Install shunts on **JP22** and **JP23** (EXT SWD EN) to route the SWD signals from J3 to the MAX32657. 1. Remove all shunts from **JP18** (OBD SWD EN) so the on-board J-Link (OB) is disconnected from the SWD lines. 1. Ensure the external debugger operates within the SWD I/O voltage specified in the EV kit user guide. Note As a guideline for current EV kit revisions, the target I/O voltage is in the **1.2–1.6 V** range. Do **not** connect debuggers that only operate at 1.8 V or 3.3 V directly to the EXT SWD connector. Important The jumper functions and recommended I/O voltages can change between EV kit revisions.\ Always refer to the latest MAX32657 / MAX32658 EV kit user guide for the authoritative jumper and voltage information and follow the manufacturer’s safety instructions. ## Serial monitor - **Failed to open serial port** on Linux\ The user may need to be added to the **dialout** group in order to manipulate the serial port. ``` sudo usermod -aG dialout ``` # Install debug drivers Before debugging applications on hardware, install the appropriate drivers for your debug probe. Different development boards and processor architectures require specific debugger types. Select the driver installation guide for your debug probe: - [Install Olimex JTAG drivers](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-drivers/install-olimex-drivers/index.md) - For RISC-V debugging - [Install Segger J-Link drivers](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-drivers/install-jlink-drivers/index.md) - For J-Link debugging - [Install ICE drivers](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-drivers/install-ice-drivers/index.md) - For SHARC-FX debugging After installing drivers, proceed to [Connect hardware](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/connect-hardware/index.md) for detailed board connection instructions. # Install ICE drivers The ADI ICE drivers are required to debug SHARC-FX processors using the ICE-1000, ICE-1500, or ICE-2000 emulator. ## Linux On Linux, USB access to ICE probes is managed through udev rules and a dedicated `cfsusb` group. The CodeFusion Studio installer automatically configures USB permissions when run with root privileges (`sudo`). If the installer was not run as root, run the USB permissions setup script manually: ``` sudo bash /Tools/openocd/share/openocd/scripts/setup_usb_permissions.sh ``` This script: - Creates `/etc/udev/rules.d/cfs.rules` with the USB rules for ICE probes - Creates the `cfsusb` group (if it does not already exist) - Adds your user to the `cfsusb` group - Reloads udev rules You must log out and back in for the group membership to take effect. ### Verify USB permissions If the ICE probe is not detected after running the setup script, verify that the udev rules are in place: 1. Check that the rules file exists: ``` cat /etc/udev/rules.d/cfs.rules ``` 1. Confirm it contains an entry for the Analog Devices vendor ID (`064b`): ``` ATTRS{idVendor}=="064b", GROUP="cfsusb" ``` 1. Verify that your user is a member of the `cfsusb` group: ``` groups ``` If `cfsusb` is not listed, add your user account to the group: ``` sudo usermod -aG cfsusb $USER ``` Sign out and sign in again to apply the group membership. 1. If the rules file is missing, re-run the USB permissions setup script: ``` sudo bash /Tools/openocd/share/openocd/scripts/setup_usb_permissions.sh ``` 1. Reload udev rules without rebooting: ``` sudo udevadm control --reload-rules sudo udevadm trigger ``` ### Verify the probe is detected After connecting the ICE probe, confirm it is visible: ``` lsusb | grep 064b ``` You should see an entry for the Analog Devices ICE emulator. ## Windows If you skipped the **ADI ICE Drivers** option during CodeFusion Studio installation, follow these steps to complete the driver installation. ### Before you start 1. Connect your ICE probe (**ICE-1000**, **ICE-1500**, or **ICE-2000**). 1. Open Windows **Device Manager** using one of the following methods: - Search for **Device Manager** in the **Start** menu. - Right-click the **Start** button and select **Device Manager**. - Press **Windows + R**, type `devmgmt.msc`, and press **Enter**. 1. Identify the ICE probe in Device Manager. The ICE probe uses a Blackfin processor internally. Windows may identify the device as **Blackfin** or **Unknown USB Device**, depending on your USB port and system configuration. *ICE-1000 and ICE-2000 probes may appear as* *Blackfin* *under* *Other devices* *before driver installation.* *ICE-1500 (and occasionally other ICE models) may appear as* *Unknown USB Device* *before the driver is installed.* ### Option 1: Install using Device Manager (recommended) 1. **Right-click** the device entry and choose **Update driver**. 1. Select **Browse my computer for drivers**. 1. In the **Browse for drivers on your computer** dialog: - Make sure **Include subfolders** is selected. - Navigate to: `C:\analog\cfs\\Data\ICEDrivers\emulators` 1. Click **OK**, then click **Next** to start the installation. 1. Wait while Windows installs the driver. When installation completes: - The wizard displays **Windows has finished installing the drivers for this device.** - The LED on the ICE probe lights up. - In **Device Manager**, the probe now appears under CrossCore Tools. ### Option 2: Install using the Windows CLI (`pnputil`) `pnputil` is a built-in Windows command-line tool that manages device drivers. You can use it to install the ICE driver directly. 1. Open **Command Prompt** as Administrator. 1. Run the following command: ``` pnputil /add-driver "C:\analog\cfs\\Data\ICEDrivers\emulators\adiusb.inf" /install ``` 1. Wait for the confirmation message: 1. When installation completes: - The **LED on the ICE probe lights up.** - In **Device Manager**, the probe now appears under **CrossCore Tools.** ## Next steps Once the driver installation is complete, you can [connect and debug SHARC-FX targets](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-sharc-fx/index.md) directly from CodeFusion Studio. # Install Segger J-Link debugger drivers Segger's J-Link is a popular JTAG/SWD debugger supported by CodeFusion Studio. The J-Link drivers are not provided directly by CodeFusion Studio so need to be installed manually if using a J-Link. Download and installation instructions can be found on the Segger website at Minimum version for MAX32657/8 J-Link Software and Documentation Pack **V8.94 or later** is required for MAX32657 and MAX32658 processor support. Earlier versions do not include official support for these devices. When installation is complete, open VS Code **Settings** (`Ctrl+,` on Windows/Linux, `⌘,` on macOS), and search for `cfs.jlink.path`. Verify that the **CFS J-Link Path** points to the correct J-Link installation directory. Typical installation paths include: - **Windows:** `C:\Program Files\SEGGER\JLink_` - **macOS:** `/Applications/SEGGER/JLink_` - **Linux:** `/opt/SEGGER/JLink_` Replace `JLink_` with your installed J-Link version (for example, `JLink_V824` or `JLink_V860`). # Install Olimex USB ARM JTAG Drivers for RISC-V Debugging The Olimex ARM-USB-OCD-H debugger is required to debug the RISC-V core on supported MAX32xxx and MAX78xxx devices. The Olimex drivers are not provided directly by CodeFusion Studio so need to be installed manually if RISC-V debugging is required. Download and installation instructions can be found in chapter 3 of the [Olimex ARM-USB-OCD-h User Manual](https://www.olimex.com/Products/ARM/JTAG/_resources/ARM-USB-OCD_and_OCD_H_manual.pdf) ## Linux configuration On Linux the user may need to be added to the **dialout** group in order to use the Olimex Debugger. ``` sudo usermod -aG dialout ``` # Debug tools This section provides information on debugging tools in CodeFusion Studio. - [AI Debug Assistant](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/ai-debug-assistant/index.md) showing how to interact with a running debug session using natural language. - [GDB Toolbox](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/gdb-toolbox/index.md) demonstrating how to automate and streamline debugging tasks using the GDB Toolbox in CodeFusion Studio. - [Core Dump Analysis Tool](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/core-dump-analysis/index.md) showing how to retrieve and analyze core dumps for retrospective debugging of supported Zephyr-based SoCs. - [Memory Viewer](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/memory-viewer/index.md) showing how to inspect and navigate device memory during live and retrospective debug sessions. # AI Debug Assistant Preview The AI Debug Assistant is currently in preview and may change in future releases. The AI Debug Assistant is an agentic AI system built into CodeFusion Studio that actively participates in your debug sessions. Rather than answering static questions about your source code, it can autonomously investigate faults, inspect live hardware state, coordinate across multiple cores, and reason about what your silicon is actually doing - all in real time. The AI Debug Assistant is accessible through the **CFS MCP debug server**, an integration built on the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/), an open standard created by Anthropic for connecting AI models to external tools and data sources. It works with GitHub Copilot Agent Mode, Claude Code, and other MCP-compatible AI clients. In this section you'll find: - [Getting started](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/ai-debug-assistant/getting-started/index.md) — prerequisites and setup for the CFS MCP debug server. - [Using the AI Debug Assistant](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/ai-debug-assistant/using-ai-debug-assistant/index.md) — using the MCP server with real-world debugging examples. - [Tools and workflows reference](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/ai-debug-assistant/reference/index.md) — full reference for all debug tools and pre-built diagnostic prompts. - [Troubleshooting](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/ai-debug-assistant/troubleshooting/index.md) — troubleshooting guidance and information. ## What makes this different There is a meaningful difference between an AI that suggests the next line of code and one that can autonomously coordinate debug sessions, read fault registers, decode exception frames, correlate a shared-memory conflict, and tell you that your DMA descriptor on Core 1 is racing against a buffer reallocation on Core 0. The AI Debug Assistant bridges that gap. It enables **agentic debugging workflows** — where the AI doesn't wait to be guided step by step, but instead autonomously orchestrates multi-step investigations, correlates hardware state across subsystems, and reports findings in plain language. ## What it can do The AI Debug Assistant provides a comprehensive set of debug tools, contextual resources, and pre-built diagnostic prompts. | Capability | Description | | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Session control** | Start, stop, restart, continue, pause, and step through debug sessions | | **Hardware state inspection** | Read registers, memory, variables, stack traces, and thread lists directly from the target | | **Breakpoints and watchpoints** | Set, list, and remove breakpoints — including conditional breakpoints — and hardware watchpoints | | **GDB command execution** | Run GDB commands with built-in safety guards that block destructive operations | | **Fault decoding** | Automatically parse ARM Cortex-M fault registers (CFSR, HFSR, BFAR, MMFAR) and RISC-V exception registers (mcause, mtval, mepc) into human-readable diagnoses | | **ELF binary analysis** | Surface symbol sizes, stack usage, section layout, and the largest consumers of flash and RAM | | **Structured diagnostic prompts** | Pre-built investigation sequences for crash diagnosis, memory corruption, peripheral misconfiguration, multi-core debugging, and more | ## How to use the AI Debug Assistant The AI Debug Assistant is available through the CFS MCP debug server. Start the server, then connect any MCP-compatible AI client. | Client | Connection Method | | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | **GitHub Copilot (Agent Mode)** | Requires MCP server started with `(CFS) MCP: Start Debug Server` command. See [Getting started](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/ai-debug-assistant/getting-started/#example-github-copilot-agent-mode). | | **Claude Code** | Register the server with `claude mcp add --transport http cfs-debug http://localhost:/mcp`. See [Getting started](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/ai-debug-assistant/getting-started/#example-claude-code). | | **Any MCP-compatible client** | The MCP server is open by design. Any AI client that supports the Model Context Protocol can connect. See [Getting started](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/ai-debug-assistant/getting-started/#other-mcp-compatible-clients). | Tip When the MCP server starts, the built-in MCP client in VS Code connects automatically for GitHub Copilot Agent Mode, so the debug tools are ready to use without extra steps in VS Code. Other clients, such as Claude Code, still need to be registered manually — see [Getting started](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/ai-debug-assistant/getting-started/index.md). # Getting started with the AI Debug Assistant The AI Debug Assistant is available through the **CFS MCP debug server**. Start the server, then connect an MCP-compatible AI client. ## Before using the assistant Most AI Debug Assistant tools require an active debug session to inspect hardware state. Press **F5** or click the **Run and Debug** icon before asking the assistant to investigate, inspect, or control your target. Alternatively, you can ask the assistant to start a debug session using the appropriate configuration name. For example: *"Start debugging CFS: Debug with GDB and OpenOCD (ARM Embedded)"*. For detailed debug steps, refer to [Start a debug session](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-an-application/index.md). ## CFS MCP debug server Before you begin, make sure you have: - **CodeFusion Studio** installed with an active project - For **GitHub Copilot Agent Mode**: VS Code 1.96.0 or later and the [GitHub Copilot extension](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot) - For **Claude Code**: [Claude Code](https://claude.com/product/claude-code) installed ### Start the MCP server The MCP server runs as a local HTTP service inside CodeFusion Studio. The server does not start automatically — you must start it manually before connecting an AI client. 1. Open the Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`) and type MCP Server. 1. Run `(CFS) MCP: Start Debug Server`. The following commands are available for managing the server: | Command | Description | | ------------------------------- | --------------------------------------------------------------------- | | `(CFS) MCP: Start Debug Server` | Start the MCP server | | `(CFS) MCP: Stop Debug Server` | Stop the MCP server | | `(CFS) MCP: Server Status` | Check whether the server is running and which port it is listening on | When the server starts, a VS Code notification shows the URL it is listening on (for example, `http://localhost:56448/mcp`). Note the port number from this URL — you will need it to connect AI clients. Tip To start the MCP server automatically when the extension activates, go to **Settings → Extensions → CodeFusion Studio → General → MCP Server** and enable the **Run on Activation** setting (`cfs.mcp.runOnActivation`). ### Connect your AI client The MCP server works with any MCP-compatible AI client. The sections below show connection steps for commonly used clients. #### Example: GitHub Copilot Agent Mode 1. Open GitHub Copilot Chat (`Ctrl+Alt+I` / `Cmd+Shift+I`) 1. Click the mode selector dropdown in the chat input box — it defaults to **Ask** 1. Select **Agent** 1. Describe what you want investigated When VS Code MCP support is enabled and available, Agent Mode automatically discovers and connects to the MCP server as soon as it's running, giving it access to all debug tools and diagnostic prompts. Note If Agent Mode does not show the CFS MCP server or its tools, make sure your VS Code installation supports MCP and that MCP support is enabled/available. If MCP support is unavailable in your environment, connect with an external MCP client such as Claude Code instead. #### Example: Claude Code The MCP server is assigned an available port by the operating system at startup. Before connecting Claude Code, check which URL was assigned: - Check the VS Code notification that appears when the server starts, or - Run `(CFS) MCP: Server Status` in the Command Palette. Both show the full URL (for example, `http://localhost:56448/mcp`). For a stable connection, we recommend setting a fixed port before registering with Claude Code. See [Set a fixed port](#optional-set-a-fixed-port) below. Once you know the port, register the server with Claude Code: ``` claude mcp add --transport http cfs-debug http://localhost:/mcp ``` Replace `` with the port assigned at startup. This registers the CFS MCP server with Claude Code using the name `cfs-debug`. Important After adding the server, exit and restart Claude Code for the registration to take effect. To verify the server was added, run `claude mcp list`. Start a debug session in CodeFusion Studio, then try asking Claude: *"What is the current execution state of the target?"* or *"Show me the registers."* #### Other MCP-compatible clients The above are examples only - there are numerous MCP-compatible clients available. To connect another MCP client: 1. Start the MCP server via `(CFS) MCP: Start Debug Server` in the Command Palette 1. Note the server URL displayed in the VS Code notification (for example, `http://localhost:56448/mcp`) 1. Register this URL with your AI client - consult your client's documentation for how to add an MCP server The specific registration method varies by client, but all MCP-compatible clients provide a way to connect to external MCP servers. ### Optional: Set a fixed port By default, the OS assigns an available port when the MCP server starts. To use a fixed port instead (recommended for Claude Code, so the registration URL stays stable): 1. Go to **Settings → Extensions → CodeFusion Studio → General**, or search for (`cfs.mcp.port`). 1. Set the **Port** field (`cfs.mcp.port`) to a specific value (0–65535). Setting it to `0` restores OS-assigned behaviour. 1. Run `(CFS) MCP: Stop Debug Server` then `(CFS) MCP: Start Debug Server` to restart with the new port. A notification confirms the port the server is now listening on. 1. If using Claude Code, re-register the server with the new port: ``` claude mcp remove cfs-debug claude mcp add --transport http cfs-debug http://localhost:/mcp claude mcp list ``` Note GitHub Copilot reads the port directly from the `cfs.mcp.port` setting — no re-registration is needed after a port change. ### Optional: Verify the connection with MCP Inspector To test the connection independently of any AI client, use the open-source [MCP Inspector](https://github.com/modelcontextprotocol/inspector): ``` npx @modelcontextprotocol/inspector ``` The inspector outputs a session token and a URL with that token pre-filled: ``` Starting MCP inspector... ⚙️ Proxy server listening on 127.0.0.1:6277 🔑 Session token: Use this token to authenticate requests or set DANGEROUSLY_OMIT_AUTH=true to disable auth 🔗 Open inspector with token pre-filled: http://localhost:6274/?MCP_PROXY_AUTH_TOKEN= 🔍 MCP Inspector is up and running at http://127.0.0.1:6274 🚀 ``` 1. Open the URL shown in your terminal — this opens the MCP Inspector in your browser with the session token pre-filled. 1. Select **Streamable HTTP** as the transport type. 1. Select **Via Proxy** as the **Connection Type**. 1. Enter the MCP server URL using the port assigned at startup (for example, `http://localhost:/mcp`). Check the port via `(CFS) MCP: Server Status` if needed. 1. Click **Connect**. Once connected, you can browse all available tools, resources, and prompts, and execute them manually to verify the server is working. ## Next steps - [Using the AI Debug Assistant](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/ai-debug-assistant/using-ai-debug-assistant/index.md) — practical examples with real-world debugging scenarios - [Tools and workflows reference](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/ai-debug-assistant/reference/index.md) — full reference for all debug tools and diagnostic prompts # Tools and workflows reference Preview The AI Debug Assistant is currently in preview and may change in future releases. This page documents the tools, resources, and diagnostic prompts exposed through the CFS MCP debug server. ## Debug tools The AI Debug Assistant exposes debug tools organized into six categories. These tools are available to any connected AI client — GitHub Copilot, Claude Code, or any MCP-compatible client. ### GitHub Copilot You can view and manage the available tools by clicking the tools icon in the GitHub Copilot Chat input toolbar. VS Code automatically discovers and registers all CFS Debug Assistant tools through MCP — individual tools can be enabled or disabled from this panel. ### Claude Code In Claude Code, run `/mcp` to review all available CFS Debug Assistant tools. ### GDB commands Direct GDB command execution with built-in safety guards. | Tool | Description | Parameters | | ---------------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------- | | `debug_execute_gdb_command` | Execute a single GDB command. Destructive commands (`quit`, `kill`, `detach`, `file`, `target`) are blocked. | `command` | | `debug_execute_gdb_sequence` | Execute a sequence of GDB commands in order. The session must be halted. | `commands` (array, 1–20), `stopOnError` (optional) | ### Session lifecycle | Tool | Description | Parameters | | -------------------------- | ------------------------------------------------------------------------- | ----------------------- | | `debug_get_active_session` | Get information about the active debug session (ID, name, type). | — | | `debug_start` | Start a debug session with an optional configuration name. | `configName` (optional) | | `debug_stop` | Stop the current debug session. | — | | `debug_restart` | Restart the current debug session. Re-flashes and re-launches the target. | — | ### Execution control | Tool | Description | Parameters | | --------------------------- | -------------------------------------------------------------------------------------------------------- | ---------------------------------- | | `debug_continue` | Continue program execution. | — | | `debug_step_over` | Step over the current line. | — | | `debug_step_into` | Step into a function call. | — | | `debug_step_out` | Step out of the current function. | — | | `debug_pause` | Pause program execution. | — | | `debug_get_execution_state` | Get the current execution state (running, halted, or no session). When halted, includes the stop reason. | — | | `debug_wait_for_stop` | Block until the target halts (breakpoint, step, exception). Returns the stop reason. | `timeoutMs` (optional, 100–300000) | ### Breakpoints and watchpoints | Tool | Description | Parameters | | -------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------ | | `debug_set_breakpoint` | Set a breakpoint at a specific file and line, with an optional condition. | `file`, `line`, `condition` (optional) | | `debug_remove_breakpoints` | Remove breakpoints from a file, or remove all breakpoints. | `file` (optional), `line` (optional) | | `debug_list_breakpoints` | List all active breakpoints. | — | | `debug_set_watchpoint` | Set a hardware watchpoint to halt on memory write, read, or access. | `expression`, `type` (optional: `write` / `read` / `access`) | | `debug_remove_watchpoint` | Remove a watchpoint by number. | `number` | ### Memory | Tool | Description | Parameters | | --------------------- | ---------------------------------------------------------------------- | ------------------------------------------------------- | | `debug_read_memory` | Read memory bytes from the target at a specific address. | `address`, `count` (1–1024 bytes) | | `debug_write_memory` | Write a value to a memory address. The write is verified by read-back. | `address`, `value` (hex), `size` (optional) | | `debug_search_memory` | Search for a byte pattern in a memory region. | `startAddress`, `length` (1–1,048,576 bytes), `pattern` | ### Analysis | Tool | Description | Parameters | | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | | `debug_get_context` | Get comprehensive debug context: backtrace, registers, and local variables. | — | | `debug_analyze_fault` | Read fault status registers and provide a structured fault diagnosis. Supports ARM Cortex-M (CFSR, HFSR, BFAR, MMFAR) and RISC-V (mcause, mtval, mepc). | `architecture` (`arm` or `riscv`) | ## Diagnostic prompts Diagnostic prompts are pre-built investigation sequences that the AI follows autonomously. Each prompt encodes a systematic debugging methodology — the AI determines which tools to call and in what order based on what it finds. Invoke a prompt by describing the task to your AI client in natural language, or by name in any MCP-compatible client. In Claude Code, run `/mcp` to browse all available prompts. ### State and crash | Prompt | What it does | Parameters | | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | | `basic-state-awareness` | Starts a debug session and reports the execution state, program counter, and stack pointer. | — | | `crash-diagnosis` | Starts a debug session, waits for a crash, reads fault registers, decodes the exception type, inspects the faulting address, walks the call stack, and identifies the offending function. | — | | `timeout-handling` | Sets a breakpoint on a specified function and reports what happens — useful for testing timeout and error-handling paths. | `functionName` | ### Breakpoint and stepping | Prompt | What it does | Parameters | | ------------------------ | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- | | `breakpoint-and-inspect` | Sets a breakpoint at a specified location, continues execution, and reports local variables when the breakpoint is hit. | `file`, `line` | | `conditional-breakpoint` | Sets a conditional breakpoint, catches it twice, reads a variable each time, and compares the values. | `condition`, `variable` (optional) | | `step-and-disassemble` | Steps through N instructions, showing disassembly and a register value at each step. | `steps` (optional), `register` (optional) | ### Watchpoint and memory | Prompt | What it does | Parameters | | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ | | `watchpoint-trigger` | Watches a variable for writes, continues execution, and reports what wrote to it with the full call stack. | `variable` | | `memory-inspection` | Reads a memory region and determines whether it contains ASCII strings, structured data, or byte patterns. | `address`, `length` (optional) | | `autonomous-investigation` | Autonomously investigates memory corruption end-to-end: locates the struct in the ELF symbol table, sets a hardware watchpoint, traces the root cause, and disassembles suspicious code. | `variable` | ## Settings reference | Setting | Description | Default | | ------------------------- | ------------------------------------------------------------------------------------------------ | ------- | | `cfs.mcp.runOnActivation` | Automatically start the MCP server when the CodeFusion Studio extension activates. | `false` | | `cfs.mcp.port` | Port number for the MCP server. Set to `0` to let the OS assign an available port automatically. | `0` | ## Additional information - [AI Debug source and architecture](https://github.com/analogdevicesinc/codefusion-studio/tree/main/packages/ide/src/debug-tools/ai-debug/README.md) - [Introducing Agentic AI Workflows as Embedded Debugging Partner in CodeFusion Studio](https://developer.analog.com/newsroom/introducing-agentic-ai-workflows-as-embedded-debugging-partner-in-codefusion-studio) # Troubleshooting Preview The AI Debug Assistant is currently in preview and may change in future releases. ## Port conflict If the OS cannot assign a port, or you need a specific port: 1. Go to **Settings → Extensions → CodeFusion Studio → General**, or search for (`cfs.mcp.port`). 1. Change the **Port** (`cfs.mcp.port`) to a specific free port (for example, 3001 or 3002). Set it to `0` to let the OS assign a port automatically. 1. Run `(CFS) MCP: Stop Debug Server` then `(CFS) MCP: Start Debug Server`. 1. Update your AI client configuration to use the new port. ## No active debug session Most tools require an active debug session. Start debugging with **F5** or via the **Run** menu before asking the assistant to inspect state or control execution. Alternatively, you can ask the assistant to start a debug session using the appropriate configuration name. For example: *"Start debugging CFS: Debug with GDB and OpenOCD (ARM Embedded)"*. ## CFS Debug Assistant tools not appearing in GitHub Copilot Chat If the CFS Debug Assistant tools are not available in GitHub Copilot Chat: 1. Check that your VS Code version is 1.96.0 or later (**Help → About**) 1. Ensure GitHub Copilot is installed and you are signed in 1. Confirm the CodeFusion Studio extension is installed and active 1. Confirm the MCP server is running — run `(CFS) MCP: Server Status` in the Command Palette 1. Run `MCP: List Servers` in the Command Palette and start **CFS Debug Assistant** if it isn't connected ## Claude Code cannot connect If Claude Code cannot reach the MCP server: 1. Run `(CFS) MCP: Server Status` in the Command Palette to confirm the MCP server is running 1. Run `(MCP) List Servers` or `claude mcp list` to confirm `cfs-debug` is registered and check the URL and port are correct 1. If the port has changed, re-register the server: ``` claude mcp remove cfs-debug claude mcp add --transport http cfs-debug http://localhost:/mcp ``` ### Test the connection independently Use the [MCP Inspector](https://github.com/modelcontextprotocol/inspector) to test the server directly: ``` npx @modelcontextprotocol/inspector ``` Select **Streamable HTTP** transport and **Proxy** connection type, then enter `http://localhost:/mcp` (replace `` with the port assigned at startup — check using `(CFS) MCP: Server Status`). You can browse all available tools, resources, and prompts, and execute them manually to verify everything is working before involving an AI client. ## Additional information - [Model Context Protocol specification](https://modelcontextprotocol.io/) - [GitHub Copilot VS Code extension](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot) - [Claude Code](https://claude.com/product/claude-code) - [Debug Adapter Protocol](https://microsoft.github.io/debug-adapter-protocol/) - [GDB Toolbox](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/gdb-toolbox/index.md) — automate GDB command sequences with JSON-based scripts - [Core Dump Analysis Tool](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/core-dump-analysis/index.md) — offline post-mortem analysis of Zephyr core dumps # Using the AI Debug Assistant The AI Debug Assistant is available through the **CFS MCP debug server**, which works with any MCP-compatible client. Before using the assistant, make sure you have an active debug session and the MCP server running. See [Getting started](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/ai-debug-assistant/getting-started/index.md) if you haven't set this up yet. ## CFS MCP debug server The CFS MCP debug server is platform-agnostic and works with any MCP-compatible AI client. The MCP server enables agentic debugging workflows where the AI autonomously orchestrates multi-step investigations — deciding which tools to call, in what order, and what to do with each result — without requiring you to guide it step by step. Any MCP-compatible AI client works the same way: describe what you want investigated in natural language, and the assistant plans and executes the diagnostic sequence. The sections below show usage examples for commonly used clients. ### Example: GitHub Copilot Agent Mode To use Agent Mode: 1. Open Copilot Chat (`Ctrl+Alt+I` / `Cmd+Shift+I`) 1. Click the mode selector dropdown in the chat input box — it defaults to **Ask** 1. Select **Agent** 1. Describe what you want investigated Example investigations: ``` Investigate the shared memory issue between both cores. ``` ``` Diagnose why the application hard-faulted after 30 seconds of runtime. ``` ``` Find what's writing to the shared buffer and causing data corruption. ``` The assistant will plan and execute a sequence of debug operations — reading registers, inspecting memory, setting watchpoints, walking call stacks — and present its findings when complete. ### Example: Claude Code Once connected to the MCP server (see [Getting started](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/ai-debug-assistant/getting-started/#example-claude-code)), all debug tools and diagnostic prompts are available. Start a debug session in CodeFusion Studio and describe what you want to investigate. The MCP server enables longer, multi-turn debug investigations where you can review findings, ask follow-up questions, and iteratively refine the diagnosis. Example investigations: ``` What's the current execution state of the target? ``` ``` The firmware is hitting a hard fault intermittently. Can you investigate and tell me what's causing it? ``` ``` Watch the shared_buffer variable for writes and tell me what's writing to it and from where. ``` Tip Give the AI a clear description of the symptom rather than a specific instruction. Describe what the hardware is doing wrong and let the assistant determine how to investigate. ### Other MCP-compatible clients The above are examples only - there are numerous MCP-compatible clients available. Any MCP-compatible AI client can connect to the CFS MCP server. See [Getting started](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/ai-debug-assistant/getting-started/#other-mcp-compatible-clients) for connection steps. ## Real-world examples ### Example 1: Analyzing firmware size Before a release, you need to reduce flash usage. In Claude Code: > *"Analyze the firmware binary and show me the largest consumers of flash and RAM."* The assistant reads the ELF binary, surfaces symbol sizes and section layout, ranks the largest contributors, and suggests candidates for optimization — without requiring you to manually run `arm-none-eabi-nm` and sort the output yourself. ### Example 2: Diagnosing a hard fault Your firmware hits a hard fault and you're not sure why. In Agent Mode or Claude Code: > *"What caused this hard fault?"* The AI Debug Assistant: 1. Reads the ARM Cortex-M fault status registers (CFSR, HFSR, BFAR, MMFAR) 1. Decodes the exception type — bus fault, memory management fault, usage fault, or hard fault 1. Inspects the faulting address against the memory map 1. Walks the call stack to identify the offending function and source line 1. Reports the root cause in plain language with the relevant file and line number This is the same systematic sequence an experienced embedded engineer would follow — except the AI completes it in seconds. ### Example 3: Tracking a multi-core shared memory race condition You're developing firmware for a dual-core SoC — a Cortex-M33 handling real-time sensor acquisition and a Cortex-M4 running application logic — sharing a region of SRAM. Under load, the application core intermittently reads stale values from the shared buffer. There's no crash, no fault — just wrong data. In Agent Mode or Claude Code: > *"Investigate the shared memory issue between both cores."* The AI Debug Assistant: 1. Connects to debug sessions on both cores 1. Reads the relevant memory region and inspects variables mapped there from the ELF symbol table 1. Examines the execution state of each core — what each was running, what addresses each was accessing 1. Identifies that the DMA transfer on Core 1 overlaps with Core 0's read of the same descriptor with no synchronization primitive guarding access 1. Reports the specific memory region, the conflicting accesses, the source lines involved, and a suggested fix This kind of multi-core investigation — correlating state across debug sessions to find a subtle data-sharing issue — traditionally consumes hours of manual register inspection and instrumented rebuilds. ### Example 4: Tracking memory corruption with a watchpoint A variable in your firmware is being corrupted and you don't know where. In Agent Mode or Claude Code: > *"Watch shared_buffer for writes and tell me what's writing to it."* Using the `autonomous-investigation` prompt, the AI Debug Assistant: 1. Locates the variable in the ELF symbol table to get its address 1. Sets a hardware watchpoint on that address 1. Continues execution and waits for the watchpoint to fire 1. Reads the call stack at the point of the write 1. Disassembles the surrounding code to identify the root cause 1. Reports the offending function, source line, and what value was written ## Pre-built diagnostic prompts The AI Debug Assistant includes a library of pre-built diagnostic prompts — structured investigation sequences that encode the kind of expertise that typically takes years of embedded development to build. When you invoke a prompt, the AI follows a systematic, repeatable sequence rather than guessing. See the [Tools and workflows reference](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/ai-debug-assistant/reference/#diagnostic-prompts) for the full list of available prompts and how to invoke them. ## Next steps - [Tools and workflows reference](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/ai-debug-assistant/reference/index.md) — full reference for all debug tools and diagnostic prompts - [Troubleshooting](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/ai-debug-assistant/troubleshooting/index.md) — troubleshooting guidance for common AI Debug Assistant issues - [GDB Toolbox](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/gdb-toolbox/index.md) — automate GDB command sequences with JSON-based scripts - [Debug a multicore application](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-multi-core-application/index.md) — set up multi-core debug sessions # Core Dump Analysis Tool In this section you will find: - An [overview](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/core-dump-analysis/core-dump-overview/index.md) of the Core Dump Analysis Tool and supported processors. - Information on how to [enable core dump support](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/core-dump-analysis/core-dump-enable/index.md) support in CFS. - Steps for how to [retrieve and analyze core dumps](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/core-dump-analysis/core-dump-analyze/index.md) from supported devices using JTAG or UART. - Information on how to [interpret Core Dump Analysis results](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/core-dump-analysis/core-dump-interpret/index.md). # Retrieve and analyze core dumps The Core Dump Analysis Tool supports retrieving and analyzing core dumps with JTAG (from flash) and UART (from serial log output). Once a fault has occurred, the resulting core dump can be retrieved from the backend specified in the `prj.conf` file. You can then analyze its contents to examine the state of the program at the time of the crash, including active threads, stack usage, register values, and memory state. ## Prepare your environment Before analyzing a core dump, ensure your board and toolchain are correctly configured. ### JTAG debug setup - Connect your board to your PC using a JLink debugger. - [Install Segger J-Link drivers](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-drivers/install-jlink-drivers/index.md) if you haven't already. - Review your project's `.vscode/launch.json` file to confirm your J-Link debugger settings are correct. Make sure the following values are properly configured: - `"device"`: should match your target device. For example, `MAX32690`. - `"interface"`: typically `swd` for ARM devices - GDB and server paths under the `linux`, `windows`, or `osx` sections, depending on your host OS. ### macOS Python setup On macOS, Core Dump Analysis for MAX32657 and MAX32658 with the `zephyr_arm_toolchain/1.0.1` package requires Python 3.12 installed on your system (`brew install python@3.12`). For details, see the [Release Notes](https://developer.analog.com/docs/codefusion-studio/latest/release-notes/2.2.1/#debugging). ### UART log output By default, CFS projects are already configured to store the core dump in flash and retrieve it as a binary (`.bin`) file. You don’t need to change anything in your `prj.conf` for this to work. (Optional) If you want the entire core dump to be sent over UART instead of stored in flash, enable: ``` CONFIG_DEBUG_COREDUMP_BACKEND_LOGGING=y ``` In this case, the tool expects the `#CD:...` formatted output from Zephyr. See the [Zephyr Core Dump documentation](https://docs.zephyrproject.org/latest/services/debugging/coredump.html) for details. To capture UART output, set up a serial terminal such as: - [MiniCom](https://help.ubuntu.com/community/Minicom) - [Tera Term](https://github.com/TeraTermProject/teraterm/releases) - [PuTTY](https://www.putty.org/) See [Debugging interface](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-interface/#serial-output) for setup instructions. Save the captured output (containing `#CD:` records) to a file such as `coredump.log`. When analyzed in CodeFusion Studio using **Analyze Existing Core Dump**, the tool automatically decodes the log and converts it to a binary `.bin` file for inspection. ## Configure Core Dump settings in VS Code Before running the Core Dump Analysis tool, make sure the core dump settings in your VS Code environment are correct. These settings control how the tool locates, retrieves, and analyzes the core dump file. You can configure these settings either in your user settings (for all projects) or in your workspace settings (for just the current project). 1. Open **Settings** in VS Code (`Ctrl+,` or `Cmd+,` on macOS). 1. In the search bar, type `cfs.coreDump`. 1. Review and update the settings listed in the table below. 1. Save and restart VS Code for your changes to take effect. | Setting | Description | | ---------------------------- | --------------------------------------------------------------------------------- | | `cfs.coreDump.address` | Start address in flash where the core dump is stored. Default is `0x102F0000`. | | `cfs.coreDump.elfFile` | Path to the ELF file built from your application. Required for symbol resolution. | | `cfs.coreDump.logFile` | (Optional) Path to a runtime log file. Can help correlate logs with the crash. | | `cfs.coreDump.binFile` | Path to save the retrieved core dump file. Default is `core-dump.bin`. | | `cfs.coreDump.size` | Size of the core dump to retrieve from flash. Default is `0x10000`. | | `cfs.coreDump.projectFolder` | Project folder used during analysis. Useful for multi-project workspaces. | | `cfs.coreDump.gdbServerPort` | Port number used by GDB server for core dump analysis (default 1234 for J-Link). | Tip Settings with both **user** and **workspace** scope can be customized per project by opening `.vscode/settings.json` and overriding them there. ### Verify that System Planner and VS Code settings match Core dumps are stored in a dedicated flash partition defined in [System Planner → Memory Allocation](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/memory-allocation/index.md). This partition is identified by the **Plugin Option** `coredump-partition`, which determines where Zephyr saves crash data in flash memory. The address and size must match the Core Dump settings in VS Code so the Core Dump Analysis Tool can retrieve the data correctly. Use the following workflow to update the core dump flash partition in System Planner and align your VS Code project settings accordingly. 1. In **System Planner**, go to the **Memory Allocation** tab. 1. Click **Configure** next to the core dump partition. 1. In the **Edit Partition** form, note the **Starting Address** and **Size** values. If you update the System Planner configuration, click [Generate Code](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/generate-code/index.md). 1. Open **Settings** in VS Code and review the following values under **Core Dump**: - `cfs.coreDump.address` - `cfs.coreDump.size` If you update VS Code settings, save and restart VS Code for the changes to take effect. Warning If the core dump settings in VS Code do not match the values set in **Memory Allocation**, the tool may display: ``` Core dump analysis failed. Error: Neither Zephyr core dump magic header nor 'ZE' marker found in bin file. ``` ## Trigger a crash 1. In CodeFusion Studio, click **Build** in the **Actions** panel to generate the ELF file used during analysis. 1. Flash the application to your board. 1. To simulate a crash for testing, add a call to `k_panic();` in `main.c`. This triggers a kernel panic and forces a core dump for analysis. 1. (Flash only) After the crash occurs, reset or power-cycle the board to ensure the dump is fully written to flash before running Core Dump Analysis. ## Open the Core Dump Analysis view 1. In VS Code, go to the **Run and Debug** view. 1. Under your existing debug configurations, look for the **Core Dump Analysis** section. This section contains four actions: | Button | Description | | ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Retrieve Core Dump (JLink)** | Downloads the core dump from the device to the path set in `cfs.coreDump.binFile`, but does not open it. Use this if you want to save the dump for later inspection. | | **Analyze Existing Core Dump** | Opens the previously saved core dump (`.bin`) or log file for analysis. Use this if the dump has already been retrieved. | | **Retrieve and Analyze Core Dump** | Performs both of the above actions in one step. It retrieves the core dump and immediately opens it in the Core Dump Analysis view. Use this for the full workflow after a crash. | | **Export Core Dump Report** | Packages the current analysis into a ZIP archive. | Tip You can customize paths and related options in the [Configure Core Dump settings in VS Code](#configure-core-dump-settings-in-vs-code) section. ### Retrieve Core Dump (JLink) Use this option to download the core dump (`.bin`) from the device’s flash memory without launching the debugger. In the Core Dump Analysis view, click **Retrieve Core Dump (JLink)**. This action will: - Connect to the device through J-Link. - Read the memory region defined by `cfs.coreDump.address` and `cfs.coreDump.size`. - Save the core dump to the path defined in `cfs.coreDump.binFile`. ### Analyze Existing Core Dump If you already have a core dump (retrieved manually or from a previous session), you can analyze it without connecting to the device. The tool accepts either: - A binary dump (`.bin`) retrieved from flash. - A UART log file captured during the crash. The tool expects the `#CD:...` formatted output from Zephyr. See the [Zephyr Core Dump documentation](https://docs.zephyrproject.org/latest/services/debugging/coredump.html) for details. Before using this option, make sure your VS Code settings are correctly configured: - Set `cfs.coreDump.elfFile` to the ELF file built from your application. - If you're using UART, set `cfs.coreDump.logFile` to the captured log output. - Confirm `cfs.coreDump.binFile` points to the `.bin` file you want to analyze. Then follow these steps: 1. In the Core Dump Analysis view, click **Analyze Existing Core Dump**. 1. Select your bin file from the list. - If a UART log (`.log`) is provided, it will be decoded first. This action will: - Launch a debugger session. - Parse and analyze the specified `.bin` file. - Populate the Core Dump Analysis view with detailed crash data. Note Click **Stop** or **Disconnect** in the debugger to exit the session. ### Retrieve and Analyze Core Dump This option combines both retrieval and analysis in a single step. Use it after a crash when you want to inspect the results immediately. In the Core Dump Analysis view, click **Retrieve and Analyze Core Dump**. This action performs the same steps as **Retrieve Core Dump (JLink)** followed by **Analyze Existing Core Dump**, in sequence. It works only with core dumps stored in flash (`.bin`). Tip See [Interpret core dump results](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/core-dump-analysis/core-dump-interpret/index.md) for help understanding the output. ### Export Core Dump Report This option packages the current analysis and related files into a single ZIP archive for sharing or offline inspection. In the Core Dump Analysis view, click **Export Core Dump Report**. The archive includes the following files for each project: - **Markdown report** – An export of the Core Dump Analysis view, including crash cause, thread state, and memory usage. - **ELF file** – The application ELF needed for symbol resolution. - **Core dump binary (.bin)** – The raw dump retrieved from the device. The report also includes metadata used during core dump analysis, such as the paths to the required `.bin` and `.elf` files and the memory address and size of the dump. If any required files are missing, they are clearly noted in the report. The ZIP file is saved to the directory of the first valid `.bin` file, or to the workspace root if no `.bin` file is found. ## (Optional) Run core dump commands from the Command Palette You can also run core dump actions directly from the VS Code **Command Palette**, instead of using the Core Dump Analysis view. 1. Open the **Command Palette**: - Click the ⚙️ **Manage** gear icon (bottom-left corner), then select **Command Palette**, or - Use the shortcut `Ctrl+Shift+P` (or `Cmd+Shift+P` on macOS). 1. Start typing the name of a command from the list below. - **Retrieve Core Dump (JLink)** – `cfs.retrieveCoreDump` - **Analyze Existing Core Dump** – `cfs.analyzeExistingCoreDump` - **Retrieve and Analyze Core Dump** – `cfs.retrieveAndAnalyzeCoreDump` - **Extract Core Dump Report** – `cfs.downloadCoreDumpReport` This is useful for advanced users or keyboard-driven workflows. # Enable Core Dump support Core dump support can be enabled during workspace creation in CodeFusion Studio. ## Workspace setup When creating a new workspace, you have two options: - Choose a Zephyr-based workspace template - Manually configure the workspace ### Zephyr-based workspace template If you choose a Zephyr-based workspace template, core dump support is enabled by default. These templates provide: - A reserved flash partition for storing core dumps - Pre-configured Zephyr settings in `prj.conf` to enable dump generation and storage No additional configuration is required. ### Manually configure the workspace If you choose to manually configure the workspace: - Select the **Zephyr Project Plugin** when configuring the core. - In the Platform Options section, select the **Enable Core Dump** checkbox. This applies the necessary Zephyr configuration to enable core dump functionality in your project. # Interpret core dump results Sample core dump analysis When you retrieve and analyze a core dump, CodeFusion Studio populates the **Core Dump Analysis** view with the following sections: ## Crash Cause This section identifies the reason for the crash, if available. - **Type:** Categorizes the crash (example: memory fault, bus fault). Displays as `Unknown` if not determinable. - **Address:** Memory address where the crash occurred. - **Faulting IP:** Instruction pointer (PC) at the time of the crash. - **Faulting Location:** File and line number in the source code. - **Details:** May include specific Zephyr kernel error codes or messages, if available. Sample UART Log Output ``` [00:00:00.001,000] os: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0 [00:00:00.001,000] os: Current thread: 0x20000660 (main) [00:00:00.083,000] os: ***** HARD FAULT ***** [00:00:00.083,000] os: Fault escalation (see below) [00:00:00.083,000] os: ***** MPU FAULT ***** [00:00:00.083,000] os: Instruction Access Violation [00:00:00.084,000] os: >>> ZEPHYR FATAL ERROR 20: Unknown error on CPU 0 [00:00:00.084,000] os: Fault during interrupt handling [00:00:00.270,000] os: Halting system ``` ## Tasks Stack This section shows which thread was running at the time of the crash. - **Name:** The thread name. For example, `main` refers to the main application thread. `z_thread_entry` is an internal Zephyr function involved in thread execution. - **Status:** Indicates the current thread status (typically `stopped`). - **Thread Address:** Memory address of the thread control block. ### Stack Usage Information on how much stack memory was used by the crashed thread. - **Used:** Stack memory used at time of crash. - **Total Allocated:** Stack size assigned to the thread. - **Watermark (Peak Usage):** Peak stack usage prior to the crash. ### Execution Info Registers captured at the time of crash. - **PC (Program Counter):** Address of the currently executing instruction. - **SP (Stack Pointer):** Points to the top of the current stack. - **LR (Link Register):** Contains the return address for function calls. ### Stack Trace A backtrace of function calls leading to the crash. - **Name:** Function where the crash occurred. - **Symtab:** Source file and line number. - **Line:** Line of code that triggered the crash. - **PC / SP:** Program and stack pointers at time of crash. - **Reason:** Additional details if the stack could not be fully unwound. ## Global Heap This section summarizes system-wide heap memory usage at the time of the crash. - **Total:** Total heap available. - **Used:** Heap in use at time of crash. - **Peak:** Highest amount of heap used since boot. ## Peripheral State This section shows the peripheral register state at the time of the crash. Examples include general-purpose input/output (GPIO) peripherals such as GPIO0 and direct memory access (DMA) engines. Peripherals with sub-units, such as DMA channels, list those sub-units as nested entries. - **Name:** The peripheral or sub-unit name. - **Registers:** Each register displays its name and highlighted value, with an optional description. A warning icon displays for registers flagged as a problem. CodeFusion Studio automatically expands a peripheral flagged as a problem and also displays an error icon so you can spot it quickly in the tree. A collapsed peripheral can still contain a register with a warning icon, so expand a peripheral to check its registers even if no error is showing. Note The **Peripheral State** section shows register data only when a peripheral state script is available to GDB Toolbox. This is available on select platforms. If no script is available, this section shows **No peripheral state info available**, and the rest of the core dump analysis still proceeds. Advanced users For additional information on the values shown in the Core Dump Analysis view, refer to the [GDB Toolbox](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/gdb-toolbox/gdb-toolbox-about/index.md) scripts and the [GDB Python API documentation](https://sourceware.org/gdb/current/onlinedocs/gdb.html/index.html#SEC_Contents). # Core Dump Analysis Tool overview The Core Dump Analysis Tool enables developers to inspect the state of Zephyr-based firmware for supported SoCs at the time of a crash. It supports retrospective debugging using core dumps generated by Zephyr-based applications. ## Supported processors Core dump analysis supports Zephyr RTOS applications on the following SoCs: - MAX32650 - MAX32655 - MAX32657 - MAX32658 - MAX32660 - MAX32662 - MAX32666 - MAX32670 - MAX32672 - MAX32690 - MAX78000 - MAX78002 Support extends to all processor cores included in these SoCs. ## Platform support On macOS, Core Dump Analysis for MAX32657 and MAX32658 with the `zephyr_arm_toolchain/1.0.1` package requires Python 3.12 installed on your system (`brew install python@3.12`). For setup instructions, see the [Release Notes](https://developer.analog.com/docs/codefusion-studio/latest/release-notes/2.2.1/#debugging). # GDB Toolbox In this section you'll find: - [About the GDB Toolbox](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/gdb-toolbox/gdb-toolbox-about/index.md) information on GDB Toolbox scripts and where they are stored. - [Using the GDB Toolbox](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/gdb-toolbox/gdb-toolbox/index.md) overview of GDB Toolbox features and how to create, edit, and run scripts. - [GDB Toolbox reference](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/gdb-toolbox/gdb-toolbox-reference/index.md) reference for supported action types, variables and usage. - [GDB Toolbox examples](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/gdb-toolbox/gdb-toolbox-examples/index.md) sample scripts to get started. # About the GDB Toolbox The GDB Toolbox provides access to both default and user-defined JSON-based scripts that help inspect program state during a halted debug session. These scripts run GDB commands and capture their output, making it easy to automate debugging tasks. You can create and manage custom scripts using templates or by copying and extending default scripts to enhance functionality. The Toolbox works with MSDK, SHARC-FX, and Zephyr projects, and supports both single-core and multi-core debug sessions. Tip For information on other debugging tools such as breakpoints, watch, and call stack, see [Debugging interface](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-interface/index.md). ## GDB Toolbox scripts When you create a CFS workspace, the `gdb_toolbox` folder is automatically added to the `.cfs` directory within the workspace. This folder contains the scripts used by the GDB Toolbox and includes the Configs and GDB subdirectories. ### Configs directory The `configs` directory contains the default GDB Toolbox JSON scripts that define which GDB commands to run. The following default scripts are added to your workspace when it's created and cover common tasks such as dumping memory, analyzing stack usage, or detecting system faults: | Script name | Description | Supported architecture | Supported firmware platform[1](#fn:1) | | --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- | ------------------------------------- | | **Analyze Crash** | Analyzes a crash and generates a JSON report of faulting threads. | Architecture agnostic | Zephyr | | **Analyze Faults** | Analyzes system faults and exceptions such as hard faults or bus errors. Reads and decodes fault status registers, and prints a fault summary. | ARM, SHARC-FX | Firmware agnostic | | **Analyze Global Heap** | Analyzes heap usage and prints a JSON report showing total heap size (total), currently used memory (used), and the peak memory usage (max). | Architecture agnostic | Zephyr | | **Analyze Stack** | Performs a detailed analysis of stack usage. Traverses stack frames, prints local variables and arguments, and calculates used and remaining stack space. | ARM | MSDK | | **Analyze Stack High-water Mark** | Analyzes the maximum stack depth reached during runtime using a known fill pattern. Requires the stack painter to be run beforehand. | ARM | MSDK | | **Analyze Threads** | Analyzes all active threads and extracts each thread’s stack usage, register state, and call trace. Requires OpenOCD (see note below). | Architecture agnostic | Zephyr | | **Dump Memory** | Dumps the current memory state to a log file. | ARM, RISC-V, SHARC-FX | Firmware agnostic | | **Dump Registers** | Dumps the current register state to a log file. | ARM, RISC-V, SHARC-FX | Firmware agnostic | | **Interrupt Status** | Analyzes IRQ and system handlers by reading the NVIC state to identify enabled, active, and pending interrupts, and their associated handlers. | ARM | Firmware agnostic | | **Paint Stack** | Fills the stack with a known pattern (`0xDEADBEEF`) to enable runtime analysis of maximum stack usage. Must be run before the High-water Mark script. | ARM | MSDK | Analyze Threads requires OpenOCD The Analyze Threads script requires an OpenOCD debug configuration (for example, `CFS: Debug with GDB and OpenOCD (Arm Embedded)`). JLinkGDBServer does not support Zephyr thread awareness, which causes this script to fail when using a J-Link debug configuration. ### GDB directory The `gdb` directory stores optional GDB scripts that are referenced by the JSON scripts. GDB scripts (`.gdb` files) are plain text files that contain either raw GDB commands or Python code using the GDB Python API. Most scripts in this directory use native GDB commands, but advanced scripts such as **Analyze Threads** leverage Python for intelligent analysis. These scripts are referenced in Toolbox JSON configs. For example, the **Analyze Threads** Toolbox script includes a `source` command that points to a `thread-analyzer.gdb` GDB script in the `gdb` directory: ``` { "name": "Analyze Threads", "description": "Analyzes threads in the target application.", "version": "1.0.0", "commands": [ { "command": "source {defaultScriptsDirectory}/thread-analyzer.gdb" } ] } ``` For an introduction to GDB scripting, refer to the [GDB manual – Command Files](https://sourceware.org/gdb/current/onlinedocs/gdb/Command-Files.html) and [User-defined Commands](https://sourceware.org/gdb/current/onlinedocs/gdb.html/Define.html#Define). For advanced scripting using Python, refer to the [GDB Python API documentation](https://sourceware.org/gdb/current/onlinedocs/gdb.html/Python-API.html). ______________________________________________________________________ 1. Only compatible scripts are shown during a debug session. This context-awareness ensures you only run scripts that are supported by the active project. [↩](#fnref:1 "Jump back to footnote 1 in the text") # GDB Toolbox examples This article provides examples of the types of scripts you can create with the GDB Toolbox. ## Log contents to the Debug Console The following example shows a simple GDB Toolbox script. It runs a single command `(x/32x $sp)` to dump the top of the stack, and performs a single action of logging a message to the **Debug Console**. ``` { "name": "Dump Stack", "description": "Dump top of stack and log it.", "version": "1.0.0", "commands": [ { "command": "x/32x $sp", "actions": [ { "type": "log", "message": "Stack contents dumped." } ] } ] } ``` ## Save and view output Each command can have more than one action. In this example, in addition to writing to the **Debug Console**, you also save the output to a file and open that file in the UI. ``` { "name": "Dump Stack to File", "description": "Dump the top of the stack, write to the log file and open it.", "version": "1.0.0", "commands": [ { "command": "x/32x $sp", "actions": [ { "type": "log", "message": "Stack contents dumped." }, { "type": "writeFile", "filePath": "gdb_toolbox/reports/stack_output.log", "content": "${gdbOutput}" }, { "type": "openFile", "filePath": "gdb_toolbox/reports/stack_output.log", "lineNumber": 5 } ] } ] } ``` Note All file paths in `writeFile`, `appendFile`, and `openFile` actions resolve relative to the project root directory. The `${gdbOutput}` variable captures the output of the GDB command. See [Variables](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/gdb-toolbox/gdb-toolbox-reference/#variables) ## Chain together multiple commands You can chain together multiple GDB commands in one script. For example, you might first dump the stack, then dump the register values using different actions. This example uses `appendFile` to append the output to a file and `showMessage` to display a message to the UI for the second command: ``` { "name": "Dump Stack and Registers", "description": "Dump the top of the stack, write to the log file and open it. Append the registers to a log file and display a message in the UI", "version": "1.0.0", "commands": [ { "command": "x/32x $sp", "actions": [ { "type": "log", "message": "Stack contents dumped." }, { "type": "writeFile", "filePath": "gdb_toolbox/reports/stack_output.log", "content": "${gdbOutput}" }, { "type": "openFile", "filePath": "gdb_toolbox/reports/stack_output.log", "lineNumber": 5 } ] }, { "command": "info registers", "actions": [ { "type": "appendFile", "filePath": "gdb_toolbox/reports/debug.log", "content": "${gdbOutput}" }, { "type": "showMessage", "level": "info", "message": "Register state saved to debug.log" } ] } ] } ``` ## Reference a script You can point to a script from within your custom script by using the `source` GDB command. For example: ``` { "command": "source {defaultScriptsDirectory}/dump_stack.gdb", "actions": [ { "type": "log", "message": "Stack contents dumped." } ] } ``` Tip Use the `{defaultScriptsDirectory}` variable instead of relative paths to ensure the script path resolves correctly across environments. This avoids errors where GDB cannot locate the file due to its working directory context. ## Capture and reuse values You can use the `setVariable` action to capture a value from the output of a GDB command using a regular expression. The following example runs `info registers pc`, uses a regex to extract the program counter (PC) value, and stores it in the `pc_value` variable. Only the first capturing group in the regex is assigned to the variable, which can then be reused in later actions. ``` { "name": "Capture Register Value", "description": "Extracts the PC register value from GDB output.", "version": "1.0.0", "commands": [ { "command": "info registers pc", "actions": [ { "type": "setVariable", "name": "pc_value", "regex": "pc\\s+0x([0-9a-fA-F]+)" }, { "type": "log", "message": "PC value is: ${pc_value}" } ] } ] } ``` Note In addition to variables set using `setVariable`, you can also use built-in variables such as `${gdbOutput}`, `${timestamp}`, `${input}`, and `${input:}` to make your scripts more dynamic. See [Variables](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/gdb-toolbox/gdb-toolbox-reference/#variables). ## Run conditional actions For more complex cases, you can use conditional logic to control which actions run based on values extracted from GDB output. This example demonstrates how to use the previously shown `setVariable` action to extract a value from the GDB output and conditionally run different actions depending on its value. ``` { "name": "Test Conditional Action", "description": "Demonstrates the use of the conditional action with Jexl expressions.", "version": "1.0.0", "commands": [ { "command": "echo 42", "actions": [ { "type": "setVariable", "name": "testValue", "regex": "(\\d+)" }, { "type": "conditional", "condition": "testValue == 42", "then": [ { "type": "showMessage", "message": "The testValue is 42! Condition passed.", "level": "info" } ], "else": [ { "type": "showMessage", "message": "The testValue is not 42. Condition failed.", "level": "warning" } ] } ] } ] } ``` ## Open the disassembly view This script opens the disassembly view at the current program counter using the `openDisassembly` action. It uses info registers pc to get the current address and then triggers the disassembly view. ``` { "name": "Open Disassembly at PC", "description": "Opens the disassembly view at the current program counter.", "version": "1.0.0", "commands": [ { "command": "info registers pc", "actions": [ { "type": "openDisassembly" } ] } ] } ``` ## Format the output This example shows how the `appendFile` action is used to store a formatted Markdown report using the `${markdownReport}` variable. ``` { "name": "Analyze Faults", "description": "Analyzes faults and exceptions in the target application.", "version": "1.0.0", "arch": "arm", "commands": [ { "command": "source {defaultScriptsDirectory}/fault-analyzer-arm.gdb", "actions": [ { "type": "appendFile", "filePath": "gdb_toolbox/reports/fault_analyzer.md", "content": "${markdownReport}" } ] } ] } ``` Tip You can modify how the Markdown report is generated by editing the `markdown-report.ts` file. Refer to the [CFS GitHub](https://github.com/analogdevicesinc/codefusion-studio) repository for build instructions and source code. # GDB Toolbox reference Each GDB Toolbox script is defined in a JSON file. The following GDB Toolbox script includes numbered fields that are described in the table below: ``` { "name": "Analyze Faults", // ① "description": "Analyzes faults and exceptions...", // ② "version": "1.0.0", // ③ "arch": "arm", // ④ "firmwarePlatform": "zephyr", // ⑤ "soc": "MAX32690", // ⑥ "commands": [ // ⑦ { "command": "source {defaultScriptsDirectory}/fault-analyzer-arm.gdb", // ⑬ "actions": [ // ⑭ { "type": "appendFile", // ⑮ "filePath": "gdb_toolbox/reports/${input:filename}.md", // ⑯ "content": "${markdownReport}" } ] } ], "inputs": [ // ⑧ { "id": "filename", // ⑨ "type": "inputBox", // ⑩ "title": "Log Filename", // ⑪ "prompt": "Enter a name for the log file" // ⑫ } ] } ``` | # | Field | Type | Description | Required | | --- | ------------------ | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | | 1 | `name` | string | The display name of the script as shown in the GDB Toolbox UI. | ✅ Yes | | 2 | `description` | string | A short description of the script. Appears in the Toolbox UI tooltip. | ✅ Yes | | 3 | `version` | string | The version of the script. For example: `1.0.0`. | ✅ Yes | | 4 | `arch` | string or array | Specifies the supported architecture, for example: `arm`, `riscv`. Accepts a single value or an array of values. Filters visibility during debug sessions. | ❌ No | | 5 | `firmwarePlatform` | string or array | Filters script visibility by platform. Accepts a single value or an array of values. For example: `zephyr`, `msdk`. | ❌ No | | 6 | `soc` | string or array | Filters script visibility by SoC name. Accepts a single value or an array of values. For example: `MAX32690`. | ❌ No | | 7 | `commands` | array | A list of GDB commands to run when the script runs. | ✅ Yes | | 8 | `inputs` | array | A list of user input prompts. | ❌ No | ## Fields inside each `inputs` object | # | Field | Type | Description | Required | | --- | --------- | ------ | ------------------------------------------------------------------------------------------------------------- | -------- | | 9 | `id` | string | Unique identifier for the prompt, referenced as `${input:}` in the `commands[]` and `actions[]` sections. | ✅ Yes | | 10 | `type` | string | The type of input prompt: `inputBox` for text entry or `quickPick` for predefined choices. | ✅ Yes | | 11 | `title` | string | The title of the input prompt displayed in the UI. | ❌ No | | 12 | `prompt` | string | The message displayed to the user, asking for input. | ❌ No | | - | `choices` | array | A list of predefined choices for `quickPick` inputs, such as `["A", "B", "C"]`. | ✅ Yes | ## Fields inside each `commands` object | # | Field | Type | Description | Required | | --- | --------- | ------ | ---------------------------------------------------------------------------------------------------------------------- | -------- | | 13 | `command` | string | The GDB command to run. Supports variables like `${input}` or `${gdbOutput}`. See [Variables](#variables) for details. | ✅ Yes | | 14 | `actions` | array | A list of actions to run after the command. | ❌ No | ## Fields inside each `actions` object | # | Field | Type | Description | Required | | --- | -------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------- | -------- | | 15 | `type` | string | The type of action to perform, such as: `log`, `writeFile`, `appendFile`, `showMessage`. See [Action types](#action-types) for details. | ✅ Yes | | 16 | (varies) | varies | Additional fields required depend on the `type`. | ✅ Yes | ### Action types Each action must include a `type`, followed by additional fields that depend on the action type. ``` { "type": "appendFile", "filePath": "gdb_toolbox/reports/fault_analyzer.md", "content": "${markdownReport}" } ``` The table below lists supported action types and their associated fields: | Type | Example fields | Description | Example | | --------------------------- | --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `appendFile` | `filePath`, `content` | Appends output to an existing file in the project directory. | [View](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/gdb-toolbox/gdb-toolbox-examples/#chain-together-multiple-commands) | | `conditional` | `condition`, `then`, `else` | Runs actions conditionally using a [Jexl](https://github.com/TomFrost/Jexl) expression. The expression can refer to variables defined earlier in the script using `setVariable`. If the condition evaluates to true, the `then` actions run; otherwise, the `else` actions run (if provided). | [View](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/gdb-toolbox/gdb-toolbox-examples/#run-conditional-actions) | | `log` | `message` | Writes a message to the **Debug Console**. | [View](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/gdb-toolbox/gdb-toolbox-examples/#log-contents-to-the-debug-console) | | `openDisassembly`[1](#fn:1) | | Opens the disassembly view at the current program counter (PC) address for the selected core. Useful for low-level inspection during a paused debug session.[1](#fn:1) | [View](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/gdb-toolbox/gdb-toolbox-examples/#open-the-disassembly-view) | | `openFile` | `filePath`, `lineNumber` | Opens a file in the editor. If `lineNumber` is provided, the editor scrolls to that line. `lineNumber` must be a number. | [View](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/gdb-toolbox/gdb-toolbox-examples/#save-and-view-output) | | `setVariable` | `name`, `regex` | Extracts a value from the GDB response using a `regex` with a capturing group. Only the first capturing group is stored. | [View](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/gdb-toolbox/gdb-toolbox-examples/#capture-and-reuse-values) | | `showMessage` | `message`, `level` | Displays a pop-up message in the UI. `level` must be one of `info`, `warning`, or `error`. Defaults to `info` if not provided. | [View](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/gdb-toolbox/gdb-toolbox-examples/#chain-together-multiple-commands) | | `writeFile` | `filePath`, `content` | Writes output to a file in the project directory. | [View](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/gdb-toolbox/gdb-toolbox-examples/#save-and-view-output) | ## Variables GDB Toolbox scripts support variables to make commands and actions dynamic. You can prompt users for input, reuse extracted values, or insert built-in values like timestamps. For example, this script prompts the user for a command, then writes the GDB output to a timestamped log file: ``` { "name": "Run GDB Command and Save Output", "description": "Lets you choose a GDB command and saves the output to a log file.", "version": "1.0.0", "commands": [ { "command": "${input:command}", "actions": [ { "type": "writeFile", "filePath": "logs/output_${timestamp}.log", "content": "${gdbOutput}" } ] } ], "inputs": [ { "id": "command", "type": "quickPick", "title": "Select a Command", "prompt": "Choose a command to run:", "choices": ["info registers", "info threads", "bt"] } ] } ``` The table below lists supported variables and how they can be used: | Variable | Description | Supported fields | | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- | | `${gdbOutput}` | Captures the output of the GDB command in the current `commands` section. | `content`, `message` | | `${input}` | Prompts the user to enter a value. | `command`, `filePath`, `content` | | `${input:}` | Prompts the user for input by referencing the `id` defined in the `inputs[]` section. | `command`, `filePath`, `content` | | `${markdownReport}` | Inserts a preformatted Markdown version of GDB output. See [Example](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/gdb-toolbox/gdb-toolbox-examples/#format-the-output) | `content` | | `${}`[2](#fn:2) | Variable set by `setVariable`. See [Example](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/gdb-toolbox/gdb-toolbox-examples/#capture-and-reuse-values) | `filePath`, `content`, `message`, `condition` | | `${timestamp}` | Inserts current ISO 8601 timestamp. | `filePath`, `content` | | `{defaultScriptsDirectory}` | Inserts the path to the default GDB scripts directory. Uses single-brace syntax. | `command` | | `{arch}` | Inserts the detected architecture (`arm`, `riscv`, or `xtensa`) of the active debug session. Useful for sourcing an architecture-specific `.gdb` helper, such as `source {defaultScriptsDirectory}/fault-analyzer-{arch}.gdb`. Uses single-brace syntax. | `command`, `filePath`, `content`, `message` | ______________________________________________________________________ 1. Due to a limitation in the Cortex-Debug extension, the `openDisassembly` action cannot currently navigate to a user-defined address. [↩](#fnref:1 "Jump back to footnote 1 in the text")[↩](#fnref2:1 "Jump back to footnote 1 in the text") 1. Use `${}` after defining it with a `setVariable action`. For example, if you use `"name": "pc_value"`, reference it later as `${pc_value}`. Only the first capturing group from the regex is stored. [↩](#fnref:2 "Jump back to footnote 2 in the text") # Using the GDB Toolbox The following is an overview of GDB Toolbox features and how to create, edit, and run GDB Toolbox scripts. macOS users On macOS, using GDB Toolbox requires an update to your `.vscode/launch.json`. If your target is MAX32657 or MAX32658 and you are using the `zephyr_arm_toolchain/1.0.1` package, Python 3.12 is also required. For details, see the [Release Notes](https://developer.analog.com/docs/codefusion-studio/latest/release-notes/2.2.1/#debugging). ## Access the GDB Toolbox 1. Select the **Run and Debug** icon on the activity bar, or use the **CFS: debug** task. 1. Set breakpoints in your application and click the **Start Debugging** icon (green play button) to the left of your selection or press **F5**. 1. When the debug session is paused or halted, the GDB Toolbox becomes visible in the sidebar. ## Create a script 1. Click **Create Script** . 1. Enter a name, for example: `Dump Stack`. 1. Press **Enter** to generate the initial template. 1. Modify the script using the JSON editor. 1. Save the script (`Ctrl+S` or `Cmd+S` on macOS). User scripts are automatically saved in the workspace’s `.cfs` folder: `<${userHome}>/cfs///.cfs/gdb_toolbox/configs` Note You can also manually drop files into the `gdb_toolbox` directory at `<${userHome}>/cfs/gdb_toolbox/configs`. Any valid script you add will automatically appear in the GDB Toolbox view the next time you start a debugging session. This directory is useful when storing scripts in a remote repository or syncing them across machines. ## Filter scripts 1. Click **Filter Scripts** 1. Enter a script name or description in the search field. 1. Press **Enter**. The GDB Toolbox view updates to show only matching scripts. 1. To edit the filter, click the filter label in the GDB Toolbox view and enter a new search value. 1. To clear the filter, click **Clear Filter** next to the filter label. ## Run a script To run a custom or built-in script: 1. Click the script name in the GDB Toolbox panel. Important Scripts only run when the debug session is paused. 1. Check the output in the **Debug Console**. 1. In multi-core projects, the **Debug Console** is context-aware and shows output for the selected core. Use the dropdown in the **Debug Console** to switch between cores. ## Edit a script To edit a custom script, hover over the script name and click **Edit Script** ## Delete a script Scripts can be deleted from the `gdb_toolbox` directory: `<${userHome}>/cfs///.cfs/gdb_toolbox/configs`. # Memory Viewer The Memory Viewer lets you inspect device memory during live and retrospective debug sessions. It is a multi-core-aware, CFS-native tool that integrates directly with the CodeFusion Studio debug infrastructure and replaces the Memory Viewer bundled with Cortex-Debug. It has three main areas: - **Toolbar** — address navigation, copy, refresh, and session status - **Memory grid** — scrollable hex and ASCII display - **Footer** — display settings ## Open the Memory Viewer The Memory Viewer is available as the **CFS Memory** tab in the bottom panel. It appears alongside the Terminal, Debug Console, and other panel views. To open the panel, start a debug session. The **CFS Memory** tab appears in the bottom panel automatically. You can also open it at any time from the Command Palette: press `Ctrl+Shift+P` (Windows/Linux) or `Cmd+Shift+P` (macOS) and run **CFS Memory: Focus on CFS Memory Viewer View**. ## Navigate to an address or symbol Use the **Go to** field in the toolbar to jump to a specific memory location. 1. In the **Go to** field, enter one of the following: - A hexadecimal address (for example, `0x20000000`) - A decimal address (for example, `536870912`) - A symbol name (for example, `count`) 1. Press **Enter**. For hex and decimal addresses, if the address is already within the loaded region, the grid scrolls to it without fetching new data. Otherwise, the memory grid loads data starting from that address. For symbol names, the viewer resolves the symbol to a memory address using a halted debug session and then loads memory at that address. In a multi-core environment, it uses the halted debug session selected in the Call Stack view, or falls back to the first available halted session. If the input cannot be resolved or the session is not in a state that allows a read, the **Go to** field shows an inline error: | Error | Message | | ----------------------- | ---------------------------------------------------------------------------- | | Invalid address | Enter a valid hex or decimal address (e.g., 0x2000 or 1024). | | Symbol not found | Could not find symbol in the current context. | | Symbol lookup timed out | Symbol query timed out. | | No active session | No active debug session. Start a debug session to view memory. | | Target running | Target not halted / Cannot execute this command while the target is running. | | Read in progress | Already reading memory data. Please wait. | ## Read memory The memory grid displays memory as a scrollable table with three columns: - **Address** — the memory address of the first byte in each row, displayed in hexadecimal - **Hex values** — the byte values in the selected display format, grouped according to the byte grouping setting - **ASCII** — a printable ASCII representation of the same bytes; non-printable characters appear as `.` Use the [display settings](#display-settings) in the footer to adjust how the grid presents data — switch between hexadecimal and decimal, change the number of columns, or group bytes together to get a layout that suits your needs. The grid uses infinite scroll. As you scroll toward the end of the loaded region, the viewer fetches the next chunk of memory from the debug adapter automatically. ## Copy memory To copy the contents of the memory grid: 1. Select a region of text in the grid. 1. Click the **Copy** button in the toolbar, or use your system copy shortcut. The viewer strips leading and trailing whitespace and line breaks from the copied text, so the result is a single contiguous string of hex or ASCII characters. The **Copy** and **Refresh** buttons are both disabled when no memory data is loaded. ## Refresh memory ### Auto-refresh Once you have navigated to an address, the viewer automatically re-reads memory at that address each time the debugger halts. This means you do not need to manually refresh between steps or breakpoints, the grid updates silently whenever execution stops. When a session resumes (continues), the viewer marks the current data as **stale** to indicate the values may no longer reflect the target state. ### Example: watching a variable update in memory A practical way to see auto-refresh in action is to watch a variable change value as you step through code. Declare a `static` variable in your source so the compiler gives it a fixed address in SRAM: ``` static int count = 0; ``` Then, once your debug session is halted at a breakpoint: 1. In the **Go to** field in the Memory Viewer, enter the symbol name `count` directly, or get its address by adding `&count` as a Watch expression in the debug sidebar or running `print &count` in the **Debug Console** and entering the address instead. Press **Enter**. 1. Set the footer to **1 Byte** grouping and **Decimal** display for easier reading. 1. Press F10 (**Step Over**) in the debug toolbar to advance one line at a time without descending into library function calls. Each time execution halts, the Memory Viewer re-reads the address automatically. You can watch the bytes at `count`'s address change as the value increments — without pressing **Refresh** manually. ### Manual refresh If you need to re-read memory while already halted (for example, after writing a value directly from the Debug Console), click the **Refresh** button in the toolbar. The button is disabled unless a session is halted and an address has been entered. ## Display settings The footer contains controls for adjusting how memory is formatted and laid out. ### Byte grouping Select the byte grouping label (for example, **1 Byte**) in the footer to cycle through grouping sizes: **1 Byte**, **2 Bytes**, **4 Bytes**. The grouping determines how many bytes are combined into a single hex cell. Combined with the column count, byte grouping controls how many bytes appear per row. For example, **2 Bytes** grouping with 8 columns displays 16 bytes per row. ### Endianness When byte grouping is set to **2 Bytes** or **4 Bytes**, an endianness control appears next to the byte grouping label. Click it to toggle between **Big Endian** and **Little Endian**. The endianness control is hidden when byte grouping is set to **1 Byte**. ### Columns Select the **Columns** dropdown to set the number of hex cells per row. Available options are **4**, **8**, **16** (default), **32**, or **64**. ### Display format Click the display format label (for example, **Hexadecimal**) to toggle between **Hexadecimal** and **Decimal** display of byte values. ## Session status The toolbar displays status information for the active debug session when one is present: - **Session name** — the name of the currently active debug session - **LIVE** or **POST-MORTEM** — whether the session is connected to a running target or reading from a core dump - **Halted** or **Stale** — whether the target is currently stopped (data is current) or running (data may be out of date) ## Retrospective debugging The Memory Viewer supports retrospective debugging sessions that read from a core dump file rather than a live target. These sessions are indicated by the **POST-MORTEM** badge in the toolbar. The viewer operates in read-only mode during retrospective sessions. To set up a retrospective session, see [Core Dump Analysis](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/core-dump-analysis/core-dump-analyze/index.md). Once the session is open, enter a memory address in the **Go to** field as you would in a live session. ## Empty states When memory cannot be displayed, the viewer shows a message explaining why: | State | Title | Description | | ------------------ | ----------------------- | --------------------------------------------------------------------------------- | | No debug session | No active debug session | Start a debug session to view memory. | | Target running | Execution is running | Halt execution to read memory. Memory can only be read when the target is halted. | | No address entered | No memory loaded | Enter an address in 'Go to' (e.g., 0x20000000) to inspect target memory. | ## Multi-core support The Memory Viewer tracks all active debug sessions simultaneously. In a multi-core environment, it displays memory for the session you select in the call stack view and updates automatically when you switch between sessions. When you switch context, the viewer: 1. Identifies the newly active session. 1. If that session is halted, fetches memory at the last requested address. 1. If that session is running, marks the current data as stale. Each session's lifecycle (start, halt, continue, and stop) is tracked independently, so switching between cores does not disrupt memory data from other sessions. ## Error handling The Memory Viewer handles debug adapter and transport errors without blocking your workflow: - **Unmapped addresses**: If you navigate to an address that cannot be read, the viewer shows an error message: `Read memory error: Unable to read memory`. - **Read timeout**: If a memory read does not complete within five seconds, the request is cancelled and an error is shown. - **Session disconnect**: If the debug adapter disconnects or the session terminates, the viewer clears the memory data and updates the session list. - **Target running**: The viewer does not issue read requests while the target is running — use **Refresh** after the target halts. # Developer Tools In addition to the System Planner Configuration Tools dashboard, CodeFusion Studio provides other utilities to support system development. These include: - The [ELF File Explorer](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/developer-tools/elf-file-explorer/index.md) – Enables graphical analysis of ELF files. - The [Device Tree View](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/developer-tools/device-tree-view/index.md) – Allows reviewing of hardware components in Zephyr. - The [Catalog Manager](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/developer-tools/catalog-manager/index.md) – Keeps SoC data up to date - The [West Editor](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/developer-tools/west-editor/index.md) – Enables viewing and editing the projects, groups, and group filter of a `west.yml` manifest. - The [AI-Assisted Development Skills](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/developer-tools/cfs-ai-skills/index.md) – Give your AI assistant (GitHub Copilot, Claude Code, OpenAI Codex, and other supported agents) doc-backed answers about CodeFusion Studio. # Catalog Manager The Catalog Manager is a background service in CodeFusion Studio that retrieves and maintains the SoC catalog. This catalog provides the latest metadata for supported System-on-Chip (SoC) devices, ensuring access to up-to-date information on documentation, cores, boards, and packages. ## Settings During installation, a backup copy of the catalog is stored in the `/Data/Soc/catalog.zip` directory. The working copy of the catalog manager is stored at: `<${userHome}>/cfs//.catalog`. The Catalog Manager regularly checks for updates to the SoC catalog. If using **Offline Mode**, the most recently cached catalog data is used. ## CFS Settings Note For details on accessing CFS settings, see [CFS Settings](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/build-and-flash/cfs-settings/index.md). The Catalog Manager has the following user and workspace CFS settings: - **Offline Mode** (`cfs.catalogManager.checkForUpdates`) – Use to work with a local cached catalog if an internet connection is unavailable. - **Catalog Location** (`cfs.catalogManager.catalogLocation`) – Specifies the directory where the working copy of the catalog manager is stored. This location contains temporary files that store processed SoC data. ## **Troubleshooting** Refer to the following table for Catalog Manager errors and their resolutions. | **Error Message** | **Possible Cause** | **Resolution** | | ---------------------------------------------------------------- | -------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Catalog Manager failed to initialize with error: [error message] | There is an issue with the catalog zip, or the CFS settings need to be reviewed. | Verify that `/Data/Soc/catalog.zip` exists. Check if any `cfs.catalogManager` settings have changed, including `catalogLocation`. If needed, restore correct settings and restart CodeFusion Studio. | | Failed to get catalog: [error details] | The Catalog Manager was unable to fetch the catalog from the cloud. | Check your internet connection. If the cloud service is unavailable, enable **Offline Mode**. If needed delete the `.catalog` folder and restart CodeFusion Studio. | # AI-Assisted Development Skills CodeFusion Studio (CFS) provides skills that help your AI assistant answer questions about CFS, use the `cfsutil` command-line utility, and evaluate AI models on ADI hardware: - **`cfs-docs`** — answers questions about installing, setting up, using, and troubleshooting CodeFusion Studio by reading the relevant documentation. - **`cfs-cli`** — provides guidance on the `cfsutil` command-line utility, including code generation, workspace and project management, package installation, ELF analysis, and AI model workflows. - **`cfs-workspace-bootstrap`** — resolves a SoC target and template, creates or assesses a CFS workspace, checks its development packages and configuration, and optionally runs its first build. - **`cfs-ai-evaluation`** — runs an end-to-end AI model evaluation on ADI silicon. It starts from model import and workspace creation, moves through build, flash, and inference, then returns a structured evidence bundle. If the **Zephyr Single Core TensorFlow AI Inference Profiling** template is available for your target and its Zephyr package includes Zephelin (`modules/zephelin`), the skill uses it to capture inference traces, including per-layer timing. If not, it falls back to the standard AI-enabled TensorFlow Lite for Microcontrollers (TFLM) template, which confirms that inference runs but returns limited results. In CodeFusion Studio 2.4.0, MAX32657 uses this fallback because the AI inference profiling template is not available for it. - **`cfs-ai-report`** — turns an evaluation evidence bundle into an engineering report, correlating static estimates with measured on-silicon behavior to identify bottlenecks and recommend optimizations. Before you use the AI evaluation skills `cfs-ai-evaluation` builds firmware and flashes it to a board. Before you start: - Install CFS 2.4.0 or later. - Install Python 3 and make sure it is on your `PATH`. The skill's scripts use only the Python standard library, so no extra packages are required. - Connect your board and its debug probe to your computer. See [Connect hardware](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/connect-hardware/index.md) for cabling details. The evaluation replaces the firmware on the board. `cfs-ai-report` only reads an existing evaluation and does not need a board. The skills follow the open Agent Skills standard, so they work across GitHub Copilot, Claude Code, OpenAI Codex, and other supported agents. Install them as described in the following sections. ## Access in GitHub Copilot Once the CFS VS Code extension is installed, the skills are available in GitHub Copilot Chat — no separate installation is required. Note Using the skills in Copilot requires **VS Code 1.109 or later**. On earlier versions the extension still installs, but the skills are not available in Copilot Chat. Update VS Code to use them. 1. Install the [GitHub Copilot extension](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot). 1. Open GitHub Copilot Chat (`Ctrl+Alt+I` / `Cmd+Shift+I`). 1. Ask a CodeFusion Studio question — for example, *"How do I create a new workspace in CFS?"* for product documentation, or a CLI question like *"How do I list tasks for a workspace?"* Copilot uses the relevant skill to answer. ## Access in Claude Code For Claude Code, install the skills as a plugin from the CodeFusion Studio marketplace: ``` /plugin marketplace add analogdevicesinc/codefusion-studio /plugin install cfs-skills@adi-codefusion-studio ``` Windows: `Filename too long` error If adding the marketplace fails with `Filename too long`, turn on long path support in Git, then run `/plugin marketplace add` again. You can ignore any `Permission denied (publickey)` error that follows. ``` git config --global core.longpaths true ``` Once installed, invoke the skills with: - `/cfs-docs` (or `/cfs-skills:cfs-docs` when installed through the plugin) for product documentation questions. - `/cfs-cli` (or `/cfs-skills:cfs-cli`) for CLI command reference. - `/cfs-workspace-bootstrap` (or `/cfs-skills:cfs-workspace-bootstrap`) for workspace setup, SDK readiness, and first-build verification. - `/cfs-ai-evaluation` (or `/cfs-skills:cfs-ai-evaluation`) for running an AI model import to evaluation on ADI silicon and related workflow steps. - `/cfs-ai-report` (or `/cfs-skills:cfs-ai-report`) to generate in-depth analysis report for AI end-to-end evaluation report. ## Access in other assistants The skills follow the open [Agent Skills](https://agentskills.io) standard and work in compatible agents such as OpenAI Codex and Cursor. Use this command to detect installed agents and add the skills to each: ``` npx skills add https://github.com/analogdevicesinc/codefusion-studio/tree/main/packages/cfs-skills ``` Invoke the skills using the method supported by your assistant. ## Update the skills Warning Claude Code and `npx skills` install the skills for the latest CFS release. If you stay on an earlier release, don't update the skills or turn on auto-update, because the latest skills might describe commands that your release doesn't have. New CodeFusion Studio releases can add skills and update existing ones. How you get the latest skills depends on how you installed them: - **GitHub Copilot** — the skills are bundled with the CFS VS Code extension. Update the extension to update the skills. - **Claude Code** — turn on auto-update for the `adi-codefusion-studio` marketplace, which is off by default. Enter `/plugin`, select the **Marketplaces** tab, select **adi-codefusion-studio**, and then select **Enable auto-update**. If auto-update is off, select **Update marketplace** on the same screen to update the skills manually. Alternatively, run these commands from a terminal: ``` claude plugin marketplace update adi-codefusion-studio claude plugin update cfs-skills@adi-codefusion-studio ``` If Claude Code is already running, run `/reload-plugins` or restart it to load the updated skills. For details, see [Turn auto-update on or off for a marketplace](https://code.claude.com/docs/en/discover-plugins#turn-auto-update-on-or-off-for-a-marketplace) in the Claude Code documentation. - **Other assistants** — run the `npx skills add` command from [Access in other assistants](#access-in-other-assistants) again to install the latest version of every skill, including new ones. # Device Tree View In Zephyr, a **device tree** (or **devicetree**) is a hierarchical data structure primarily used to describe the hardware available on supported boards, as well as their initial configurations. Use the Device Tree View in CodeFusion Studio to review hardware components and your system's hardware configuration. Access the Device Tree View using the following methods: - Build a Zephyr project, then select the project from the **Context Filter** in the CFS sidebar. The Device Tree View automatically displays the project's `zephyr.dts` file. - Open any Device Tree file (`*.dtsi` or `*.overlay`) in the VS Code window. ## Additional information The Device Tree View in CodeFusion Studio is based on the Zephyr devicetree specification. For more details, refer to the [Zephyr Devicetree documentation](https://docs.zephyrproject.org/latest/build/dts/index.html#devicetree-guide). You can also use the `cfsutil` command line utility to parse device tree files from the terminal. For more details, refer to [CFS command line utility](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/device-tree/index.md). # ELF File Explorer The ELF File Explorer enables you to quickly parse and analyze compiled binaries, reducing time spent debugging and profiling while providing deeper insight into the application structure. ## Supported formats The CodeFusion Studio ELF File Explorer can open and display the contents of any file with a valid ELF header. The following file extensions are supported: AXF, BIN, DOJ, DXE, ELF, EXE, KO, O, OUT, PRX, and SO. ## Open an ELF file You can open an ELF file from the VS Code Activity Bar or the Explorer. ### Open from Activity bar 1. Click the CodeFusion Studio icon in the VS Code Activity Bar. 1. Under **ELF File Explorer**, click **Open ELF File**. 1. Navigate to the ELF file in your project’s build folder (for example, `m4/build/m4.elf`). ### Open from Explorer Click any ELF file in the VS Code Explorer to view its contents. ## Navigation Navigation icons are displayed on the left side of the page for Statistics, Metadata, Symbols, and Memory Layout.\ Help is available from the help icon in the top right corner. ## Statistics The Statistics page provides high level information about the ELF file and it's contents. Information is displayed across five sections. ### File overview The File overview section summarizes key metadata for the ELF file: - **Format:** ELF 32-bit or 64-bit. - **Data Encoding:** Endianness (little or big endian). - **File Type:** Executable, relocatable, shared object, or core file. - **Architecture:** Target architecture (for example, Arm or x86). - **ABI Version:** Application Binary Interface version. - **Debug Info:** Indicates if the file contains debugging information. - **Stripping:** Indicates if the file has been stripped of symbol information. ### Main section sizes The Main section sizes shows the total memory used in the ELF, with a breakdown of the main data types. - **Text:** Executable code. - **Data:** Initialized global and static variables. - **Bss:** Zero-initialized data, both explicitly zero and uninitialized data. ### Symbol types The Symbol types section shows the count of functions and variables by binding type: **global**, **local**, and **weak**. Filters above the table allow you to view **all**, **text**, **data**, or **bss** symbols. ### Sections The Sections table provides details on all the sections contained within the ELF. ### Largest symbols The Largest symbols table lists the ten largest symbols in the ELF file.\ Filters above the table allow you to view **all**, **text**, **data**, or **bss** symbols. ## Metadata The Metadata page displays a summary of the sizes of each data type (**text**, **data**, and **bss**) and the full contents of the ELF header.\ This includes information about the architecture, data layout, ELF version, contents, and flags. ### Header Info The ELF header contains metadata about the ELF file, including its type, architecture, entry point, and program and section headers. This information is required by the operating system to correctly load and execute the file. ### AEABI Attributes The AEABI (Arm Embedded Application Binary Interface) attributes in an ELF file provide important metadata about the binary, such as the target architecture, floating-point configuration, and optimization level. These attributes ensure compatibility and optimize performance by conveying specific details about how the binary was built, allowing tools and runtime environments to correctly interpret and execute the code. ### Heuristic Information Indicates the presence of heuristic information detected in the ELF file for Zephyr and MSDK firmware platforms.\ This information may include Flash and RAM sizes and other available metadata. ## Symbols Explorer The Symbol explorer provides a table of all symbols contained in the ELF file. This table can be sorted by clicking the title of any column and filtered using SQL queries for flexible data access. Note The Symbol Explorer query engine is based on AlaSQL. As a result, supported syntax and functions are limited to what AlaSQL provides. See the [AlaSQL](https://github.com/alasql/alasql) documentation for the full set of supported features and limitations. The default query (`SELECT *`) includes the following fields. You can control which fields are displayed and their order by replacing `*` with a comma-separated list of field names. For example, `SELECT size, name` displays the **size** column followed by **name**. | Column | Type | Description | | ---------- | ------- | ------------------------------------------------------------------------------------------------------------ | | id | integer | The unique identifier for the symbol | | name | string | The name of the symbol | | type | string | The type of the symbol, indicating what kind of entity it represents | | address | integer | The memory address where the symbol is located | | section | string | The section of the program in which the symbol is defined | | size | integer | The size of the symbol in bytes | | localstack | integer | The worst stack usage size for a function (only local stack, not considering functions called) | | stack | integer | The worst stack usage size for a function (considering functions called) | | bind | string | The linkage type of the symbol (for example, local, global) | | visibility | string | The visibility of the symbol, indicating its accessibility from other modules (for example, default, hidden) | | path | string | The source file location where the symbol is defined | Note The localstack, stack and path columns are only present when the relevant data is present in the ELF. For localstack and stack, the following GCC switches are required during build: `-fdump-rtl-expand -fstack-usage -fdump-rtl-dfinish -fdump-ipa-cgraph -gdwarf-4`. These switches are enabled by default in CodeFusion Studio projects. ### Generating additional compiler data To generate stack usage (SU) and call graph (CGRAPH) with GCC (required for worst-case stack usage calculations, and call graph navigation), compile your code with the following flags: `-fstack-usage -fdump-ipa-cgraph -gdwarf-4`. These flags will force the compiler to generate debug information using the DWARF-4 standard, which is the version currently supported by the built-in DWARF parser. #### Zephyr For Zephyr projects, add the following flags to CMakeLists.txt: ``` zephyr_cc_option(-fstack-usage)   zephyr_cc_option(-fdump-ipa-cgraph)   zephyr_cc_option(-gdwarf-4) ``` #### MSDK For MSDK projects, add the following flags to the Makefile: ```   PROJ_CFLAGS += -fstack-usage   PROJ_CFLAGS += -fdump-ipa-cgraph   PROJ_CFLAGS += -gdwarf-4 ``` Note Stack usage and call graph data can only be parsed when generated by GCC. ### Filters The table can be filtered using SQL queries, where the table name is **symbols** and the fields are as above. Tip A quick lookup field above the table allows filtering by name or address. Enter a text or numerical value and press **Enter** to generate a query. ### Queries Queries can be saved using the save icon to the right of the query field.\ Click the **Saved queries** button to the right of the query field to view a list of saved queries, including pre-populated queries. Queries can be edited or deleted from the list by clicking the pencil or trash can icons. Note Saved queries are stored in user settings and are available across workspaces. Any valid SQL construct is supported, including `WHERE`, `ORDER`, `LIMIT`, `LIKE` and `REGEXP`. Some examples of queries are as follows. | Filter | Query | | ----------------------------- | ----------------------------------------------------------------------- | | Specific colums | `SELECT name,address FROM symbols` | | Symbols larger than 100 bytes | `SELECT * FROM symbols WHERE size > 100` | | Largest symbols | `SELECT * FROM symbols ORDER BY size DESC LIMIT 10` | | Symbols between addresses | `SELECT * FROM symbols WHERE address BETWEEN 0x10000000 AND 0x20000000` | | Symbols from a specific file | `SELECT * FROM symbols WHERE path LIKE '%main.c%'` | | Symbols starting with string | `SELECT * FROM symbols WHERE name REGEXP '^init.*'` | ## Memory Layout The Memory Layout page provides a visual representation of the memory map on the left and a table of memory segments on the right. Memory usage is displayed as follows: - Stripes: Unused memory. - Blank: Read/write memory. - Filled: Read only memory. Note Overlapping segments are rendered as smaller rectangles to the right of the main segment. Small segments may appear larger than their actual size for readability. Refer to the size values for accuracy. Hovering over a segment in the memory map displays a summary of the memory segment and highlights the corresponding entry in the table. Hovering over a segment in the table highlights the corresponding segment in the memory map. ### Segments The Segments table provides a high-level summary of each memory segment. The table includes the following fields: | Field | Description | | ------- | ----------------------------------------------------------------------------- | | Id | The unique identifier for the segment | | Type | The type of the segment, indicating its purpose (e.g., loadable, dynamic) | | Address | The start address of the segment | | Size | The size of the segment in bytes | | Flags | Permissions and attributes for the segment (R: read, W: write, X: executable) | | Align | The alignment requirement of the segment in memory in bytes | Clicking a segment displays the sections contained within it. ### Sections in a Segment This table summarizes all sections in the selected memory segment. The Sections in a Segment table includes the following fields: | Field | Description | | ------- | ----------------------------------------------------------------------- | | Id | The unique identifier for the section | | Name | The name of the section | | Address | The start address of the section | | Size | The size of the section in bytes | | Flags | Permissions and attributes for the section described in the flags table | | Type | The type of the section, indicating its contents and purpose | | Flag | Description | | ---- | ---------------------------- | | W | write | | A | alloc | | X | execute | | M | merge | | S | strings | | I | info | | L | link order | | O | extra OS processing required | | G | group | | T | TLS | | C | compressed | | x | unknown | | o | OS specific | | E | exclude | | D | mbind | | y | purecode | | p | processor specific | Click a section to view the symbols it contains. To return to Segments, click the **Segments** link in the breadcrumb at the top left of the page. ### Symbols in a Section This table lists symbols within the selected section. The Symbols in a section table includes the following fields: | Field | Description | | ---------- | ------------------------------------------------------------------------------------------------------------ | | Id | The unique identifier for the symbol | | Name | The name of the symbol | | Address | The memory address where the symbol is located | | Size | The size of the symbol in bytes | | Bind | The linkage type of the symbol (for example: local, global) | | Visibility | The visibility of the symbol, indicating its accessibility from other modules (for example: default, hidden) | To return to the Sections Segments, click on the appropriate link in the breadcrumb at the top left of the page. # West Editor The `west.yml` manifest lists the projects (Git repositories) in a west workspace, and the revision of each one. The West Editor shows the manifest of your workspace as cards instead of YAML. Use it to: - View the current status of each project in your workspace. - Search and filter the project list. - Edit the revision and groups of a project, and turn groups on or off in the group filter. - Review the remotes and imported manifests that the manifest uses. The editor changes only the fields it shows and leaves the rest of the file as it was. ## Open the West Editor The West Editor opens by default when you open a file named `west.yml`. To open a manifest, use the `west.yml` of a west workspace that you manage yourself, such as one you create with `west init`. In a west workspace, the main manifest is in the manifest repository, for example `zephyr/west.yml`. You can also open imported manifests that have other file names from the **Manifests** tab. Tip Zephyr projects that CodeFusion Studio creates use the west workspace that ships with the installed Zephyr package, which you can't modify. To view this west workspace in the West Editor, open the [Packages view](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/view-installed-packages/index.md) in the CodeFusion Studio sidebar, expand a Zephyr package, and open its `zephyr/west.yml` file. Files in the Packages view open in read-only mode. The West Editor shows your changes to that file, but they aren't saved. Use the file to see how the editor works. ### Switch between the West Editor and text To switch between the West Editor and the plain text view of a `west.yml` file, use the buttons in the editor title bar: | Icon | Action | Description | | ---- | -------------------------------- | ------------------------------------------------------------------------------ | | | **Open west.yml in West Editor** | Open the file in the West Editor. Appears when the file is open as text. | | | **Open west.yml as Text** | Open the file as plain text. Appears when the file is open in the West Editor. | You can also switch views from the editor menu in the breadcrumb bar. Select **West Editor - CodeFusion Studio** or **Text Editor**. The menu shows the current editor, such as **West Editor**. Both views open the same file, so changes you make in one view appear in the other, and undo, redo, and save work across both. To choose which editor opens by default for `west.yml` files, open the editor dropdown in the breadcrumb bar, then select **Set Default for '\*\*/west.yml'**. ## The West Editor interface The editor has four tabs. ### Projects The **Projects** tab shows one card for each project in the manifest. Each card shows: - The project name - The status badge, when available, that compares the project in your local workspace with what `west.yml` defines - The **Revision** that the manifest defines for the project - The **Groups** the project belongs to - The path west checks the project out to, and the URL west fetches it from The status badge shows the first of the following that applies to the project: | Status | Meaning | | ------------------ | ---------------------------------------------------------------------------------------------------------------------------- | | Disabled | West treats the project as inactive, for example because the group filter disables its groups. | | Not Cloned | The project is enabled but hasn't been cloned, or has been removed from your local workspace. Run `west update` to clone it. | | Different Revision | The checked-out commit doesn't match the revision that `west.yml` defines. | | Modified Files | The project has uncommitted changes to tracked files. | | Untracked Files | The project has files that Git doesn't track. | | In Sync | The project in your local workspace matches what `west.yml` defines, with no local changes. | The editor reads statuses from your workspace with `west` and Git, and refreshes them when you save the file. ### Remotes The **Remotes** tab lists the remotes in the manifest. Each card shows the remote name and the base URL (`url-base`) that projects on the remote resolve against. Select **Copy URL** to copy the URL to the clipboard. ### Manifests The **Manifests** tab lists the imported manifest files. Each card shows the path of the imported file and the project it comes from. Select the arrow icon (**Open manifest**) to open the imported file in the West Editor in a new tab. ### Groups The **Groups** tab lists every group that the manifest mentions, including groups that only appear in the `group-filter` setting. For each group, select one of the following: - **Enabled:** turns the group on. Its projects are used. - **Disabled:** turns the group off. A project that belongs only to disabled groups is inactive, and shows **Disabled** on the **Projects** tab. - **None:** leaves the group out of the group filter. West then treats the group as on. The editor records these choices in the `group-filter` setting of `west.yml`, as `+` and `-` entries. For how west uses groups, see [Project groups](https://docs.zephyrproject.org/latest/develop/west/manifest.html#west-manifest-groups) in the Zephyr documentation. ## Find projects To find projects, enter text in **Search Projects**. The editor filters the list to the projects whose names contain the text, ignoring case, and highlights the matching text in each name. Use the filter chips to filter the list by project status, group, or remote. ## Edit a manifest To edit the manifest of a west workspace that you manage, open the `west.yml` file, make your changes, and save the file. Your changes apply to the open file and are written to disk when you save. The editor then refreshes the project statuses from your workspace. If the editor shows `Could not sync west.yml:`, it couldn't read or update the manifest. See [Fix manifest errors](#fix-manifest-errors). ### Edit a project revision On the **Projects** tab, edit the **Revision** field on the project card. ### Add a group to a project 1. On the project card, select the **+** icon (**Add Group**) next to **Groups**. 1. In the **Select a Group** list, which shows the groups in the manifest that the project doesn't have yet, do one of the following: - Select a group. - Select **Create a Group**, enter a name, and press **Enter** or select the check mark. To cancel, press **Esc** or select the **×**. A group name can't contain whitespace, commas, or colons, and can't start with `-` or `+`. ### Remove a group from a project On the project card, select the **×** on a listed group (**Remove group**). ### Remove a project On the project card, select the trash icon (**Remove project**). ### Set the group filter On the **Groups** tab, set each group to **Enabled**, **Disabled**, or **None**. For what each option means, see [Groups](#groups). ## Add a project In the current version, the West Editor doesn't support adding projects. To add one, open `west.yml` as text and add the project entry. The editor then shows the new project as a card. ## Fix manifest errors The editor shows `Could not sync west.yml:` when it can't read the manifest or can't apply a change to it. - If `west.yml` isn't valid YAML, or doesn't match the structure that west expects, the editor can't read it and doesn't show the manifest. Select **Open west.yml as Text** to fix the file. The editor updates when you change the file. - If the editor can't apply a change to the file, the manifest stays on screen and the change isn't saved. # Installation To install and set up CodeFusion Studio for [supported processors](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/about/supported-processors/index.md), complete the following steps: 1. Review the [software requirements](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/software-requirements/index.md) and install VS Code. 1. [Run the CodeFusion Studio SDK installer](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/install-cfs/index.md). Follow the prompts to complete setup. 1. [Install the VS Code extension](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/install-extensions/index.md) to integrate CodeFusion Studio into VS Code. 1. [Set the SDK path](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/set-up-cfs/index.md) so the extension can find your CFS SDK installation. 1. Use the [Package Manager](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/index.md) to install the toolchains, SDKs, and other components. # Install CodeFusion Studio Before you install CodeFusion Studio (CFS), select the option that applies to you. No additional preparation is required. Continue to [Install the CFS SDK](#install-the-cfs-sdk). Before installing the new SDK, [uninstall the previous version and fully reset the CFS package state](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/uninstall/uninstall-cfs/index.md). This reset removes all installed packages, cached data, and custom remotes. Then continue to [Install the CFS SDK](#install-the-cfs-sdk). ## Install the CFS SDK ### Download Download the CodeFusion Studio installer (version 2.4.0) for your operating system: - [Windows](https://download.analog.com/codefusion-studio/2.4.0/CodeFusionStudio_2.4.0.exe) - [Linux](https://download.analog.com/codefusion-studio/2.4.0/CodeFusionStudio_2.4.0.run) - [macOS](https://download.analog.com/codefusion-studio/2.4.0/CodeFusionStudio_2.4.0.dmg) ### Option 1: Install using the setup wizard 1. Double-click the downloaded `.exe` file to open the setup wizard, and approve the administrator prompt when it appears. 1. Specify the installation folder when prompted. We recommend the default location. Warning The installation path cannot contain spaces. 1. The installer includes three components: - **CodeFusion Studio VS Code Extension** (selected by default) — copies the VSIX file to your system. After the setup wizard finishes, [install the extension in VS Code](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/install-extensions/index.md) from the copied VSIX or the VS Code Marketplace. - **OpenOCD for ADI processors** (selected by default) - **ADI ICE Drivers** — select this if you plan to debug SHARC-FX processors, or [install them later](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-drivers/install-ice-drivers/index.md). Select the components you want to install, then select **Next**. 1. Review and accept the license agreement. 1. Select the Start Menu folder for the shortcut. 1. Review your selections and click **Install** to start the installation. When the installation is complete, click **Finish**. 1. Grant the downloaded installer execute permissions from a terminal: ``` chmod a+x CodeFusionStudio_2.4.0.run ``` 1. Install the packages that the installer requires to run: ``` sudo apt install libfontconfig1 libdbus-1-3 libxcb-cursor0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-shape0 libxcb-xinerama0 libxkbcommon-x11-0 libgl1 ``` 1. Run the installer from the terminal to open the setup wizard: ``` ./CodeFusionStudio_2.4.0.run ``` Note The installer doesn't require `sudo` to run. Running it with `sudo` additionally configures USB permissions for ICE emulators automatically — see [Install ICE drivers](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-drivers/install-ice-drivers/index.md). 1. Specify the installation folder when prompted. We recommend the default location. Warning The installation path cannot contain spaces. 1. The installer includes two components, both selected by default: - **CodeFusion Studio VS Code Extension** — copies the VSIX file to your system. After the setup wizard finishes, [install the extension in VS Code](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/install-extensions/index.md) from the copied VSIX or the VS Code Marketplace. - **OpenOCD for ADI processors** Select the components you want to install, then select **Next**. 1. Review and accept the license agreement. 1. Review selections and click **Install** to start the installation. When the installation is complete, click **Finish** to close the wizard. 1. Double-click the downloaded `.dmg` file, then run the installer app inside to open the setup wizard. 1. Specify the installation folder when prompted. We recommend the default location. Warning The installation path cannot contain spaces. 1. The installer includes two components, both selected by default: - **CodeFusion Studio VS Code Extension** — copies the VSIX file to your system. After the setup wizard finishes, [install the extension in VS Code](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/install-extensions/index.md) from the copied VSIX or the VS Code Marketplace. - **OpenOCD for ADI processors** Select the components you want to install, then select **Next**. 1. Review and accept the license agreement. 1. Review your selections and click **Install** to start the installation. When the installation is complete, click **Finish** to close the wizard. ### Option 2: Install using the command line Invoke the installer with the `install` switch to install the full package to the default location, with the following switches: | Switch | Effect | | -------- | ------------------------------ | | `--al` | Accept license | | `--am` | Accept messages | | `-c` | Confirms prompts | | `--help` | Provide help output | | `-t` | Specify the path to install to | Note When using the `--al` switch, review the [CodeFusion Studio license and third-party notices](https://download.analog.com/codefusion-studio/versions.html) for the version before running the command that agrees to the terms. The same license texts are installed in the `Licenses` directory of your installation. To run the installer from the command line, use the following: Run the command from an elevated command prompt (right-click **Command Prompt** and select **Run as administrator**). ``` CodeFusionStudio_2.4.0.exe install --am --al -c ``` Running the installer with `sudo` also configures USB permissions for ICE emulators automatically — see [Install ICE drivers](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-drivers/install-ice-drivers/index.md). ``` sudo apt install libfontconfig1 libdbus-1-3 libxcb-cursor0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-shape0 libxcb-xinerama0 libxkbcommon-x11-0 libgl1 chmod a+x CodeFusionStudio_2.4.0.run ./CodeFusionStudio_2.4.0.run install --am --al -c ``` ``` hdiutil mount CodeFusionStudio_2.4.0.dmg -mountpoint cfs cfs/CodeFusionStudio_2.4.0.app/Contents/MacOS/CodeFusionStudio_2.4.0 install --am --al -c hdiutil unmount cfs ``` ## Next steps Next, [install the CodeFusion Studio VS Code extension](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/install-extensions/index.md). # Install the CodeFusion Studio VS Code extension You can install the CodeFusion Studio extension using one of the following methods. ## Option 1: Install from within VS Code (recommended) 1. Open **Visual Studio Code**. 1. Go to **Extensions** (or press `Ctrl+Shift+X` / `Cmd+Shift+X`). 1. Search for **CodeFusion Studio**. 1. Select the extension and click **Install**. 1. Restart VS Code or reload the VS Code window: open the **Command Palette** (`Ctrl+Shift+P` / `Cmd+Shift+P`) and run **Developer: Reload Window**. ## Option 2: Install from a VSIX file Use the VSIX file included with CodeFusion Studio to reinstall or update the CodeFusion Studio extension when you cannot install it from the Visual Studio Marketplace. Important The Microsoft C/C++, Cortex-Debug, and Zephelin Trace Viewer extensions must already be installed. This procedure cannot install them, so it cannot be used for a first-time installation on a machine without Marketplace access. 1. Open Visual Studio Code. 1. Select the **Extensions** icon from the activity bar. 1. Click **Views and More Actions** (...) and select **Install from VSIX**. 1. Navigate to the `/VSCode` directory. The exact location depends on your installation path. The following are the default locations: - Linux: `/home//analog/cfs//VSCode` - macOS: `/Users//analog/cfs//VSCode` - Windows: `C:\analog\cfs\\VSCode` 1. Select the `cfs-ide-*.vsix` file to install. 1. Restart VS Code for the changes to take effect. ## Verify installation To confirm that the extension installed correctly: 1. In VS Code, open **Extensions** (`Ctrl+Shift+X` / `Cmd+Shift+X`). 1. Search for **CodeFusion Studio** again. 1. The extension appears in the **Installed** list. Note VS Code updates the extension automatically when a new version becomes available. To control when the extension updates, see [Manage extension updates and versions](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/manage-extension-versions/index.md). ## Next steps To complete installation, [set the SDK path](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/set-up-cfs/index.md) so the extension can find your CFS SDK installation. # Manage extension updates and versions The CodeFusion Studio extension and software development kit (SDK) must use compatible versions. By default, VS Code updates extensions automatically. If the extension updates but the SDK does not, the versions can become incompatible. See [Compatibility rules](#compatibility-rules). Use the procedures on this page to keep the extension aligned with a specific CFS SDK version. Tip If the CFS extension updated unexpectedly, [disable automatic extension updates](#disable-automatic-extension-updates) and [install a specific version](#install-a-specific-version). ## Disable automatic extension updates To disable auto-update for the CFS extension only: 1. Open the **Extensions** panel in VS Code. 1. Search for **CodeFusion Studio** and select it to open the details page. 1. Under the extension title, clear the **Auto Update** checkbox. This allows you to keep using the extension version bundled with a specific CFS SDK. ## Install a specific version You can install a specific version of the CodeFusion Studio extension or any of its dependent extensions (such as Zephelin Trace Viewer or Cortex-Debug) from the VS Code Extensions panel. 1. Open **Extensions** (`Ctrl+Shift+X` / `Cmd+Shift+X`) and search for the extension by name. 1. Select the extension to open the details page, then clear the **Auto Update** checkbox to prevent VS Code from overwriting your selection. 1. Select the **Manage** (gear) icon on the extension details page, or right-click the extension (Ctrl+click on macOS), and select **Install Specific Version**. 1. Select the version you want to install. The extension version must be compatible with the installed CFS SDK — see [Compatibility rules](#compatibility-rules). 1. Reload the VS Code window: open the Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`) and run **Developer: Reload Window**. For the CFS extension, you can also install a specific version using **Install from VSIX** — see [Install from a VSIX file](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/install-extensions/#option-2-install-from-a-vsix-file). ## Review dependent extensions The CodeFusion Studio extension depends on other VS Code extensions (including Microsoft C/C++, Cortex-Debug, and Zephelin Trace Viewer) to provide debugging and development features. In most cases, no additional action is required. - **First install of the CFS extension:** VS Code installs missing dependent extensions automatically when it can access the Visual Studio Marketplace. - **Dependencies already installed:** VS Code keeps existing versions unchanged. - **Upgrading the CFS extension:** Upgrading CFS does not itself update dependent extensions. VS Code updates each dependency according to its own automatic update setting. To view all dependent extensions, open the **Extensions** panel, select **CodeFusion Studio**, and open the **Dependencies** tab. If you encounter issues with a dependent extension, select **Update** if available, or [install a specific version](#install-a-specific-version). Note When you uninstall the CFS extension, VS Code doesn't remove dependent extensions. For details, see [Uninstall CodeFusion Studio](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/uninstall/uninstall-cfs/index.md). ## Compatibility rules Each CFS extension version relies on functionality provided by the CFS SDK it was released with. If the versions are incompatible, CFS displays a warning at startup (`The selected CFS SDK (vX.Y.Z) is not compatible with the extension (vA.B.C).`), and features that depend on newer SDK components may not work as expected. CFS considers the SDK and extension compatible when: - The major versions match. For example, extension 2.x.x requires SDK 2.x.x. - The SDK minor version is the same or higher than the extension minor version. For example, extension 2.1.x requires SDK 2.1.x or higher, and is not compatible with SDK 2.0.x or any 1.x.x version. - Patch versions do not affect compatibility. For example, extension 2.0.1 and SDK 2.0.0 are compatible. | Extension version | Compatible SDK versions | Not compatible | | ----------------- | -------------------------- | ------------------------------------------------------------------------ | | **X.Y.Z** | **X.N.\*** where **N ≥ Y** | **X.N.\*** where **N < Y**, or any version with a major other than **X** | Check the installed extension version Open the **Extensions** panel in VS Code and select **CodeFusion Studio**. The installed version is shown at the top of the details panel. # Set the CodeFusion Studio SDK path Set the SDK path whether you are installing CodeFusion Studio (CFS) for the first time or upgrading from an earlier version. The SDK path is the directory that the [CodeFusion Studio installer](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/install-cfs/index.md) installed the CFS SDK into (for example, `C:\analog\cfs\` on Windows). The `cfs.sdk.path` setting tells the CFS VS Code extension which CFS SDK installation to use. ## Option 1: Set the path using the VS Code UI 1. Open the **Command Palette** (`Ctrl+Shift+P` on Windows/Linux, `⇧⌘P` on macOS). 1. Run **(CFS) Select the CodeFusion Studio path from the discovered installations.** 1. Select the CFS SDK you want to use. Each entry shows the installation path and its version. The SDK version must be compatible with your extension version — see [Compatibility rules](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/manage-extension-versions/#compatibility-rules). Note Only installations in the default location are discovered. If you installed the CFS SDK in a custom directory, select **Browse...** and then select that directory. Tip CodeFusion Studio prompts you if the path is missing, does not point to a valid CFS SDK, or points to an SDK that is not compatible with the extension: Select **Choose SDK path** to open the same list of discovered installations, or select **Download SDK** to open the CodeFusion Studio product page and download the installer. To run the installer, see [Install CodeFusion Studio](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/install-cfs/index.md). ## Option 2: Update the path manually If the Command Palette action does not list the installation you need, or you prefer to set the path yourself, edit the setting directly: 1. Open VS Code Settings from the **Manage** gear icon, or using the keyboard shortcut (`Ctrl+,` on Windows/Linux, `⌘,` on macOS). 1. Search for `cfs.sdk.path`. 1. Update the path to point to the installation directory of the CFS SDK you want to use. The default CFS SDK installation directories are: - Linux: `/home//analog/cfs/` - macOS: `/Users//analog/cfs/` - Windows: `C:\analog\cfs\` Note Replace `` with the SDK version installed on your system. If you selected a custom directory during installation, ensure that the setting points to that location. No need to restart VS Code Changing the SDK path restarts the VS Code extension host automatically, which ends any active debug session. If CodeFusion Studio still uses the previous SDK, run **Developer: Restart Extension Host** from the Command Palette, or restart VS Code. ## Next steps Use the [Package Manager](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/index.md) to install additional components. # Software requirements ## Host OS support CodeFusion Studio and its extension are supported on the following host operating systems: - Windows 11 (64-bit) - macOS 15 and macOS 26 (ARM64) - Ubuntu 22.04 and 24.04 (x86-64) *Earlier or newer OS versions may work but are not officially supported.* ## Software dependencies The CodeFusion Studio VS Code extension depends on [Microsoft Visual Studio Code](https://code.visualstudio.com/) version **1.101** or later (recommended). Note Older versions of VS Code (such as 1.98 and earlier) are not supported due to known layout issues in the **System Planner > Pin Config** canvas. ## Install Visual Studio Code 1. Download the installer from the [Visual Studio Code download page](https://code.visualstudio.com/download). 1. Run the installer and accept the license agreement. 1. When prompted, select the installation folder. We recommend the default location. 1. Follow the on-screen prompts, keeping the default settings, including the defaults on the **Select Additional Tasks** page. 1. Select **Install**. 1. Open Visual Studio Code to verify that it opens correctly. 1. Download the **x64** `.deb` package from the [Visual Studio Code download page](https://code.visualstudio.com/download). 1. Install the downloaded package from a terminal: ``` sudo apt install ./code__amd64.deb ``` Replace `code__amd64.deb` with the name of the downloaded file. When asked to confirm the required disk space, enter `Y` to continue. 1. Open Visual Studio Code from the terminal to verify that it opens correctly: ``` code ``` 1. Download the macOS (Apple silicon) build from the [Visual Studio Code download page](https://code.visualstudio.com/download). 1. Double-click the downloaded archive to extract **Visual Studio Code.app**. 1. Move `Visual Studio Code.app` to the `Applications` folder. 1. Open Visual Studio Code to verify that it opens correctly. ## Next steps After installing the required software, [install CFS](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/install-cfs/index.md). # Package Manager The CodeFusion Studio installer copies the VS Code extension VSIX to your system and installs OpenOCD for ADI processors, the base data models package, and the base plugins package by default. Toolchains, SDKs, and additional plugins are delivered as versioned packages hosted on a remote package server. Use the Package Manager to download and install these packages locally, allowing you to add and update only the components you need. To get started: 1. Install and remove packages from the [Package Manager UI](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/manage-packages-ide/index.md). 1. View the [available packages](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/available-packages/index.md) you can install. 1. View the files in [installed packages](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/view-installed-packages/index.md). ## More options If you prefer not to use the Package Manager UI, or need to resolve an issue, the following articles support the package workflow: - [Manage packages from the Command Palette](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/manage-packages-command-palette/index.md) - [Manage packages from the command line (`cfsutil`)](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/manage-packages-cfsutil/index.md) - [Install required packages](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/install-required/index.md) - [Log in to access restricted packages](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/auth/index.md) - [Troubleshoot package issues](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/troubleshooting-package-manager/index.md) # Access restricted packages (using myAnalog login) Some components in CodeFusion Studio are distributed as restricted packages. These packages are available through managed package remotes, and may require you to authenticate with your myAnalog account before they can be installed. After you log in, CodeFusion Studio configures the managed remotes automatically. Note If you use `cfsutil` for automation or CI/CD workflows, you can authenticate using an API key instead of an interactive myAnalog login. Set the `CFS_API_KEY` environment variable to your key value before running a command. See [API key authentication](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/apikey-auth/index.md) for details. Note Access to some packages is restricted to authorized users. If you believe you should have access but cannot see the required packages, contact your account representative. ## Login to myAnalog Before you access restricted packages, you must first log in to myAnalog. Tip If you've logged in before, you can check your login status with: - **Command Palette:** `(CFS) myAnalog Status` - **CLI:** `cfsutil myanalog status` ### Option 1: From the Command Palette 1. Open the **Command Palette** from the **Manage** gear icon or using the keyboard shortcut (`Ctrl+Shift+P` or `Cmd+Shift+P` on macOS). 1. Type `(CFS) myAnalog Login` and press Enter, or select it from the list. 1. Click **Open** to launch the browser. If the browser does not open, use the **Copy** button to copy the link and paste it in your browser. 1. On the myAnalog login page, use the sign-in method associated with your account: - **Email and password:** Enter your registered email address and password, then select **Log in**. If you don’t have a myAnalog account, [register at analog.com/myAnalog](https://www.analog.com/myAnalog). - **Google Account:** Select **Google Account**, then sign in with your Google credentials. - **LinkedIn Account:** Select **LinkedIn Account**, then sign in with your LinkedIn credentials. - **Analog Devices Account:** If you are an Analog Devices employee or contractor on a managed device, select **Analog Devices Account**, then sign in with your Analog Devices credentials. 1. When the **Sign-in Successful** page appears, close the browser and return to VS Code. 1. A VS Code notification confirms you are logged in. ### Option 2: From the command line `cfsutil` To access `cfsutil`, open a new terminal (**View > Terminal** or `` Ctrl+` ``). Note If you want to run `cfsutil` from a system terminal outside VS Code, refer to the note in the **Optional: add a custom package remote** section below for the executable path to use on your platform. Complete the following steps: 1. In the terminal panel, click the dropdown arrow next to the **+** icon. 1. Select **CFS Terminal** from the list. 1. Authenticate using your myAnalog account. A browser opens automatically. ``` cfsutil myanalog login ``` 1. On the myAnalog login page, use the sign-in method associated with your account: - **Email and password:** Enter your registered email address and password, then select **Log in**. If you don’t have a myAnalog account, [register at analog.com/myAnalog](https://www.analog.com/myAnalog). - **Google Account:** Select **Google Account**, then sign in with your Google credentials. - **LinkedIn Account:** Select **LinkedIn Account**, then sign in with your LinkedIn credentials. - **Analog Devices Account:** If you are an Analog Devices employee or contractor on a managed device, select **Analog Devices Account**, then sign in with your Analog Devices credentials. If the browser does not open, copy the authentication link from the terminal and paste it into your browser manually. 1. When the **Sign-in Successful** page appears, close the browser and return to VS Code. Important For session-expiration and reauthentication guidance, see [Restricted packages not appearing](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/troubleshooting-package-manager/#restricted-packages-not-appearing). ## Optional: add a custom package remote You only need this section if your organization provides an additional custom package server. ### Option 1: Add a custom remote from the Command Palette 1. Open the **Command Palette** from the **Manage** gear icon or use the keyboard shortcut (`Ctrl+Shift+P` or `Cmd+Shift+P` on macOS). 1. Type `(CFS) Add Custom Package Remote` and press Enter, or select it from the list. 1. Enter the remote name and URL. 1. Select the authentication method for that custom remote. Important To cancel or restart this process, press **Escape**. ### Option 2: Add a custom remote from the command line `cfsutil` 1. In the terminal panel, click the dropdown arrow next to the **+** icon. 1. Select **CFS Terminal** from the list. 1. Run the following command to add the custom remote: ``` cfsutil pkg add-remote ``` Example ``` cfsutil pkg add-remote myserver https://my.server.url ``` 1. Configure authentication for the custom remote: ``` cfsutil pkg auth-remote --user ``` Example ``` cfsutil pkg auth-remote myserver --user USERNAME ``` You will be prompted to enter the password. Note To use no authentication for a custom remote, run `cfsutil pkg auth-remote --none`. Note To run `cfsutil` from a system terminal outside VS Code, run the following executable: - **Windows:** `/Utils/cfsutil/bin/cfsutil.cmd`. - **Linux/macOS:** `/Utils/cfsutil/bin/cfsutil`. ### Option 3: Add a custom remote from the Package Manager Use the **Remotes** tab in the Package Manager UI. For steps, see [Add a custom remote](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/manage-packages-ide/#add-a-custom-remote). Important Your myAnalog login session may expire after a period of inactivity. If this happens, you will need to reauthenticate to access restricted packages. For more details, see [Restricted packages not appearing](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/troubleshooting-package-manager/#restricted-packages-not-appearing). ## Verify your setup After login, verify that managed remotes are configured correctly. Run the following command in the **CFS Terminal**: ``` cfsutil pkg list-remotes ``` ## Next steps Now that you are logged in, you can proceed to install packages in CodeFusion Studio. Choose your preferred method below: - To install packages from the Command Palette, see [Manage packages from VS Code Command Palette](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/manage-packages-command-palette/index.md). - To install packages using the command line, see [Manage packages from the command line (`cfsutil`)](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/manage-packages-cfsutil/index.md). # Commonly available packages The following packages and components are commonly available in CodeFusion Studio. Some are installed by default as part of the CodeFusion Studio installation, while others must be installed separately. You can install packages with the [**Package Manager**](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/manage-packages-ide/index.md), the [**Command Palette**](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/manage-packages-command-palette/index.md), or the [command line](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/manage-packages-cfsutil/index.md). Tip The packages listed here are the ones available for this release of CodeFusion Studio. **Package Manager**, the **Command Palette**, and `cfsutil` also list packages for earlier releases. If you're unsure which packages to install, follow your workspace's `.cfs/.cfsdependencies` manifest, which lists the packages the workspace requires. Use the **Required** filter in the [**Package Manager** UI](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/manage-packages-ide/#filters) to find them, or run [`cfsutil validate dependencies`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/validate/#validate-dependencies) to check which are missing. ## All projects | Package name | Version | Installation | Purpose | | ---------------------- | ------- | -------------------- | -------------------------------------------------------------------- | | `cfs_base_data_models` | `2.4.0` | Installed by default | SoC data models for System Planner configuration | | `cfs_base_plugins` | `2.4.0` | Installed by default | Base plugins for workspace creation, System Planner, code generation | ## MSDK projects | Package name | Version | Use for | Installation | Purpose | | --------------------- | -------- | -------------------- | ------------------ | ------------------------------------------------------------------------------- | | `msdk` | `2.4.0` | MSDK projects | Install separately | Develop MAX32xxx/MAX7800x projects | | `gnu_arm_toolchain` | `14.3.1` | MSDK ARM projects | Install separately | GNU ARM bare-metal toolchain. Previously installed by the CFS installer. | | `gnu_riscv_toolchain` | `14.2.3` | MSDK RISC-V projects | Install separately | xPack GNU RISC-V Embedded toolchain. Previously installed by the CFS installer. | ## SHARC-FX projects | Package name | Version | Use for | Installation | Purpose | | -------------------------- | -------- | ---------------------------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `xtensa_sharcfx_toolchain` | `15.5.2` | SHARC-FX projects | Install separately | Xtensa toolchain for the SHARC-FX cores (Windows and Linux). Required by all SHARC-FX project templates. Requires a myAnalog login. See [Access restricted packages](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/auth/index.md). | | `cortex-m_sharcfx_sdk` | `1.0.0` | SHARC-FX Cortex-M33 projects | Install separately | SDK for the Cortex-M33 core on SHARC-FX processors (Windows and Linux). Previously installed by the CFS installer. Installs `gnu_arm_toolchain` automatically as a dependency. | ## Zephyr projects | Package name | Version | Use for | Installation | Purpose | | ---------------------- | ----------- | ---------------------------------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `zephyr` | `4.4.2` | Zephyr projects | Install separately | Zephyr 4.4.2 support for MAX32xxx/MAX7800x SoCs. For MAX32657 and MAX32658, use `zephyr` `4.4.0-b.1`. | | `zephyr` | `4.4.0-b.1` | Zephyr projects on MAX32657 and MAX32658 | Install separately | Zephyr 4.4.0 support for MAX32657 and MAX32658. See the [MAX32657/MAX32658 Zephyr 4.4.0 tutorial](https://developer.analog.com/docs/codefusion-studio/latest/tutorials/max32657-zephyr/index.md). | | `zephyr_arm_toolchain` | `1.0.3` | Zephyr projects | Installed as dependency | ARM toolchain for Zephyr. Installed automatically when you install a `zephyr` 4.4.x package. | | `gperf` | `3.1.0` | Zephyr userspace projects | Install separately | Perfect hash function generator required to build Zephyr applications that enable userspace (`CONFIG_USERSPACE=y`). When you create a workspace from the **Zephyr Single Core Hello World User** template, CFS detects that `gperf` is required and prompts you to install it. | Note Only packages relevant to your permissions are displayed. If no packages are available or all are already installed, an information message will appear instead. # Install required packages This page helps you resolve missing or incompatible packages in CodeFusion Studio. You may arrive here from: - **System Planner** — when opening a `.cfsconfig` file that requires a missing data model or plugin version - **Workspace Creation Wizard** — when no workspace templates are available for your selected SoC ## How to resolve missing packages The resolution method depends on where you encountered the error: - **From System Planner?** Use the [automated version resolution](#system-planner-automated-version-resolution-recommended) workflow (recommended) - **From Workspace Creation Wizard?** Use the [Package Manager UI](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/manage-packages-ide/index.md) to install template plugins. For other options, see [manual package installation](#manual-package-installation-fallback). Platform compatibility Some workspace templates are only available on specific operating systems. For example, SHARC-FX templates are only supported on Windows. If the Workspace Creation Wizard shows that no workspace templates are available and you believe compatible plugins are already installed, the templates may not be available for your operating system. ## System Planner automated version resolution (recommended) When you open a `.cfsconfig` file in System Planner but do not have the required data model or plugin version, a **Critical Error** screen appears with automated resolution options. ### Resolution steps 1. **Review the error details**\ The error screen displays: - The missing component type (**Missing Data Model** or **Missing Plugin**) - The missing component and required version (for example, **System Planner requires MAX32690 TQFN data model version 1.2.100 which is not available**) 1. **Select a resolution option from the menu**\ Under **Resolution Options**, available options depend on what versions are installed locally and available remotely: - **Upgrade to compatible locally-available version X.X.X**\ A compatible version is already installed. System Planner updates your configuration file to use this version without downloading anything. No remote access or not logged in to myAnalog If CodeFusion Studio can't access the remote package repository — because of a network issue or because you aren't logged in to myAnalog — only locally installed compatible versions (if available) appear in the menu. See [Troubleshooting](#troubleshooting) if you're stuck. - **Install requested version X.X.X**\ The exact version you need is available remotely. System Planner downloads and installs it. - **Upgrade to latest compatible downloadable version X.X.X**\ A compatible version is available remotely, and either no compatible version is installed locally or the remote version is newer than the best compatible version installed locally. System Planner downloads and installs the latest compatible version. 1. **(Optional) Configure future version handling**\ Check or uncheck **Allow all future compatible versions**: - **Checked**: Uses a version range (for example, `^1.2.148`) to allow automatic compatibility with future updates - **Unchecked**: Uses an exact version (for example, `1.2.148`) to prevent automatic updates 1. **Click Continue**\ System Planner installs packages if needed and updates your configuration file. Click **Continue to System Planner** to proceed to the System Planner Configuration Tools dashboard. ### Troubleshooting If the automated resolution fails (no menu options appear, installation errors occur, or buttons are disabled), complete the following: - Verify you are logged in to myAnalog if accessing restricted packages (see [Log in to access restricted Packages](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/auth/index.md)) - Click **Retry Updates** if available - Install the packages directly with the [Package Manager UI](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/manage-packages-ide/index.md) or select another [manual package installation method](#manual-package-installation-fallback) ## Manual package installation (fallback) If the automated resolution prompt doesn't work, or you need to install packages outside of the System Planner error flow, see: - [Manage packages from the Package Manager UI](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/manage-packages-ide/index.md) - [Manage Packages (Command Palette)](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/manage-packages-command-palette/index.md) - [Manage Packages from the command line (`cfsutil`)](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/manage-packages-cfsutil/index.md) - [Log in to access restricted Packages](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/auth/index.md) # Manage packages from the command line (`cfsutil`) You can use `cfsutil` to install, view, and remove packages in CodeFusion Studio as they become available. To access `cfsutil`, open a new terminal (**View > Terminal** or `` Ctrl+` ``). Then complete the following steps: Note To run cfsutil from a system terminal outside VS Code, see [CFS command line utility](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/index.md). 1. In the terminal panel, click the dropdown arrow next to the **+** icon. 1. Select **CFS Terminal** from the list. 1. Run your command, for example: ``` cfsutil pkg --help ``` For additional information see [CFS Terminal](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/build-and-flash/cfs-terminal/index.md). ## Find available packages To see what packages you can install, run: ``` cfsutil pkg search "*" ``` Note Wrap the pattern in quotes to avoid issues with wildcard expansion. You can also view details about a package, whether or not it’s installed: Example: View package details ``` cfsutil pkg info zephyr/4.3.0 ``` ## Install a package To install a package, run the following command with either a package reference or a path to a manifest file. The package reference is written in the format `/`. ``` cfsutil pkg install ``` Only one version of a package can be active at a time. Previously installed versions remain in the local cache and can be reinstalled if needed. See the following examples: Example: Install CFS plugins for workspace creation, System Planner configuration, and code generation ``` cfsutil pkg install cfs_base_plugins/ ``` Note Replace `` with the latest version shown in the Package Manager. Example: Install CFS data models for System Planner ``` cfsutil pkg install cfs_base_data_models/ ``` Example: Install Zephyr to develop Zephyr projects ``` cfsutil pkg install zephyr/ ``` Example: Install MSDK to develop MAX32xxx and MAX7800x projects ``` cfsutil pkg install msdk/ ``` Install packages from a workspace manifest file ``` cfsutil pkg install /path/to/workspace/.cfs/.cfsdependencies ``` Note For more information about manifest files, see the [cfsutil reference](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/package-manager/#manifest-files). ### Install cached packages or packages with version ranges The `cfsutil pkg install` command supports semantic versioning, allowing you to specify version ranges instead of exact versions. This allows compatible updates to be installed automatically. Version ranges use the `MAJOR.MINOR.PATCH` format (for example, 2.1.0). Version range syntax limitations The `/` format supports a single version token only. This can be: - An exact version (for example, `2.1.0`) - A caret range (`^2.0.0`) - A tilde range (`~2.0.0`) - A single comparison operator (`>=2.0.0`) Compound constraints (for example, `>=2.0.0 <3.0.0`), logical OR (`||`), and wildcard patterns (`2.1.*`) are only supported when installing packages from a [manifest file](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/package-manager/#manifest-files). #### Caret ranges (^) Use the caret (^) to allow minor and patch updates within the same major version. Install the latest compatible CFS plugins (2.x.x) ``` cfsutil pkg install "cfs_base_plugins/^2.0.0" ``` This installs the newest available 2.x.x version, such as 2.4.0. #### Tilde ranges (~) Use the tilde (`~`) to allow patch updates within the same minor version. Install latest CFS plugins 2.0.x patch version ``` cfsutil pkg install "cfs_base_plugins/~2.0.0" ``` This installs the newest available 2.0.x version, such as 2.0.1, but not 2.1.0 or 2.4.0. #### Comparison operators Use comparison operators to define explicit version constraints. Install latest available CFS plugins ``` cfsutil pkg install "cfs_base_plugins/>=2.0.0" ``` Install any Zephyr version below 4.3.0 ``` cfsutil pkg install "zephyr/<4.3.0" ``` Default behavior Package versions follow [semantic versioning](https://semver.org/) in the form `MAJOR.MINOR.PATCH` with optional pre-release identifiers (for example, `-b.1`). When a version range is specified (for example, using caret `^`, tilde `~`, or comparison operators), Package Manager installs the newest available stable (non–pre-release) version that satisfies the constraint. For example, `cfsutil pkg install "cfs_base_data_models/~2.0.0"` installs the newest available `2.0.x` version. Pre-release package versions are installed only when you explicitly specify the pre-release tag (for example, `packageName/1.0.0-b.1`). Important Always wrap version specifications containing special characters in quotes to prevent shell interpretation issues. #### Use locally cached packages only Use the `-l` or `--local` flag to use only packages already cached locally. Install a specific package from local cache only (offline mode) ``` cfsutil pkg install cfs_base_data_models/2.4.0 --local ``` ### Install from a local tarball Use the `-t` or `--tar` flag to install a package from a tarball on disk, for example in an offline environment. On a machine without network access, also use the `--local` flag. Install a package from a tarball on an offline machine ``` cfsutil pkg install --tar /path/to/plugins.tgz --local ``` Note Specify either a package reference or `--tar`, not both. For details, including how to create a tarball, see [Install from a local tarball](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/package-manager/#install-from-a-local-tarball). ## Verify installation To check what you’ve installed run: ``` cfsutil pkg list ``` To narrow the results, use a pattern with a wildcard: Example: List all Zephyr versions installed ``` cfsutil pkg list "zephyr*" ``` To find where an installed package lives on disk, run: ``` cfsutil pkg path ``` Example: Find the installed path of the Zephyr package ``` cfsutil pkg path zephyr ``` ## Uninstall a package To uninstall a package, first check if other packages depend on it: ``` cfsutil pkg local-consumers ``` Example: Check for dependent packages before uninstalling ``` cfsutil pkg local-consumers msdk ``` If dependencies are listed, you must uninstall those dependent packages first. If no dependencies are listed, you can uninstall the package. Only include the package name (not the version) in the command: ``` cfsutil pkg uninstall ``` Example: Uninstall the MSDK package ``` cfsutil pkg uninstall msdk ``` ## Clean up unused packages 1. After uninstalling packages, you can remove any unused cached packages from your local storage: ``` cfsutil pkg delete "*" ``` This command deletes all packages that are not actively installed. 1. Run the following command to view the remaining installed packages. ``` cfsutil pkg list ``` 1. You can then uninstall any additional packages using the following command: ``` cfsutil pkg uninstall ``` 1. Run the delete command again to complete the cleanup. Tip To view the full list of commands, run `cfsutil pkg --help` or refer to [cfsutil](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/package-manager/index.md). Each command also provides its own help. For example: `cfsutil pkg install --help`. # Manage packages from VS Code Command Palette You can use VS Code Command Palette to install, view, and remove packages in CodeFusion Studio as they become available. To access Package Manager from the Command Palette: 1. Click the gear icon in the lower-left corner of VS Code, then choose **Command Palette**. Alternatively, use the keyboard shortcut (`Ctrl+Shift+P` / `Cmd+Shift+P`). 1. Type `package`. ## Install a package 1. In the **Command Palette**, type `(CFS) Install Package` and press Enter. 1. A list of available packages appears. 1. Select the package you need. 1. A progress window shows the installation status. When finished, a confirmation message appears. Note Some packages may require license acceptance before installation. If prompted, review the license agreement and any referenced URLs, then select **Accept** (or **Accept All**) to proceed. ## Check for package updates To check whether newer versions of your installed packages are available, open the **Command Palette** and run `(CFS) Check for Package Updates`. If there are no updates, a message confirms that all packages are up to date. The check requires a `.cfsdependencies` file in your workspace. CodeFusion Studio also checks automatically when you open a workspace. See [Check for package updates](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/manage-packages-ide/#check-for-package-updates). To turn off the automatic check, open **Settings** in VS Code, search for **Check For Updates**, and clear the **Cfs › Package Manager: Check For Updates** (`cfs.packageManager.checkForUpdates`) checkbox. Alternatively, set `"cfs.packageManager.checkForUpdates": false` in your user `settings.json` file. To turn it off for one workspace only, select the **Workspace** tab in **Settings** before you clear the checkbox. ## Uninstall a package 1. To uninstall a package, open the **Command Palette** and run `(CFS) Uninstall Package`. 1. Select a package from the list of installed packages. A progress window will appear during uninstallation, followed by a confirmation message. ## Delete a package from cache When a package is uninstalled, it remains in the local cache so it can be reinstalled without re-downloading. Use this command to remove those cached packages and free up local storage. 1. Open the **Command Palette** and run `(CFS) Delete Package from Cache`. 1. A list of previously installed packages that now reside in the cache appears. Select one or more packages to delete. Click **OK**. 1. A progress window shows the deletion status. When finished, a confirmation message appears. Tip For information on installing packages from the local cache, see [Install from local cache](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/package-manager/#install-from-local-cache). # Manage packages from the Package Manager UI The Package Manager UI lets you browse, filter, and install packages directly in VS Code without using the Command Palette or command line. You can view package details, select versions, review licenses, uninstall packages, and manage package remotes — all from a single panel. ## Open the Package Manager To open the Package Manager UI: 1. Click the CodeFusion Studio icon in the VS Code activity bar. 1. Click **Manage Packages** in the **Home** section. Tip You can also open the Package Manager from the Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`) by running **(CFS) Open Package Manager**. ## Sign in to access restricted packages Some packages require a myAnalog account. When the Package Manager opens, a sign-in prompt appears at the top of the panel if you are not already logged in. You can dismiss the prompt and browse public packages without signing in. To sign in: 1. Select **Sign In**. A browser prompt appears in VS Code. 1. Select **Open** to open the browser. If the browser does not open, select **Copy** to copy the link and paste it into your browser manually. 1. On the myAnalog login page, use the sign-in method associated with your account: - **Email and password:** Enter your registered email address and password, then select **Log in**. If you don’t have a myAnalog account, [register at analog.com/myAnalog](https://www.analog.com/myAnalog). - **Google Account:** Select **Google Account**, then sign in with your Google credentials. - **LinkedIn Account:** Select **LinkedIn Account**, then sign in with your LinkedIn credentials. - **Analog Devices Account:** If you are an Analog Devices employee or contractor on a managed device, select **Analog Devices Account**, then sign in with your Analog Devices credentials. 1. When the **Sign-in Successful** page appears, close the browser and return to VS Code. 1. A VS Code notification confirms you are logged in. Tip To check your login status at any time, run **(CFS) myAnalog Status** from the Command Palette. For session expiry and reauthentication guidance, see [Access restricted packages](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/auth/index.md). ## Browse and filter packages The Package Manager displays all available packages in a paginated list. Use the search bar and filters to find what you need. ### Search Enter a package name, SoC, or description in the search bar to filter packages. The total number of matching packages updates as you type. ### Filters The following filters are available: | Filter | Options | | ------------ | ----------------------------------------------------------------------------------------------------- | | **Required** | Show only packages required by the current workspace, as declared in its `.cfsdependencies` manifests | | **Status** | Installed, Not Installed, Update Available | | **SoC** | Filter by supported processor | | **Type** | Data Model, Plugin, SDK, Toolchain | Select multiple options within a filter to broaden results. Combine filters to narrow the list. The **Required** filter combines requirements from every `.cfsdependencies` manifest in the open workspace, including nested directories but excluding `node_modules` and `.git`. The standard workspace manifest is in the `.cfs` directory, for example: `C:\Users\\cfs\2.4.0\my-sample-workspace\.cfs\.cfsdependencies`. The manifest also drives the notification that appears when you open a workspace with missing packages, which offers to install them. For the manifest format, see [Manifest files](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/package-manager/#manifest-files). ### Select All Use the **Select All** checkbox to select all packages on the current page. ## View package details Select the expand arrow on a package card to view details: - **Description** — what the package provides - **Type** — Data Model, Plugin, SDK, or Toolchain - **CFS compatibility** — which CFS versions this package supports - **License** — the license name with a **View License** link - **Cached versions** — versions already downloaded locally - **Supported SoCs** — processors this package targets ## Select a version Each package card includes a version menu. The installed version and latest version are labeled in the list. Select a different version before installing if needed. If a workspace requires a specific version range, the required range appears beneath the version menu. Selecting a version outside the required range shows a warning. ## Install packages 1. Check the box on one or more package cards to select them. 1. Select **Continue**. 1. A review summary lists all selected packages and their versions. Any dependencies required by the selected packages are resolved and shown automatically. Review the details, then select **Continue**. If the packages you selected pull in incompatible versions of the same package — whether that package is one of your direct selections or a dependency they share — the review summary screen reports the conflict and **Continue** is unavailable until you resolve it. For steps, see [Dependency conflicts between selected packages](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/troubleshooting-package-manager/#dependency-conflicts-between-selected-packages). 1. The license review screen appears. Review each license — a checkmark indicates you have opened it. The **Accept License(s) and Install** button becomes active once all licenses have been reviewed. Select **Accept License(s) and Install** to proceed. 1. Installation begins. A progress indicator appears during installation. Note Built-in packages ship with CFS and cannot be uninstalled. They are indicated by a tool icon () rather than a delete icon. ## Check for package updates CodeFusion Studio checks for newer versions of the installed packages listed in your workspace `.cfsdependencies` files when you open the workspace. If updates are available, a notification lists the packages. 1. Select **Open Package Manager**. 1. From the **Status** filter, select **Update Available** to list the packages with newer versions. 1. [Install the new versions](#install-packages), including reviewing any licenses. Tip To check for updates manually or turn off the automatic check, see [Check for package updates](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/manage-packages-command-palette/#check-for-package-updates). ## Uninstall packages 1. Select the delete icon to the right of the package card (installed packages only). 1. If the package has dependent packages that will also be removed, a confirmation modal lists them. 1. Select **Uninstall** (or **Yes, Uninstall All** when dependent packages are listed) to confirm, or **Cancel** to exit without changes. Select **Don't show this message again** in the confirmation modal to skip the confirmation dialog for future uninstalls where the package has no dependents. The confirmation dialog always appears when dependent packages will also be removed. Tip To remove cached packages after uninstalling, use the **(CFS) Delete Package from Cache** command in the Command Palette. See [Manage packages from the Command Palette](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/manage-packages-command-palette/#delete-a-package-from-cache). ## Manage package remotes Use the **Remotes** tab to manage the package remotes that the Package Manager gets packages from. Select **Remotes** in the Package Manager. The tab lists every remote, both managed and custom. Each remote card shows the remote name, its URL, and a switch to turn the remote on or off. Cards also show the authentication method (**No Auth**, **myAnalog**, or **Username / Password**), except for disabled custom remotes. Custom remotes also show a **Custom** badge, a **Configure authentication** action, and a **Delete** action. After you sign in to myAnalog, CodeFusion Studio configures the managed remotes automatically. You only need to add a custom remote if your organization provides an additional package server, for example a private repository for packages you develop in-house. ### Add a custom remote 1. Select **Add remote**. 1. In the Add Custom Remote panel, enter a **Remote name**. Use only letters, numbers, hyphens, and underscores. The name must be unique. 1. Enter the **Remote URL**. The URL must start with `http` or `https`. 1. Under Authentication, select **No Authentication** or **Username / Password**. If you select Username / Password, enter the **Username** and **Password**. 1. Select **Add Remote**. If you enter credentials, CodeFusion Studio logs in to the remote immediately. Note You can't change the name or URL of a remote after you add it. To use a different name or URL, delete the remote and add it again. ### Enable or disable a remote Turn the remote on or off using the switch on its card. CodeFusion Studio doesn't use a disabled remote to find or install packages. While the change is in progress, the switch tooltip shows **Updating...**, and only that remote card is locked until the change finishes. ### Change the authentication of a custom remote 1. On the custom remote card, select **Configure authentication**. Note **Configure authentication** is unavailable while the remote is disabled. Enable the remote first. 1. In the Edit Custom Remote panel, select **No Authentication** or **Username / Password**, and update the credentials. 1. Select **Save**. To keep the stored password, leave the **Password** field empty. This works only if you don't change the username. If you change the username, enter the password again. ### Delete a custom remote 1. On the custom remote card, select **Delete**. 1. In the confirmation dialog, select **Remove** to confirm, or **Cancel** to exit without changes. Removing a remote is permanent. The remote is no longer available as a package source. Tip If you add, delete, enable, or disable a remote outside the Package Manager, for example [from the command line](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/auth/#option-2-add-a-custom-remote-from-the-command-line-cfsutil) or [from the Command Palette](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/auth/#option-1-add-a-custom-remote-from-the-command-palette), the **Remotes** tab updates automatically. # Package Manager Troubleshooting Most issues occur when required packages are missing, incompatible, or cannot be downloaded. This page lists common problems and how to resolve them. Common issues include: - Package integrity problems - Restricted packages not appearing - Out-of-date authentication sessions or expired API keys - Incorrect or stale remotes - Missing SoCs in the Workspace Creation Wizard - Dependency conflicts between selected packages ## Package integrity issues If old or corrupted packages accumulate over time, they can cause Package Manager errors or unexpected behaviour. Use the following steps to clean up your local package state: 1. Remove any unused cached packages from your local storage: ``` cfsutil pkg delete "*" ``` This command deletes all cached packages that are not actively installed. 1. Run the following command to view the remaining installed packages. ``` cfsutil pkg list ``` 1. Uninstall any packages you no longer need: ``` cfsutil pkg uninstall ``` 1. Run the delete command again to complete the cleanup: ``` cfsutil pkg delete "*" ``` 1. (Optional, last resort) Delete the `com.analog.cfs` directory if issues persist: - **Linux:** `~/.local/share/com.analog.cfs` - **macOS:** `~/Library/Preferences/com.analog.cfs` - **Windows:** `%LOCALAPPDATA%\com.analog.cfs` Warning This removes all installed CFS packages, cached data, and custom remotes. You will need to reinstall required packages. 1. Restart VS Code and reopen Package Manager. If you deleted the `com.analog.cfs` directory in step 4, reinstall the required packages using: ``` cfsutil pkg install ``` ## Restricted packages not appearing This usually happens when your myAnalog login session has expired, or — if you use `cfsutil` with the `CFS_API_KEY` environment variable — when the API key is expired or not valid. ### Check login status Command Palette 1. Open the **Command Palette** (`Ctrl+Shift+P` / `Cmd+Shift+P` on macOS). 1. Run `(CFS) myAnalog Status`. If you are logged out: 1. Run the `(CFS) myAnalog Login` command in the **Command Palette**. 1. Click **Open** to launch the browser. If the browser does not open, use the **Copy** button to copy the link and paste it in your browser. 1. On the myAnalog login page, use the sign-in method associated with your account: - **Email and password:** Enter your registered email address and password, then select **Log in**. If you don’t have a myAnalog account, [register at analog.com/myAnalog](https://www.analog.com/myAnalog). - **Google Account:** Select **Google Account**, then sign in with your Google credentials. - **LinkedIn Account:** Select **LinkedIn Account**, then sign in with your LinkedIn credentials. - **Analog Devices Account:** If you are an Analog Devices employee or contractor on a managed device, select **Analog Devices Account**, then sign in with your Analog Devices credentials. 1. When the **Sign-in Successful** page appears, close the browser and return to VS Code. 1. A VS Code notification confirms you are logged in. ### Check login status (command line) 1. Check your login status: ``` cfsutil myanalog status ``` 1. If your session has expired, log in again: ``` cfsutil myanalog login ``` 1. (Optional) View all configured remotes: ``` cfsutil pkg list-remotes ``` ### Check API key validity (command line) If you authenticate `cfsutil` using the `CFS_API_KEY` environment variable, an expired or incorrect key produces the same symptoms as a missing login session. 1. Confirm the variable is set and contains a value: Warning Never share your full API key. To check that the variable is set without displaying the entire key, use this masked view: On Linux or macOS: ``` key=$CFS_API_KEY; echo "${key:0:6}...${key: -3}" ``` On Windows PowerShell: ``` $key = $env:CFS_API_KEY; '{0}...{1}' -f $key.Substring(0, 6), $key.Substring($key.Length - 3) ``` This shows only the first 6 and last 3 characters of your key (for example: `abc123...xyz`). 1. List your API keys to check whether the key in use is still active. This requires an active myAnalog session: ``` cfsutil myanalog login cfsutil myanalog apikey list ``` Check the **Masked Key** column to identify your key. If the key has expired or does not appear in the list, it is no longer valid. 1. Create a replacement key: ``` cfsutil myanalog apikey create --description "" ``` The key value is shown once when the command succeeds. Save it immediately. 1. Update `CFS_API_KEY` with the new value and retry the failing command. ## Remote management issues If downloads fail or restricted packages disappear unexpectedly, a remote may be misconfigured. To manage remotes: 1. Open the **Command Palette**. 1. Run `Manage Package Remotes`. 1. Highlight a remote to: - Reauthenticate a custom remote - Reenable a disabled remote - Disable a remote which has an error ## Dependency conflicts between selected packages On the review summary screen, Package Manager resolves the dependencies of every package you selected as a single graph. If the packages you selected pull in incompatible versions of the same package — whether that package is one of your direct selections or a dependency they share — this graph cannot resolve and Package Manager reports a conflict. When this happens, the review summary screen shows an error message listing the selected packages involved in the conflict and highlights the disputed package in the package list. **Continue** is unavailable until you resolve the conflict. To resolve the conflict: 1. Select **Back** to return to package selection. 1. Remove one of the conflicting packages, or select a different version of one of them. 1. Select **Continue** again to re-review your selection. ## Missing SoC in the Workspace Creation Wizard If you install a new SoC package (for example, using `cfsutil pkg install`) but the SoC does not appear in the [Workspace Creation Wizard](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-new-workspace/index.md), the catalog may be out of date or missing entries. The catalog determines which SoCs and templates are shown in the wizard. Follow these steps in order. 1. Run the following command to ensure the package containing the required SoC is installed: ``` cfsutil pkg list ``` If it is missing, reinstall the package and try again. 1. Restart VS Code and reopen CodeFusion Studio to refresh the catalog. The Workspace Creation Wizard may not update immediately after installing a package. 1. Make sure catalog updates are enabled. - Open **VS Code Settings**. - Search for `cfs.catalogManager.checkForUpdates`. - Make sure this option is enabled so the catalog can refresh when CFS checks for updates. 1. If the new SoC is from a restricted package, make sure you are logged in with your myAnalog account. See [Restricted packages not appearing](#restricted-packages-not-appearing) for login steps. 1. (Optional, last resort) Delete the local catalog and restart if the SoC still does not appear: 1. Close VS Code. 1. Delete the local catalog file: - **Linux:** `/home//cfs//.catalog` - **macOS:** `/Users//cfs//.catalog` - **Windows:** `C:\cfs\\.catalog` 1. Restart VS Code. The catalog file is recreated automatically on startup. 1. If required, log in again with your myAnalog account. 1. Open the **Workspace Creation Wizard** and verify that the new SoC is now listed. ## Still having issues? If you continue to experience problems: - Double-check your login status and remotes. - Try logging in from a different network or device. - Contact your account representative, visit ADI Engineer Zone to ask a question or submit a technical support request. For details, see [Help](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/about/help/index.md). # View installed package contents The **Packages** view in the CodeFusion Studio sidebar lets you view the contents of installed packages. To install or remove packages, use the [Package Manager UI](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/manage-packages-ide/index.md). Each package appears with its version. Hover over a package to view its version and install path. The tooltip also shows the package type when available. Expand a package to view its folders and files. Files open in read-only mode, so you can't accidentally edit an installed package. If no packages are installed, the view prompts you to select **Manage Packages** to open the Package Manager. ## Filter the package list By default, the view shows only the packages declared as dependencies by your workspace (in `.cfsdependencies` manifests). The view header shows how many packages the view lists out of the total installed, for example 4 of 6. Use the buttons in the view title bar to change what the view lists: | Icon | Action | Description | | ---- | ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | **Show All Installed Packages** | List every installed package. Appears when the view lists only workspace dependencies. Selecting it changes the button to **Show Workspace Dependencies Only**. | | | **Show Workspace Dependencies Only** | List only the packages declared in `.cfsdependencies` manifests in your workspace. Appears when the view lists all installed packages. Selecting it changes the button back to **Show All Installed Packages**. | | | **Filter Packages by Type** | Select one or more package types to show. If you select none, all types are shown. | | | **Clear Package Filters** | Reset all filters. Appears when a filter is active. | | | **Refresh Packages** | Reload the list of installed packages. The view also refreshes automatically when you install or remove a package, or when a `.cfsdependencies` file changes. | | | **Collapse All** | Collapse every expanded package and folder. | CodeFusion Studio remembers your filter selection for each workspace. ## Work with packages, folders, and files Hover over a package or folder and select the **Search in Package** icon to search. Right-click a package, folder, or file for these actions: - **Search in Package:** Open VS Code search limited to that package or folder (packages and folders only). - **Reveal in File Explorer:** Show the item in the file manager of your operating system. - **Copy Path:** Copy the full path of the item. - **Copy Relative Path:** Copy the path relative to the package root (folders and files only). # CFS Plugins Learn how CFS plugins extend CodeFusion Studio and about how you can create and test your own. - [Plugin integration overview](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/plugins/plugin-integration-overview/index.md): See how plugins integrate into the CodeFusion Studio workflow. - [Develop plugins](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/plugins/develop-plugins/index.md): Learn about how you can develop, test, and view custom plugins in the CFS UI. # Develop plugins CFS supports custom plugins, allowing you to extend its capabilities without modifying the base application. Using the CFS Plugins SDK, you can develop plugins tailored to specific project needs—such as upgrading an RTOS, integrating middleware, or applying custom code templates. For information on how to build your own plugins, including API reference, templating guide, and plugin structure details, see the [CFS Plugins SDK README](https://github.com/analogdevicesinc/codefusion-studio/blob/main/packages/cfs-plugins-sdk/README.md). The following information is relevant once you have built your custom plugin. ## Plugin discovery The `CfsPluginManager` is part of the [cfs-lib](https://github.com/analogdevicesinc/codefusion-studio/tree/main/packages/cfs-lib) package and is responsible for automatically detecting and parsing plugins at startup. When VS Code launches, the manager performs the following tasks: - Scans the directories listed in `cfs.plugins.searchDirectories`. - Validates plugin metadata. - Registers plugin features for the CFS UI and CLI (cfsutil). ## Plugin activation After building and testing your plugin, make it available in CFS by adding the path to the plugin `dist` directory to your VS Code `settings.json` file. ### Updating your plugin search path 1. Open the `settings.json` file in your CFS workspace. 1. Add the path to your plugin's output directory under the `cfs.plugins.searchDirectories` setting: ``` "cfs.plugins.searchDirectories": [ "/path/to/your/plugins/dist", // Must point directly to the plugin's dist folder ] ``` Once placed, restart CFS to detect the new plugin and create a workspace. # Plugin integration overview CodeFusion Studio (CFS) supports a flexible, extensible plugin system that enhances platform functionality without modifying the base application. Plugins capture user-defined settings at various stages of development and generate configuration and source files based on customizable templates, tailored to internal HALs, middleware, and coding standards. ## Plugin types CFS supports three types of plugins: 1. **Workspace plugins** – Provide single and multi-core templates that come pre-populated with ADI recommended configurations. 1. **Project plugins** – Define how individual projects are structured and configured. 1. **Code generation plugins** – Generate source code based on user selections in the graphical configuration tools, such as pin mux, memory allocation, etc. ### Workspace plugins Workspace plugins define a complete, single or multi-core workspace with preconfigured source files, tool settings, and templates. They are shown in the Workspace Creation wizard when you choose the **Select a workspace template** option. ### Project plugins Project plugins define how a single-core project is structured and configured. They describe the files and templates required to set up the project environment, and provide configuration options for the user to select before project creation. They are shown in the Workspace Creation wizard when you choose the **Manually configure the workspace** option. ### Code generation plugins Code generation plugins (which are frequently bundled within project plugins) define templates used to produce source code based on configuration settings from the System Planner in CFS. ## Plugin integration with the CFS UI CFS plugins are surfaced at key stages in the development workflow: ### Workspace creation - When you **Select a workspace template**, you are choosing a workspace plugin. - When you opt to **Manually configure the workspace** you are choosing project plugins for each core. ### System Planner Plugins define the configuration options available in the System Planner. These options are specified in two key sections of the plugin’s `.cfsplugin` file: `supportedSocs` and `properties`. **supportedSocs:** Declares which SoCs and boards the plugin supports. SoC data models are distributed through the [Package Manager](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/index.md), ensuring engineers always have access to the latest hardware data. These data models provide the baseline hardware configuration used by the System Planner. ``` "supportedSocs": [ { "name": "MAX32655", "board": "EvKit_V1", "package": "ctbga" } ] ``` **Properties:** Built on top of the selected SoC hardware configuration, this section defines additional user-configurable fields that appear in the System Planner—for example, UART baud rate. These settings influence code generation but do not affect runtime behavior. ``` { "properties": { "project": [], "peripheral": { "UART0": { "supportedControls": [ { "Id": "PARITY" } ], "addedControls": [ { "Id": "CHOSEN", "Description": "Chosen. Multiple values can be separated by commas.", "Type": "identifier" }, { "Id": "BAUD", "Description": "Baud Rate", "Hint": "115200", "Type": "integer" } ], "modifiedControls": [] } } } } ``` ### Code generation On the **Generate Code** page in the System Planner, CFS uses the `codegen` section of the selected code generation plugin to generate source files based on the current configuration. # Resources CodeFusion Studio supports a variety of tools, frameworks and APIs. Here are links to all of the currently supported tools and integrations. - [Security](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/resources/security-resources/index.md) - [SDKs](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/resources/sdk-resources/index.md) - [Third party tools](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/resources/third-party-resources/index.md) ## Additional ADI tools The [secure communication protocol bootloader](https://www.analog.com/media/en/technical-documentation/user-guides/ug7618.pdf) can be used to generate images and communicate with the bootloader. # SDK resources ## MSDK The ADI MSDK contains the necessary software and tools to develop firmware for the MAX32xxx and MAX78xxx Microcontrollers. This includes register and system startup files to enable low-level development for its supported parts. [Get started with MSDK](https://analogdevicesinc.github.io/msdk/USERGUIDE/) ## Zephyr A small-footprint kernel designed for use on resource-constrained and embedded systems: from simple embedded environmental sensors and LED wearables to sophisticated embedded controllers, smart watches, and IoT wireless applications. [Zephyr 4.3.0 Documentation (Online)](https://docs.zephyrproject.org/4.3.0/) or [Zephyr 4.3.0 Documentation (PDF)](https://docs.zephyrproject.org/4.3.0/zephyr.pdf) # Trusted Edge Security Architecture (TESA) ADI’s security for the Intelligent Edge is seamlessly integrated into CodeFusion Studio through Trusted Edge. Trusted Edge provides the foundational layer of security within the Trusted Edge Security Architecture (TESA), combining industry-standard cryptographic APIs with the hardware-based security capabilities of ADI platforms. ## Features - **Flexibility** – Choose from multiple industry-standard crypto libraries that best fit your application. - **Simplicity** – Access hardware security features across ADI’s complete digital portfolio. - **Reduced time-to-market** – Reduce time-to-market with foundational security services that simplify implementation. ## Installation ### Complete the software request form The TESA security package is distributed under a non-disclosure agreement (NDA) through myAnalog. Note A **myAnalog** account is required. Login or sign up at [analog.com](https://www.analog.com/en/index.html) 1. Access the [Software Request Form](https://analog.com/srf). 1. Log in or sign up for a myAnalog account. 1. Complete the required fields in the **Software Recipient Information** section. 1. Complete the required fields in the **Commercial information** section. 1. In the Software requested section, select **Security** for the target technology. Important Leave **Processor/SoC** and **Hardware Platform** blank. 1. Check the box for your preferred operating system: Windows, macOS, or Linux. 1. Review the privacy settings and check the applicable boxes. 1. Click **Submit**. You will receive a confirmation at the email address you provided in the software request form. Allow 10 business days for ADI to review your request. Once your NDA is approved, you will be granted access to the TESA package through the CodeFusion Studio Package Manager. This package provides the security toolchain and components required for developing trusted applications. ### Install the TESA package After your NDA is approved, you can install the TESA package directly from the CodeFusion Studio [Package Manager](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/index.md). To install: 1. Configure partner access. Complete the setup steps provided with your NDA approval to enable access to restricted repositories. 1. Install the TESA package using one of the following methods: - [Command Palette](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/manage-packages-command-palette/index.md) - [Command line (`cfsutil`)](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/manage-packages-cfsutil/index.md) Note The TESA package is only available to NDA-approved partners. For repository setup details, refer to your internal installation guide or contact your ADI representative. ## Security Foundation Layer The Security Foundation Layer provides the core building blocks of TESA. It defines the middleware, frameworks, and tools that implement trusted execution, cryptographic operations, secure boot, and lifecycle management across supported ADI MCUs. ### TESA middleware TESA middleware implements the foundational security stack for the Trusted Edge architecture, integrating cryptographic libraries, APIs, and MCU-level frameworks such as Trusted Firmware-M and MCUboot. #### Cryptographic libraries and APIs TESA supports multiple cryptographic backends and APIs, including: - Crypto library options - mbedTLS - wolfSSL - PSA Crypto API - ADI extensions - ADI USS API - Root of Trust Services - Unified Security Software (USS) - Secure Storage - Crypto Toolbox - Secure Communication - Universal Crypto Library (UCL) #### MCU framework integration TESA integrates with multiple MCU-level security frameworks to deliver trusted boot, firmware validation, and lifecycle management. ##### Trusted Firmware-M (TF-M) [Trusted Firmware-M (TF-M)](https://www.trustedfirmware.org/projects/tf-m) is the platform security architecture reference implementation aligning with PSA Certified guidelines. ADI’s implementation, delivered through TESA, provides out-of-the-box support for the open source TF-M build using mbedTLS, as well as a premium configuration that enhances security performance through Universal Crypto Library (UCL). For a list of supported devices, see [TF-M ADI platforms](https://trustedfirmware-m.readthedocs.io/en/latest/platform/adi/index.html). For information on setting up and using TF-M in CFS, see [Arm® TrustZone®](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/targets/trustzone/index.md). ##### MCUboot MCUboot is included with TF-M to provide Level-2 bootloader functionality within the boot chain. TESA enhances MCUboot with UCL, enabling secure boot and improved cryptographic performance. ### Unified Security Software USS extends standard PSA and ADI APIs through a backend that delivers: - Secure Boot - Secure Channel - Lifecycle Management - Secure Storage - Cryptographic Toolbox - Attestation USS includes standalone MCU-only software security emulations for ADI devices. The PSA Crypto implementation within USS is called the ADI Universal Crypto Library (UCL). UCL provides high-performance cryptographic algorithms for ADI MCUs, supporting hashing, encryption/decryption, signature verification, key exchange, and random number generation.\ It also includes countermeasures against side-channel attacks and leverages the hardware accelerator of the target ADI platform whenever applicable. #### TESA Driver USS provides rich, hardware-independent APIs for: - Crypto - Life cycle management - Secure storage ### TESA Toolkit The TESA toolkit includes utility scripts and firmware for: - Generating signatures - Enabling Secure Boot ROM The TESA toolkit is available on GitHub at [TESA-Toolkit](https://github.com/analogdevicesinc/tesa-toolkit) ### USS Supported boards - **MAX32650** - [EVKit V1](https://www.analog.com/en/resources/evaluation-hardware-and-software/evaluation-boards-kits/max32650-evkit.html) - [FTHR](https://www.analog.com/en/resources/evaluation-hardware-and-software/evaluation-boards-kits/max32650fthr.html) - [AD-SWIOT1L-SL](https://www.analog.com/en/resources/evaluation-hardware-and-software/evaluation-boards-kits/ad-swiot1l-sl.html) - **MAX32657** - [EVKit V1](https://www.analog.com/en/products/MAX32657.html) - **MAX32658** - [EVKit V1](https://www.analog.com/en/products/MAX32658.html) - **MAX32670** - [EVKit V1](https://www.analog.com/en/resources/evaluation-hardware-and-software/evaluation-boards-kits/max32670evkit.html) - **MAX32690** - [AD-APARD32690-SL](https://www.analog.com/en/resources/evaluation-hardware-and-software/evaluation-boards-kits/ad-apard32690-sl.html) - [EVKit V1](https://www.analog.com/en/resources/evaluation-hardware-and-software/evaluation-boards-kits/max32690evkit.html) - [FTHR](https://developer.analog.com/solutions/max32690) - [EVAL-ADIN1110](https://www.analog.com/en/resources/evaluation-hardware-and-software/evaluation-boards-kits/eval-adin1110.html) - [MAXQ1065EVKIT](https://www.analog.com/en/resources/evaluation-hardware-and-software/evaluation-boards-kits/maxq1065evkit.html) # Third party tools ## Debuggers ### Olimex Arm Debugger The Olimex ARM-USB-OCD-H debugger is required to debug the RISC-V core on supported MAX32xxx and MAX78xxx devices. Download and installation instructions can be found in chapter 3 of the [Olimex ARM-USB-OCD-h User Manual](https://www.olimex.com/Products/ARM/JTAG/_resources/ARM-USB-OCD_and_OCD_H_manual.pdf) ### Segger J-Link Debugger Segger's J-Link is an alternative debugger for ARM cores. Download and installation instructions can be found on the [Segger website](https://www.segger.com/downloads/jlink/) ## Profiling and trace tools ### Segger SystemView Segger SystemView is available for free to Analog Devices customers for supported processors. You must use SystemView version 3.58 or later. To request a free license, visit\ [Segger License Activation Request page](https://license.segger.com/adi.cgi) Download and installation instructions can be found on the Segger website at\ [Segger SystemView page](https://www.segger.com/products/development-tools/systemview/) ## Terminal emulators These tools are used to capture UART serial output during debugging. ### Tera Term A free, open-source terminal emulator for Windows. For downloads, see [Tera Term](https://github.com/TeraTermProject/teraterm/releases) ### PuTTY An open-source SSH and serial client for Windows. Download and installation instructions can be found on the Putty website at [PuTTY](https://www.putty.org/) ### Minicom A command-line serial terminal for Unix-based systems. Download and installation instructions can be found on the Minicom website at [Ubuntu Minicom Guide](https://help.ubuntu.com/community/Minicom) # System Planner Configuration Tools CodeFusion Studio (CFS) provides a dashboard for the System Planner Configuration Tools to allow easy configuration of pin multiplexing, clock settings, and System-on-Chip (SoC) resources. To open the System Planner Configuration Tools dashboard: - Click the appropriate `.cfsconfig` file in your workspace, or: - Select **Config Tools > Open Config File** from the **Home** section of the CFS sidebar. Tip For information on creating a new workspace, see [Create a new workspace](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-new-workspace/index.md) or enter **cfs.createWorkspace** in the command palette. ## Dashboard The System Planner Configuration Tools dashboard consists of the following tabs: ### Peripheral Allocation Assign peripherals to cores and configure their functionality. See [Peripheral Allocation](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/peripheral-allocation/index.md) for details. ### Pin Config Configures pin multiplexing and function settings. See [Pin Config](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/pin-config/index.md) for details. ### SRU Config Configures Signal Routing Unit (SRU) connections that route peripheral signals to each other, and to and from external pins. Only available for SHARC-FX processors. See [SRU Config](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/sru-config/index.md) for details. ### Clock Config Configures the various clocks and divers. See [Clock Config](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/clock-config/index.md) for details. ### Memory Allocation Manage memory allocation and partitioning for different cores. See [Memory Allocation](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/memory-allocation/index.md) for details. ### Registers View and manage register values used by the configuration code. Filter to view modified or default values. See [Registers](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/registers/index.md) for details. ### Manage AI Models Import and configure supported AI models for specific cores. See [Manage AI Models](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/manage-ai-models/index.md) for details on assigning models and applying engine-specific options before code generation. ### Profiling Supports capturing runtime and inference-level traces from the target and preparing captured CTF traces for visualization. See [Profiling](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/profiling/index.md) for details. ### Generate Code After setting all configurations, such as pin multiplexing, clock settings, and memory allocation, you can generate the necessary source files for your application. See [Generate Code](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/generate-code/index.md) for details. ### Workspace Projects table The Workspace Projects table provides an overview of the cores in the workspace and their assigned resources. Use this table to track resource allocation across cores and ensure proper configuration before code generation. Click the chevron (**>**) in a relevant cell to open the corresponding page, where you can modify assignments or resolve any detected issues. Warning If the system detects configuration issues (such as pin conflicts), an error appears in the affected cell. Use the chevron (**>**) to open the corresponding page and address the issue. | **Column** | **Description** | | ---------------------- | --------------------------------------------------------- | | Core | Lists available processor cores. | | Code Generation Plugin | Displays the associated plugin used for code generation. | | Allocated Peripherals | Displays the number of peripherals assigned to each core. | | Assigned Pins | Displays the number of assigned pins. | | Memory Partitions | Displays the number of allocated memory partitions. | # Clock Configuration The Clock Configuration feature allows you to configure and manage clock sources, dividers, and multiplexers to control the clock frequencies supplied to processor cores and peripherals. It ensures clock settings comply with hardware constraints and allows code generation to apply the desired configuration. ## Clock config diagram This screen allows you configure the clock frequencies that are used by each of the peripherals and cores on the processor. It includes error checking to ensure that the frequencies used are within the constraints of the processor specification. After configuring your clock tree, you can generate code that will set the hardware to the desired configuration. This visual representation of the clock tree is similar to that found in the processor user guide. The diagram contains nodes which represent the cores, peripherals, pins, multiplexers, and clock scalers present in the processor. The frequencies used at each node are shown within the node. ### Navigation Hover over the lines or nodes in the diagram to view frequency and other information. Nodes and lines on the diagram show as bold when enabled and faint when disabled. The diagram can be zoomed in/out using the scroll wheel of your mouse or by using the zoom icons in the bottom right corner of the view. The fit to screen icon resizes the diagram to the size of your window. The diagram can be dragged within the window using the left or primary mouse button. ### Node types In the left panel, the nodes from the diagram are listed, grouped by the type of the node: - **Core** : A core on the processor. - **Divider** : A frequency step-down scaler node. - **Multiplier** : A frequency step-up scaler node - **Mux** : A multiplexer that selects one of its inputs. In some cases, a mux can also direct a single input to one of its outputs. - **Oscillator** : An internal oscillator present in the processor. - **Peripheral** : A peripheral of the processor that is fed by one of the clocks. A peripheral can often be enabled or disabled. - **Pin Input** : A pin that can be attached to an external oscillator. To use a pin input you need to assign it using the [Pin Config](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/pin-config/index.md) tool. - **Pin Output** : A pin that can send a clock out externally. To use a pin output you need to assign it using the [Pin Config](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/pin-config/index.md) tool. ### Configuring clocks Clicking on a node in the diagram or from the node list will show a view with the configuration options relevant to that node: Changing any of the configuration options will be reflected in the diagram.\ Only valid options will be enabled by the tool. Clicking **back** will take you back to the list. Note Some clock settings, such as external input and output, require a corresponding pin to be configured in the [Pin Config](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/pin-config/index.md) tool before it can be enabled. ### Errors Errors that cause nodes to display in red and indicate an error that needs to be resolved: - **A frequency out of range:** The error indicates whether the frequency is above or below the limits of operability of the peripheral. - **Unconfigured value:** This error indicates a required setting has not been specified: - Unspecified frequency at a pin input - Pin mux is not set to direct the clock signal to the peripheral # Compatibility Analyzer report The Compatibility Analyzer report checks whether your model fits the target hardware by evaluating memory constraints, operator support, and data type compatibility. ## Before you start This section assumes you have already generated a Compatibility report from the System Planner UI in [Manage AI Models](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/manage-ai-models/index.md). The report is an interactive, graphical report with expandable sections, severity indicators, and clickable reference links. Tip To generate output for scripting and automation, use [`cfsutil ai compat`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/compat/index.md) from the terminal. To reopen a previously generated report, select **AI Tools** > **Open Report** from the **Home** section of the CFS sidebar. ## Memory issues Memory issues occur when the model exceeds the flash or RAM limits defined in the hardware profile. In CFS, these issues do not block code generation, but they may appear in the report to indicate that the generated model is unlikely to run correctly on hardware. Each memory issue is displayed as follows: - **Issue summary**\ Shows the memory issue type and its severity. For example: `Model storage Flash overflow [Warning]` - **Detailed information**\ Provides specific details about the memory constraint violation, such as the amount of memory required and the hardware limits. - **Recommended actions**\ Lists suggested ways to reduce memory usage and resolve the issue. ### Memory issue types The following memory issues may be reported: - **Model storage memory overflow (Critical)**\ The model exceeds both flash and RAM limits. - **Model storage flash overflow (Warning)**\ The model exceeds flash limits but fits within available RAM. - **Model storage RAM overflow (Warning)**\ The model exceeds RAM limits but fits within available flash. - **RAM memory overflow (Warning)**\ Peak runtime RAM usage exceeds the hardware limit. ### Suggested optimization strategies The report provides context-specific recommendations based on the type of memory issue and model characteristics. Common strategies include: **For models with floating-point weights:** - **INT8 Quantization**: Convert the model to use 8-bit integer precision. Refer to the [TensorFlow Lite post-training quantization guide](https://tensorflow.org/lite/performance/post_training_quantization) for details. - **Weight Pruning**: Remove unnecessary weights or neurons from the network. Refer to the [TensorFlow Model Optimization documentation](https://tensorflow.org/model_optimization) for details. - **Model Architecture Optimization**: Redesign the model to use more hardware-efficient layers or data flows (for example, replacing standard convolutions with depthwise separable convolutions). **For already-quantized models or models without quantizable layers:** - **Weight Pruning and Model Architecture Optimization** (listed above) - **Reduce Model Complexity**: Simplify the model by reducing layer count or dimensions. Refer to the [TensorFlow Lite performance optimization guide](https://tensorflow.org/lite/performance/model_optimization) for details. **For runtime RAM overflow issues:** - **Reduce batch size**: Lower the batch size to decrease peak memory usage during inference. - **Layer fusion optimization**: Combine operations to reduce intermediate tensor allocations. - **Tensor lifecycle optimization**: Optimize when tensors are allocated and freed to reduce peak memory usage. ## Operator check issues Operator check issues indicate that a model layer uses an operator not supported by the target implementation. Code generation should not proceed until the operator has been replaced. Each operator check issue is displayed as follows: - **Issue summary**\ Shows the unsupported operator, and the severity. For example: `CONV_2D [Critical]` - **Affected layers**\ The indices of model layers that use this operator. - **Suggested Alternative**\ The suggested alternative (if available) ### Suggested mitigation strategies for operator check issues - Replace the unsupported operator. The report may include a suggestion to consider. - If no alternative is provided (for example, the report shows `no hardware-compatible alternative identified`), remove the unsupported operator or redesign the layer and retrain. ## Unsupported type checks Unsupported type check issues occur when a model layer uses a data type that is not supported by the target hardware. These issues are flagged during analysis. Code generation should not proceed until an appropriate data type is used. Each unsupported type check issue is displayed as follows: - **Issue summary**\ Shows the operator, the unsupported data type used by the operator, and the severity. For example: `CONV_2D operation uses FLOAT32 [Critical]` - **Affected layers**\ The indices of model layers where this operator–data type combination occurs. ### Suggested unsupported type mitigation strategies Apply quantization to convert the model to a hardware-supported data type (for example, `INT8` or `UINT8`). Refer to the [TensorFlow Lite post-training quantization guide](https://tensorflow.org/lite/performance/post_training_quantization) for details. # Generate Code The code generation feature allows you to generate configuration code for your project. This includes generating the necessary source files to configure memory allocation, peripheral settings, pin mappings, clock configurations, and other essential system settings. ## Prerequisites Before generating code: - Ensure you have resolved any configuration errors, such as pin multiplexing conflicts or clock misconfigurations. - Review the the **Generate AI Models** option to confirm that the AI model files configured for the core will be generated. - Be aware that generated files will overwrite any existing versions. Back up any manually modified files if needed. ## Generating code files 1. Select the cores you want to generate code for. 1. Click **Generate**. 1. If you have unsaved changes, you will be prompted to save the CFS configuration file (`.cfsconfig`) before generating code. 1. The generated files are saved to your project or workspace according to the selected plugin's configuration. ## Working with generated code The generated code files are added to your project automatically, and are detected and built without requiring configuration changes. You also do not need to invoke the generated functions manually, as the start-up code handles this for you. Note If your project includes AI model files, regenerating code does not delete any previously generated model files. If you no longer want to include an existing model, delete the files manually. The `src/adi_tflm` directory is generated for all TFLM-supported processors, while `src/adi_cnn` is generated only for MAX78002 (for CNN/PyTorch models using the izer backend). You can safely delete these directories before regenerating to ensure a clean output. # Manage AI Models The **Manage AI Models** tab allows you to create model configurations for your project. You can add model files, assign them to cores, define engine-specific settings, and generate deployable C/C++ code. You can also run compatibility and profiling reports to check memory usage, operator support, and performance characteristics. Use this feature to manage model deployment in multi-core environments, run compatibility and profiling checks, and generate engine-specific code for supported SoCs. ## Before you start For full compatibility when using this feature, [create a new workspace](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-new-workspace/index.md) and select an AI-based template (for example, *Zephyr Single Core TensorFlow AI Model* for MAX32690). For details on supported processors, see [supported processors and model formats](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/about/supported-ai-model-formats/index.md). Windows dependency On Windows, the **Manage AI Models** tab requires the [Visual C++ Redistributable for Visual Studio 2015](https://aka.ms/vs/16/release/vc_redist.x64.exe) to be installed. Install this redistributable manually before running model compatibility or profiling reports. ## Manage model configurations AI-based templates (such as *Zephyr Single Core TensorFlow AI Model*) include a pre-configured model. You can modify this existing model or add additional models. To add a new model: 1. Click **Add Model**. 1. Select a **Target** core. For example, ARM Cortex-M4. 1. Enter a **Model Name**. This name is used to identify the model configuration. 1. Click **Browse** to open the **Model Zoo**, then select a model from the library or a local file. See [Select a model from the Model Zoo](#select-a-model-from-the-model-zoo). You can also enter a relative file path or URL directly in the **Model File** field. 1. (Optional) Configure backend-specific settings: - For TensorFlow Lite Micro models, see [Configure TFLM settings](#configure-tensorflow-lite-micro-tflm-model-settings) - For izer backend models, see [Configure izer backend settings](#configure-izer-backend-settings) 1. Click **Add** to add the model to the list. Identifier collisions CodeFusion Studio normalizes and compares both **Model Name** and **Symbol for data** (when set) for every model. It rejects a model when either value collides case-insensitively with either value from another model in the same workspace. If CodeFusion Studio reports `This identifier is already in use by another model`, select unique **Model Name** and **Symbol for data** values. ### Select a model from the Model Zoo The **Model Zoo** is a library of AI models hosted by Analog Devices. When you click **Browse** on the model file field, the Model Zoo opens so you can browse, search, and filter models, or select your own model from a local file. To select a model from the library: 1. Use the **Search** field to find models by name or tag, or filter the list with the **Platforms**, **Cores**, and **Category** filters. The filters are pre-set to match the SoC and target core of the model configuration. 1. Expand a model card to view its details, including the description, owner, license, accuracy metrics, network inputs and outputs, and the **Quantizations** table of model sizes per platform. 1. From the quantization menu in the card header, select the quantization to deploy (for example, `int8`). The **Quantizations** table shows the model size for each platform and quantization. 1. Select the model card, then click **Use selected model**. The model file field is populated in the model configuration, along with the dataset file field when the model provides sample data for the chosen quantization. To use a model that isn't in the library, click **Browse local models** and select a file from your workspace. #### Use a custom model zoo By default, the Model Zoo lists models hosted by Analog Devices. To add a custom source, set **Model Zoo: Urls** (`cfs.modelZoo.urls`) in the CodeFusion Studio settings to one or more base URLs. Each URL must expose `model_index.json` at its root without authentication and allow cross-origin GET requests. The Model Zoo aggregates models from every configured source. To see the expected structure, refer to the [ADI Model Zoo](https://github.com/analogdevicesinc/adi-model-zoo) repository, which hosts the default source. ### Configure TensorFlow Lite Micro (TFLM) model settings For TFLM models, you can optionally configure the following settings: - **Memory section for data**: Specify the name of the linker section where model data should be placed (for example, `.data`, `.flash`). Match the section specified to the one provided in your linker file, or leave it blank to use the default data section. - **Symbol for data**: Define the C variable name used in the generated code for referencing the model. - **Arena size for model**: Define the arena size in bytes for the model. If omitted, the size will be estimated automatically. - **Memory section for arena**: Specify the name of the linker section where the arena buffer should be placed. The arena is the working memory used by TensorFlow Lite Micro during inference. Match the section to one provided in your linker file, or leave it blank to use the default section. - **Memory section for dataset**: Specify the name of the linker section where the dataset should be placed. - **Dataset File**: Click **Browse** to upload and select a dataset file, or enter a relative file path or URL. This is an optional file containing model input dataset for testing in binary format. Example dataset files (`.bin`) are located in the `cfs-ai/examples/` directory of the [CodeFusion Studio repository](https://github.com/analogdevicesinc/codefusion-studio). Using AI models with non-AI templates If you create a workspace for a [supported processor](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/about/supported-ai-model-formats/index.md) and choose a non-AI template (such as *Zephyr Single Core Blinky*), note that the application source file is `main.c`. When you add a TensorFlow Lite Micro (TFLM) model using **Add Model**, the generated model files are C++ (`.cpp` and `.hpp`). This can cause compiler warnings or errors if your project uses a C-only source (`main.c`). To fix this: - Replace `main.c` with `main.cpp` in your project to convert it to C++, or - Add a C++ wrapper source file that exposes a C interface to the model. ### Configure izer backend settings For izer backend models on the MAX78002 CNN accelerator, you can configure the following settings: - **Enable softmax layer generation**: Enable or disable softmax layer generation. Default: enabled. - **Inference timer**: Select which timer (0-3) to use to measure the inference timing. Default: 0. - **Test name prefix**: Specify the prefix used for the test name. - **Round average pooling results**: Enable or disable rounding of average pooling results. Default: enabled. - **CNN Clock divider**: Select the clock divider for the CNN accelerator (1 or 4). Default: 1. - **Input shape**: Enter a tuple describing the input shape used to generate random sample input data (for example, `256,256,256`). - **Use FIFO**: Enable or disable using a FIFO when reading layer data. Useful for larger models. Default: enabled. - **Network configuration file**: Click **Browse** to upload and select the network configuration YAML file, or enter a relative file path or URL. This file is required for izer backend models. Example network configuration files are located in the `networks/` directory of the [ai8x-synthesis repository](https://github.com/analogdevicesinc/ai8x-synthesis). Note For reference on how to train PyTorch models compatible with MAX78002, see the open source [ai8x-synthesis repository](https://github.com/analogdevicesinc/ai8x-synthesis). ### Field descriptions | Field | Backend | Description | | ----------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Target** | All | The processing core that will run the model. For example, ARM Cortex-M4. | | **Model Name** | All | Name used to identify the model configuration. Maximum 64 characters. | | **Model File** | All | The model to deploy. Select a model from the [Model Zoo](#select-a-model-from-the-model-zoo) or a local file, or enter a path or URL. The path can be absolute or relative to the workspace. | | **Memory section for data** | TFLM | The memory section used to map the model data. | | **Symbol for data** | TFLM | C symbol name used for the model data array. Appears in the generated code. | | **Arena size for model** | TFLM | Arena size in bytes for the model. If omitted, the size will be estimated automatically. | | **Memory section for arena** | TFLM | The memory section used to map the arena buffer. | | **Memory section for dataset** | TFLM | The memory section used to map the dataset. | | **Dataset File** | TFLM | Path or URL to a file containing model input dataset for testing in binary format. | | **Enable softmax layer generation** | izer | Enable or disable softmax layer generation. | | **Inference timer** | izer | Timer (0-3) to use to measure the inference timing. | | **Test name prefix** | izer | The prefix used for the test name. | | **Round average pooling results** | izer | Enable or disable rounding of average pooling results. | | **CNN Clock divider** | izer | Clock divider for the CNN accelerator (1 or 4). | | **Input shape** | izer | Tuple describing the input shape (e.g., 256,256,256). | | **Use FIFO** | izer | Use a FIFO when reading layer data. Useful for larger models. | | **Network configuration file** | izer | Path to the YAML file describing the network configuration. Required for izer backend models. | | **Compatibility** | TFLM | Indicates whether the model can fit and run on the selected target. | | **Include toggle** | All | Enables or disables file generation for the model. Toggling a model off keeps the configuration but does not generate code. | Note Disabling the **Include** toggle does not remove any previously generated files. These will remain in your project unless overwritten by a subsequent generation, or deleted manually. ### Compatibility and profiling reports To generate reports for your model: - Click **Open Compatibility Report** to view memory constraints, operator issues, and data type compatibility. This button only appears if compatibility issues are detected. For details on interpreting the report, see [Compatibility Analyzer Report](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/compat-report/index.md). - Click **Open Profiling Report** to view a summary of resource usage and optimization opportunities. For details on interpreting the report, see [Resource Profiling Report](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/profiling-report/index.md). #### Accessing and managing reports CFS stores the report in the `reports` folder of the project assigned to the same core as the model. Use the **Save As** option in Visual Studio Code to store the report in a different location. To reopen the report at a later time, select **AI Tools** > **Open Report** from the **Home** section of the CFS sidebar. Important These reports are for guidance only and do not prevent code generation. Please note that this is an early version of the reporting feature, and it may evolve in future releases. Currently, only TFLM models are supported. CNN accelerator models on MAX78002, which use PyTorch (izer backend), are not supported by the analysis tools. These options are disabled in the UI when such a model is selected. ## Modify a model configuration 1. Locate the model in the list. 1. Click configure to open the **Configure Model** sidebar. 1. Apply your changes, then click **Update**. ## Remove a model configuration When you remove a model configuration, it is deleted from the list and excluded from future code generation. Existing files will not be removed. To remove a model configuration: 1. Locate the model in the list. 1. Click delete . 1. Click **Confirm**. Note Deleting a model configuration does not remove any previously generated files. These will remain in your project unless overwritten by a subsequent generation. ## Next steps Before you generate code, enable the **Include** toggle for each AI model configuration you want to include in the generation. If the number of AI models per core is restricted (for example, the MAX78002 CNN accelerator supports only one model), the UI automatically deselects excess configurations. When you are ready, proceed to [Generate Code](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/generate-code/index.md). # Memory Allocation The Memory Allocation feature enables partitioning of internal and external SoC memory. Use this feature to create memory partitions and assign specific blocks of RAM or Flash to cores, ensuring that critical functions own the memory resources they need. This is ideal for multi-core applications, such as separating secure processes from general purpose tasks. ## Memory Allocation overview 1. **Filter options**: Filter memory blocks by type or core to locate partitions. 1. **Memory blocks list**: List of base memory blocks, derived from the devices datasheet. Expand a block to view details such as start or end addresses, minimum alignment, and usage. 1. **Memory allocation bar**: Visual overview of memory usage. Hover to view partition size, assigned core, and memory address range. 1. **Create partition**: Hover over a free region in the memory allocation bar, then click add (➕) to define a new memory partition. Alternatively, click **Create partition**. 1. **View by**: View partitions grouped by project or memory type. 1. **Modify and delete partitions**: Click configure to edit a partition or click delete to remove it. ## Create a partition Note Partitions cannot overlap or extend into occupied memory. If the selected memory is already in use, an error message will appear. Modify or delete existing partitions to proceed. Hover over a free region in the memory bar, then click add (➕) to create a partition. Alternatively, you can click **Create Partition**. Tip Using the interactive memory bar streamlines the setup process by automatically prepopulating fields, including core, memory type, starting address, and size. The partition form includes the following fields: - **Memory Type**: The type of memory (e.g., RAM, FLASH). - **Partition Name**: A unique name for the partition. - **Assigned Projects**: The projects that will access the partition. Multiple projects can be selected for a shared memory region. - **Access Permissions**: Configure access permissions (for example: read, read/write) for each assigned project. If multiple projects are assigned, you can designate one of them as the owner. The owner project is responsible for initializing the memory. Other projects may access the memory but do not manage it. - **Plugin Options**: Fields used to pass additional configurations to the code generation plugin for the selected project. The available options depend on the firmware platform. For example, in a Zephyr-based project, you can enter `sram` or `flash` into the chosen field to assign a specific role (such as system SRAM or flash storage) to the memory region. Multiple values can be entered as a comma-separated list. - **Base Block** (Optional): The base memory block (for example: System RAM Block 8). If left blank, this value is automatically determined based on the **Starting Address**. - **Starting Address**: The starting address of the partition in hexadecimal format. If a **Base Block** is selected, this field updates accordingly. - **Size**: The partition size in KB, MB or bytes. ## Edit a partition To edit a partition, click the partition directly in the interactive memory bar. Alternatively, you can: 1. Locate the target core or memory type in the central view. 1. Expand the partition card to view its assigned partitions. 1. Click configure to modify a partition. ## Delete a partition To delete a partition, click the partition directly in the interactive memory bar, then click Delete at the top of the **Edit Partition** form. Alternatively, you can: 1. Locate the target core or memory type in the central view. 1. Expand the partition card to view its assigned partitions. 1. Click delete to remove a partition. # Peripheral Allocation The Peripheral Allocation feature allows you to assign SoC peripherals to projects. This ensures efficient resource utilization, prevents conflicts, and enhances overall hardware performance. ## Peripheral Allocation overview 1. **Filter options**: Filter peripherals by allocation status (all, allocated, or available). 1. **Peripheral list**: Displays available peripherals. Use this panel to allocate peripherals to a project. 1. **Core Projects section**: Shows each project with its assigned peripherals, signals, and pins. Use the **Expand All** and **Collapse All** arrows to control the view. Note Each project corresponds to a core in the device—for example, ARM Cortex-M4 or RISC-V. 1. **Configure peripheral**: Click **Configure** next to a peripheral in the Peripheral List or Core Projects section to open the Peripheral Settings Sidebar. 1. **Peripheral Settings Sidebar**: Configure settings such as pin assignments, parameters, and plugin options. ## Peripheral assignment types There are two types of assignments: - **Peripheral assignments**: An entire peripheral (such as UART0 or I²C2) is assigned to a single project. That project has full responsibility for initializing the peripheral, handling its interrupts, and managing its resources. - **Pin assignments**: Some peripherals, such as GPIO, allow assignment at the pin level. Even though the pins belong to the same peripheral, they can be assigned and managed independently by multiple projects. ## Allocate a peripheral to a project 1. In the Peripheral List, click **Assign** (**+**) to allocate a peripheral to a project. 1. If there is more than one project, select the project from the list to complete the allocation. Note For GPIO peripherals, individual pins are assigned instead of the entire peripheral. ### Limitations - After a peripheral is allocated to a project, it must be removed before it can be allocated to another project. See [Remove a Peripheral](#remove-a-peripheral). - Certain peripherals can only be allocated to specific projects due to hardware constraints. - If a peripheral is shared across multiple projects (such as GPIO0), the primary project is responsible for system-wide initialization, including configuring clock sources and frequencies. ## Enter peripheral settings When you allocate a peripheral, the Peripheral Settings sidebar opens. In this sidebar, you can complete the following actions: ### Add details Use the **Description** field to capture optional notes about the role of the peripheral in the project, for example: *“UART0 – Used for debug console output”.* ### Assign pins Note You can manage basic pin settings directly from the Peripheral Allocation page. This reduces navigation, while the full set of configuration options remains available in the dedicated **Pin Config** tab. If you need advanced settings or encounter issues, open **Pin Config** to complete the configuration. For more details, see [Pin Config](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/pin-config/index.md). #### Notes on pin behavior When you allocate a peripheral: - Required signals with a single possible pin are assigned automatically. - Optional signals, and signals with more than one possible pin, stay unassigned so you can select the pin that suits your layout. - Fixed-function signals on peripherals such as DAI0 don't display a toggle because their pin assignment can't be changed. - A signal assigned to a pin that another signal already uses creates a conflict to resolve. Warning Signals that require pin assignment or are in conflict display an error . To assign pins: 1. In the **Pin Assignments** section, review the available signals. 1. Toggle the pin to **on** to assign it. This enables the signal in generated code and updates the pin map in the **Pin Config** page. 1. If multiple pins are available, select one from the dropdown, then toggle it to **on**. 1. If a conflict appears when a pin is enabled, click the **Manage** chevron (**>**) to open the **Pin Config** tab. 1. To resolve the conflict, disable one of the functions assigned to that pin. 1. After resolving the issue, return to the **Peripheral Allocation** page to review configuration. ### Set configuration parameters The **Configuration** section in the Peripheral Settings Sidebar allows you to set parameters for any assigned peripheral that supports configuration. Configuration fields are defined in the SoC’s data model and can be extended or overridden by the code generation plugin. Use the **Reset to Default** option to restore all settings to their default values. ### Specify code generation plugin options The **Code Generation Plugin** section allows you to pass additional configuration to the code generation plugin for the selected peripheral. The available options depend on the firmware platform. Examples of plugin options for Zephyr include: - **Chosen**: Specifies the intended role or function of the peripheral in your application, for example: `console`, `debug`, `modem`. Multiple values can be entered as a comma-separated list. - **Frequency**: Defines the clock frequency to use during code generation for applicable peripherals. Fields marked with an asterisk indicate that a non-default value has been selected. ## Configure a peripheral 1. Locate the peripheral in the Core Projects section or in the Peripheral List. 1. Click **Configure** to open the Peripheral Settings Sidebar. Note For GPIO peripherals, you can configure either the entire GPIO peripheral (for example, GPIO1) or individual pins (for example, P1.8).\ Peripheral-level configuration and per-pin configuration are independent: configuring the peripheral does not override or duplicate individual pin settings. ## Remove a Peripheral When you remove a peripheral, its configuration is permanently discarded. If you add the peripheral again later, you must reconfigure it from scratch. To remove a peripheral: 1. Locate the peripheral in the Core Projects section or in the Peripheral List. 1. Click **Remove** . Removed peripherals and pins return to the Peripheral List and can be reallocated to any supported project. Note For GPIO peripherals: - You can only remove **individual pins**. - To remove the entire peripheral (for example, GPIO1), click **Configure** to open the Peripheral Settings Sidebar, then click **Remove** . ## Review peripheral assignment You can review peripheral assignments in the Core Projects section. Only peripherals with assigned signals appear here. Each listed peripheral includes the following: - **Signals**: All signals assigned to a peripheral. For example, RX and TX for UART0. - **Assigned Pins**: The physical package pin where the signals are mapped. For example, `P0.14 (14)` indicates GPIO pin P0.14 on package pin 14. # Pin Config The Pin Configuration tool allows you to graphically manipulate pin multiplexing and function selection within your processor, removing the tedious and error-prone elements of manual configuration. The tool flags conflicting configurations and displays the available pins and functions for each peripheral. ## Pin Config overview The Pin Config screen consists of several key components: 1. **Peripheral list**: View available peripherals. Click a peripheral to view associated signals. 1. **Filter options**: Use search bar and filters to locate specific pins or peripherals based on status. 1. **Pin Mux map**: View a visual representation of the pin multiplexing configuration. 1. **Assign pin**: Toggle a pin on or off to enable or disable pin assignment. 1. **Resolve conflicts**: Identify and correct conflicting pin assignments. 1. **Configure pin functions**: Click configure to open the configuration sidebar (7). 1. **Configuration sidebar**: View and modify the pin functions. ### Peripheral list The left panel displays a list of available peripherals. Click the arrow next to the peripheral to expand it and view associated pins. When a peripheral is selected, all of the pins not associated with that peripheral are greyed out and unavailable for selection on the pin map. ### Filter options Use the **Search** field to find any peripheral or pin by name or number. Non-matching entries will be hidden. Click **x** to reset the view. Click the filter buttons to filter by: - **Assigned** – Pins that are currently in use and allocated to a peripheral. - **Available** – Pins that are free and can be assigned to a peripheral. - **Conflicts** – Pins with multiple signals assigned, causing a conflict that must be resolved. ### Pin Mux map The pin mux map displays the current multiplexing configuration. It updates dynamically as peripherals are configured and displays available, in-use, and conflicting pins. Hover over a pin to view a summary of its assigned function and available assignments. Nodes and lines on the diagram show as bold when enabled and faint when disabled. Zoom in or out of the diagram by scrolling with your mouse wheel or using the zoom icons in the bottom-right corner. Click the fit to screen icon to resize the diagram to fit your window. The diagram can be dragged within the window using the left or primary mouse button. ### Assign pin Each expanded peripheral lists signals with their signal name and pin designation.\ Toggle the pin to 'on' to assign a signal to a pin. This enables the pin in the generated code and updates the map. Note Fixed-function signals on peripherals such as DAI0 don't display a toggle because their pin assignment can't be changed. ### Resolve conflicts Conflicts occur when multiple signals are configured to use the same pin and will cause operational errors.\ Conflicting signals appear as a red circle in the pin map. Hover over the pin to see which peripheral signals have been assigned. A conflict is also indicated in the list of peripherals with a red X To resolve a conflict, disable one of the functions associated with that pin. Tip Use the **Conflicts** filter to quickly locate all conflicting pins. ### Configure pin functions If the peripheral appears in [Peripheral Allocation](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/peripheral-allocation/index.md), ensure it's allocated to a core before proceeding with configuration. For signals that support pin reassignment, also ensure the pin is [assigned](#assign-pin). Select **Configure** to open the configuration sidebar and modify settings. The **Configure** icon only appears for signals that have applicable configuration options. ### Configuration sidebar The configuration sidebar allows you to modify settings for a signal when it has applicable configuration options. If the peripheral appears in [Peripheral Allocation](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/peripheral-allocation/index.md), these options are only available after the peripheral is allocated. For signals that support pin reassignment, they're also only available after the pin is assigned. The fields shown in the sidebar vary depending on the selected signal type: - GPIO signals provide all available configuration options, including the attached function and, in some environments, code generation metadata. The availability of these code generation fields depends on the selected firmware platform. Peripherals that allow assignment at the pin level, such as GPIO, also show a **Details** section with a **Description** field. Enter text in this field to document the purpose of the pin. The description is for reference only and doesn't affect code generation. - Peripheral signals expose basic options such as pull-up/pull-down state and power supply. The behavior and code generation settings of supported peripherals can be configured in the [Peripheral Allocation](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/peripheral-allocation/index.md) tool. Note Use the **Reset to default** link to revert any changes. # Resource Profiling report The Resource Profiling report provides resource and performance estimates for your model on the target hardware. ## Before you start This section assumes you have already generated a Resource Profiling report from the System Planner UI in [Manage AI Models](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/manage-ai-models/index.md). The report is an interactive, graphical report with filtering and recommendations panels. Tip To generate output for scripting and automation, use [`cfsutil ai profile`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/profile/index.md) from the terminal to create text or JSON reports. To reopen a previously generated report, select **AI Tools** > **Open Report** from the **Home** section of the CFS sidebar. ## Model performance overview The **Summary** section provides high‑level information about the model file and its expected run‑time performance on the target hardware. Tip When optimization recommendations are available, a banner appears at the top of this section. Click **View recommendations** to open the side panel containing memory recommendations, layer optimization opportunities, and MACs optimization opportunities. | Field | Description | | ------------------------------ | ------------------------------------------------------------------------------------------- | | MODEL | Filename of the model under test. | | MODEL PATH | Path to the model file on disk. | | CYCLES | Estimated compute cycles required to execute the model. | | LATENCY | End-to-end inference time in milliseconds, derived from cycles and max CPU clock frequency. | | LAYERS | Count of accelerated layers out of total layers on the selected target. | | FRAMEWORK | ML framework type. Currently only `TensorFlow Lite` is supported. | | MODEL SIZE | Memory required to store the model (in KB). | | DATA TYPE | Numerical precision defined in the model file. | | LAYER COUNT | Total number of layers in the model. | | Estimated Run-Time Performance | Visual graph showing available memory, model size, and run-time memory usage. | ## Optimization recommendations When optimization opportunities exist, the **Recommendations** panel presents model-level and layer-specific guidance to reduce memory usage and computational cost. Recommendations are grouped into memory, layer, and MACs optimization categories. ### Memory recommendations This section provides model-level insights related to memory usage patterns observed during analysis. For example, high memory variance across layers may indicate inefficient tensor lifecycles or excessive intermediate allocations. In such cases, the panel suggests techniques such as tensor lifecycle optimization or memory pooling to improve memory stability and reduce peak usage. ### Layerwise memory optimization opportunities This section highlights individual layers that are most likely to benefit from parameter-level optimizations. Layers are listed by index and operator type, along with targeted suggestions such as quantizing weights or introducing sparsity. ### MACs optimization opportunities This section identifies layers with high multiply–accumulate counts (MACs), which often dominate the overall compute cost. For each flagged layer, the panel suggests strategies to reduce computation, such as using sparse matrices or reducing hidden dimensions. ### Interpreting optimization opportunities Layer and MACs optimization opportunities include the following information: - Layer: Index of the layer in the model (for example: `0`, `1`, `2`). Click each layer to view it in the **Model Layers** table. - Operator: The operator used by the layer. - Suggestion: A targeted optimization hint based on the layer’s characteristics and observed cost. When you select a layer, the **Model Layers** table is filtered to show the corresponding layer. A summary below the table updates to reflect metrics for the currently displayed layers, including peak memory usage, total cycles, and estimated latency. ## Detailed layer metrics The **Model Layers** table lists every layer in the model along with its performance and resource metrics. It provides a detailed view for identifying performance bottlenecks. Each row can be expanded to show additional layer details by clicking the chevron icon on the right. | Field | Description | | ------- | ---------------------------------------------------------------------------------------- | | ID | Index of the layer in the model (for example: `0`, `1`, `2`). Matches the parser output. | | name | Layer name as parsed from the model (for example: `conv_1`, `dense_2`). | | cycles | Total compute cycles required to execute the layer. | | latency | Estimated runtime of the layer in milliseconds. | | energy | Estimated energy consumption of the layer in microjoules (µJ). | | MACs | Number of multiply–accumulate operations performed by the layer. | | memory | Memory footprint of the layer in KB. | ### Filtering and querying layer metrics The **Model Layers** table can be filtered using SQL like queries. Most valid SQL constructs are supported, including `WHERE`, `ORDER BY`, `LIMIT`, `LIKE` and `REGEXP`. Note `FROM` is not supported. | Filter | Query | | ------------------------------ | --------------------------------------------------------- | | Select specific columns | `SELECT name, latency` | | Layers with cycles > 100 | `SELECT * WHERE cycles > 100` | | Top 10 slowest layers | `SELECT ID, name, latency ORDER BY latency DESC LIMIT 10` | | Layers with MACs in a range | `SELECT * WHERE MACs BETWEEN 100000 AND 500000` | | Layer name contains “CONNECT” | `SELECT * WHERE name LIKE '%CONNECT%'` | | Layer name starts with “FULLY” | `SELECT * WHERE name REGEXP '^FULLY.*'` | ## Next steps Apply optimizations such as quantization or restructuring memory-intensive layers (as advised in the report), then re-run the analysis to confirm improved efficiency and compatibility with your hardware. # Profiling Use the Profiling feature in CodeFusion Studio to capture and visualize profiler traces from your Zephyr project. The profiler provides detailed, operator-level profiling for AI models, enabling deep analysis of inference performance alongside system-level metrics. Beta feature The Profiling tool is currently in **beta**. Some options or trace formats may change in future releases. ## About Zephelin [Antmicro](https://github.com/antmicro/zephelin) developed Zephelin as a middleware layer for Analog Devices. It extends Zephyr RTOS with advanced tracing and profiling capabilities, specializing in detailed AI operator-level performance analysis. Zephelin also captures system-level events such as task switches, interrupts, and timing information, providing a complete view of both AI inference and runtime behavior. ## Before you start Before you begin, create a Zephyr workspace using the [**Workspace Creation Wizard**](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-new-workspace/index.md). What you can profile depends on your processor and template: - **Basic system profiling** (CPU load, memory usage, and application call graph) is available for **any** Zephyr project — including non-AI templates such as **Zephyr Single Core Blinky**. Enable the Zephelin Profiler in System Planner. For processor-specific limitations, see the [release notes](https://developer.analog.com/docs/codefusion-studio/latest/release-notes/2.4.0/#known-issues-and-limitations). To add AI model profiling to an existing non-AI project, add a model configuration as described in [Manage AI Models](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/manage-ai-models/index.md). - **AI inference profiling** (per-operator TensorFlow Lite Micro timing) requires an AI-capable processor and a configured model. The **Zephyr Single Core TensorFlow AI Inference Profiling** template is the recommended starting point. It runs the same inference as the **Zephyr Single Core TensorFlow AI Model** template, with the Zephelin Profiler already configured. Supported processors include **MAX32690** and **MAX78002**. This template runs its inferences once at startup. Use **UART** to capture inference traces; UART is selected by default. - **USB trace capture** is supported on **MAX32690** on macOS and Linux hosts. Other supported processors capture traces over UART. Note On **MAX78002**, **MAX32650**, and **MAX32666**, USB trace capture is not available in this release because the High-Speed USB peripheral is not yet supported in the Zephyr devicetree, and selecting **USB** generates code that fails to build. Use UART to capture profiling traces on these processors. See the [release notes](https://developer.analog.com/docs/codefusion-studio/latest/release-notes/2.3.0/#known-issues-and-limitations). ## Configure and capture a profiling trace To capture profiling traces from your Zephyr project, set up the trace peripheral and configure the profiling options in System Planner, build and flash your project, then use the Trace Capture panel to collect trace data. ### Step 1. Set up the trace peripheral Open **System Planner** in your Zephyr workspace. The trace peripheral is configured in the **Peripheral Allocation** and **Clock Configuration** tools, both within System Planner. Set up the peripheral for the interface you plan to use before you configure the profiler in [Step 2](#step-2-configure-profiling-options), so it is available when you select the trace interface. #### For UART 1. Open **Peripheral Allocation**. If a UART peripheral is not already allocated to the application core, allocate one and configure its pin assignments as needed. 1. With the peripheral selected, select **Configure** to open the Peripheral Settings Sidebar. 1. In the **Code Generation Plugin** section, set (or confirm) the **baud rate**. This is the single source of truth for the UART baud rate: it is compiled into your firmware during code generation, and it is the value shown (read-only) in the **Baud Rate** field on the Profiling screen. 1. When you later capture a trace (see [Step 4](#step-4-capture-the-profiler-trace)), set the **same** baud rate in the **Trace Capture** panel. The host and the device must agree. If they do not match, the capture typically fails with a **Capture interrupted** error (see [Capture interrupted](#capture-interrupted)), or produces unreadable trace data. For complete details on allocating and configuring peripherals, see [Peripheral Allocation](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/peripheral-allocation/index.md). #### For USB USB trace capture is supported on **MAX32690** in this release. These steps apply to MAX32690. 1. Open **Peripheral Allocation**. If the USB peripheral is not already assigned to the application core, assign it. It typically appears as **USBHS** in the peripheral list. 1. Open **Clock Configuration**, expand the **Peripheral** section, and select and enable the USB peripheral. It typically appears as **High-Speed USB**. 1. Complete any additional clock settings the tool exposes. On MAX32690, this includes a selectable **Clock Source for USB PHY**. CodeFusion Studio provides a valid default; if you change the system clock configuration, follow any signposts or validation messages shown in Clock Configuration to keep the USB clock within the range the peripheral requires. 1. Connect an **additional USB cable** from your host PC to the USB device-controller connector on the board. USB trace data streams from the USB device controller on the processor, which is a **dedicated connector**, separate from the connectors used for power, debug, and serial output in your normal board setup. If this cable is not connected, the trace device does not enumerate and does not appear in the Trace Capture device list. Connector labels differ by board — check the documentation for your board. For example, on the **MAX32690 EVKIT**, power and serial output come in over **CN2** and debug over **J3**, while USB trace data is carried on **CN1**. Keep your normal board connections in place and add the USB trace cable in addition to them. For general guidance on connecting your board, see [Connect hardware](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/connect-hardware/index.md). ### Step 2. Configure profiling options 1. In **System Planner**, click the **Profiling** tab to see a list of cores in your workspace. 1. Turn on **Enable Zephelin Profiler** for each core you want to profile. 1. Click the expand arrow to configure profiling options for the selected core. 1. Configure the **Profiling Options**: - **Application Callgraph** – Enables instrumentation subsystem for capturing function call graphs and application-level tracing. Instrumentation starts when the trigger function enters and stops when the stopper function exits. By default, CodeFusion Studio uses the `main` function, capturing execution from when `main()` starts until it returns (if it returns). To customize the instrumentation scope, enter the corresponding symbol names in the **Trigger Function** and **Stopper Function** fields shown when this option is selected — see [Advanced: Customize instrumentation trigger and stopper functions](#advanced-customize-instrumentation-trigger-and-stopper-functions). - **AI Model Profiling** – Enables TensorFlow Lite for Microcontrollers (TFLM) inference tracing for supported processors. Only available when AI models are configured. For details, see [Supported processors and model formats](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/about/supported-ai-model-formats/index.md) and [Manage AI Models](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/manage-ai-models/index.md). By default, the profiler records up to 256 operator events per inference — a fixed value that isn't calculated from your model. Depending on your model, this can leave the trace incomplete or reserve memory for events your model never emits. See [Advanced: Adjust the TFLM profiler event limit](#advanced-adjust-the-tflm-profiler-event-limit) before capturing a trace. - **CPU Load** – Monitors CPU usage by sampling at regular intervals. When enabled, specify the profiling interval in milliseconds. The system reads the CPU load value at this interval and reports it to the host PC. - **Memory Usage** – Tracks memory consumption by sampling at regular intervals. When enabled, specify the profiling interval in milliseconds. The system reads the memory usage value at this interval and reports it to the host PC. 1. Configure the **Interface Options**: - **Select Trace Interface Type** – Select the interface used to transmit trace data to the host PC. Options include **UART** and **USB**. **If you select UART:** - **Trace Interface** – Select the UART peripheral used for trace output (for example, **UART0**, **UART2**, or **LPTUART0**). The available options depend on your SoC and which UART peripherals are allocated to this project in Peripheral Allocation. - **Baud Rate** – Displays the baud rate of the selected UART peripheral (typically 115200 for profiling). This field is read-only and reflects the value set in Peripheral Allocation. The UART peripheral you select here is the one you allocated in [Step 1](#for-uart), and its baud rate is set there too. **If you select USB:** - USB requires no additional fields on this screen. You assigned the USB peripheral and configured its clock in [Step 1](#for-usb). ### Step 3. Generate, build, and flash 1. In System Planner, click **[Generate Code](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/generate-code/index.md)**. 1. Enable **Generate AI Models** if your project includes an AI model. 1. Run the following [CFS tasks](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/build-and-flash/tasks/index.md): - **CFS: build** – Compiles your project (for example, creates `m4/build/zephyr/zephyr.elf`). - **CFS: flash** or **CFS: flash & run** – Programs your board using your configured debugger/runner (for example, OpenOCD or J-Link). You can run these tasks from the Command Palette, Actions view, or using `cfsutil` from the terminal. ### Step 4. Capture the profiler trace 1. Go to the **Trace Capture** section in the CFS sidebar. 1. If you see either a **Setup required** or **Source not available** message, select **Configure capture** to open the trace capture settings and select or reselect your trace source — the serial port for UART, or the USB device for USB. 1. In the **Trace Configuration** view, configure the following settings: **Trace Source Options:** - **Trace Interface Type** – Select the interface used to transmit trace data. **If you select UART:** - **Serial Port** – Select the serial port connected to your board. On Linux/WSL, this appears as `/dev/ttyUSB0` or similar. On macOS, this typically appears as `/dev/tty.usbserial*` or `/dev/cu.usbserial*`. On Windows, this appears as `COM3`, `COM4`, or another COM port. Ensure the port name matches your system exactly. - **Baud Rate** – Set the baud rate for the trace interface. This field defaults to 115200. Ensure this value matches the baud rate configured in your application's firmware. Click the reset indicator to restore the setting to its default value. **If you select USB:** - **USB Device** – Select the connected USB device from the list. The profiler firmware advertises itself as **Zephelin**, so the entry usually appears as **Zephelin - Bus *xxx*, Device* xxx*\*\*. If the host can't read the product name, the entry falls back to **Bus *xxx*, Device* xxx*\*\* with no name. The bus and device numbers are assigned by the host and can change when you reconnect or reflash the board, so use them only to tell devices apart, not as a fixed identifier. If no devices appear, build and flash firmware with USB tracing enabled, and confirm that the firmware is running. The **USB Device** list only shows connected Zephelin devices running on the USB bus. Reopen the list to refresh it. **General Settings:** - **Output Directory** – Specifies where trace files will be saved. By default, this is derived from the first non-`.cfs` workspace folder, for example `/tracefiles`. Click **Browse** to select a different location if needed. - **ELF File** (Optional) – The application binary file passed as metadata during trace conversion from binary format to TEF (Trace Event Format). By default, this is derived from the first non-`.cfs` workspace folder, for example `/build/zephyr/zephyr.elf`. Providing the ELF file enables symbolization of trace data, allowing the trace viewer to display function names and source code locations in the profiling results. Click **Browse** to select a different file if your binary is located elsewhere. If you leave this field empty, you can still start capture and conversion, but the UI displays a warning: **ELF not set. Trace conversion may fail depending on your configuration**. - **Build Directory** (Optional) – The application build output directory passed as metadata during trace conversion. By default, this is derived from the first non-`.cfs` workspace folder, for example `/build`. This helps locate debug symbols and source mappings when converting trace data to TEF. Click **Browse** to select a different directory if your build output is located elsewhere. **Live Tracing:** - **Enable Zephelin Live Tracing** – Streams trace data to the Zephelin Trace Viewer during capture rather than saving it to trace files for later viewing. When enabled, the remaining fields in this section become available. For the full workflow, see [Stream traces live](#stream-traces-live). - **TCP Server Host** – Address of the TCP server that receives the trace stream from CodeFusion Studio. Defaults to `127.0.0.1`. - **TCP Server Port** – Port of that TCP server. Defaults to `5000`. Accepts values from 1 to 65535. Values outside this range are adjusted to the nearest valid port. - **Backend Host** – Address of the Zephelin backend that serves the live viewer. Defaults to `127.0.0.1`. - **Backend Port** – Port of the Zephelin backend. Defaults to `8000`. Accepts values from 1 to 65535. Values outside this range are adjusted to the nearest valid port. Live tracing replaces file-based capture When **Enable Zephelin Live Tracing** is enabled, trace data is streamed to the viewer and no `.ctf` or `.tef` files are written. To capture trace files instead, disable live tracing. 1. Return to the **TRACE CAPTURE** panel and click **Start Capture**. Tip The **Configure** button (highlighted in the screenshot above) lets you modify trace settings in the **Trace Configuration** view after initial setup. Note Trace capture needs exclusive access to the trace device. For **UART**, close any serial monitor or terminal using the port before starting capture. For **USB**, make sure no other application has claimed the device. If another process is using the same device, the capture will fail with an error message. 1. While capture is running, the **TRACE CAPTURE** panel displays an elapsed time timer. The configuration settings are disabled until you stop the capture. 1. Begin trace data transmission. The method depends on your trace interface. **For UART**, restart your application while capture is running. The two most practical approaches are: - **Reset button** – If your board has a reset button, press it while capture is running. - **CFS: flash & run** – Run the **CFS: flash & run** task and wait for flashing to complete. Depending on your runner, the target may reset more than once during the operation, which can result in multiple trace files being generated during a single capture session. For applications that run once and exit (for example, the **Zephyr Single Core TensorFlow AI Inference Profiling** template), you may need to restart multiple times to capture additional trace data. **For USB**, trace capture is handled differently. The trace cannot start while the device is flashing or held in reset, and the device disappears from the **USB Device** list at those moments. Do not reset or reflash the board to trigger transmission. Instead, flash and start your application first, confirm it is running, then start capture. You can start capture at any point while the device is connected and running. Note USB captures only traced activity that occurs after capture starts. It therefore cannot capture inference traces from applications that run their inferences once at startup, such as the **Zephyr Single Core TensorFlow AI Inference Profiling** template. The inferences finish before capture can attach, and resetting the board to re-run them disconnects the USB device. Periodic metrics such as **CPU Load** and **Memory Usage** remain available. Use UART to capture traces from applications that run their inferences at startup. 1. Click **Stop Capture** when you have collected sufficient trace data. 1. When the capture completes successfully, a notification displaying **Traces captured successfully** appears with links to the generated trace files. Click a file link to open it directly, or click **Choose a file to open** to select from the full list. If you used **CFS: flash & run**, open the `.tef` file with the latest timestamp. If multiple `.tef` files share the latest timestamp, choose the `.tef` file created most recently (typically the one with the highest numeric suffix), for example `tracefile_20260622_161602_1.tef`. Note Trace files are saved in your output directory using the naming pattern `tracefile_YYYYMMDD_HHMMSS[_N]`, where a numeric suffix is added if multiple traces share the same timestamp. Two formats are generated: - **`.ctf`** – Binary trace data. - **`.tef`** – JSON trace data for the Zephelin Trace Viewer. Each application restart produces a separate pair of trace files. CLI-based trace capture For a terminal-based workflow, you can use `cfsutil tasks run` with the `--capture` and `--port` flags to automatically capture and convert trace data: ``` cfsutil tasks run flash_run_JLink --capture --port /dev/ttyUSB0 --project m4 ``` The CLI automatically detects CTF tracing and generates TEF files when you stop capture with Ctrl+C. For more information on running tasks, see [CFS Tasks](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/tasks/index.md). The `--capture` and `--port` flags support UART serial ports only. To capture over USB, use the **Trace Capture** panel in VS Code. ## Visualize trace data The [Zephelin Trace Viewer](https://marketplace.visualstudio.com/items?itemName=Antmicro.zephelin-trace) extension is automatically installed as a dependency of the CodeFusion Studio extension. To verify installation, view the **Dependencies** tab in the CodeFusion Studio extension details. You can open trace files in two ways: - **Immediately after capture**: When the capture completes successfully, a notification displays **Traces captured successfully** with links to the generated trace files. Click a file link to open it directly, or click **Choose a file to open** to select from the full list. - **From Explorer** (to revisit previously captured traces): In the VS Code **Explorer** view, locate the `.tef` file and click it to open in the Zephelin Trace Viewer. For a better viewing experience, right-click the trace viewer and select **Move to New Window** to get a full-screen experience. The trace viewer displays detailed profiling information based on the options you enabled in the Profiling Configuration: - **CPU Load** – Shows CPU usage sampled at the configured interval - **AI Model Profiling** – Displays inference time per layer for TensorFlow Lite Micro models - **Memory Usage** – Shows per-thread memory consumption with multiple visualization types Tip You can also use the [web-based Zephelin Trace Viewer](https://antmicro.github.io/zephelin-trace-viewer/), though the integrated extension provides a more seamless experience. Zephelin documentation For advanced configuration options—such as memory profiling and tracing scopes—see the official [Zephelin documentation](https://antmicro.github.io/zephelin/). These options can also be enabled in CodeFusion Studio through project configuration files. ## Stream traces live Live tracing forwards trace data to the Zephelin Trace Viewer while the capture is running. This allows you to monitor CPU load, memory usage, and AI inference timing as your application executes without opening a trace file afterwards. ### Requirements Live tracing requires the following two components: - **The [Zephelin Trace Viewer](https://marketplace.visualstudio.com/items?itemName=Antmicro.zephelin-trace) extension** is installed as a dependency of the CodeFusion Studio extension. It provides the viewer and launches the backend, but it does **not** include the backend. If the extension is disabled, live capture fails with `The Zephelin Trace extension is not installed or enabled.` - **The Zephelin backend**, which the extension runs from a copy of the [Zephelin repository](https://github.com/antmicro/zephelin) using a Python interpreter. CFS finds the repository in your Zephyr package and offers to create the interpreter in your workspace, which needs network access. If your Zephyr package doesn't include the Zephelin repository, or you want to use your own clone, see [Advanced: Set up the Zephelin backend manually](#advanced-set-up-the-zephelin-backend-manually). Warning The `zephyr/4.4.2` package contains Zephelin revision `77ade5b`, whose backend can't find the Zephyr repository, so live tracing fails to start with an error that begins with `Failed to start Zephelin backend`. Set up the backend from your own clone before you start a live tracing session, as described in [Advanced: Set up the Zephelin backend manually](#advanced-set-up-the-zephelin-backend-manually). The remaining steps are the same as for file-based capture: configure the Zephelin profiler in System Planner, then generate, build, and flash your project as described in [Step 2](#step-2-configure-profiling-options) and [Step 3](#step-3-generate-build-and-flash). ### Start a live tracing session 1. Go to the **Trace Capture** section in the CodeFusion Studio sidebar and select **Configure** to open the **Trace Configuration** view. 1. Set the **Trace Source Options** for your board exactly as you would for a file-based capture. Live tracing supports UART and USB capture. 1. Under **Live Tracing**, turn on **Enable Zephelin Live Tracing**. 1. Leave **TCP Server Host**, **TCP Server Port**, **Backend Host**, and **Backend Port** at their defaults unless those ports are already in use on your machine, or the backend runs somewhere other than the local host. 1. Return to the **TRACE CAPTURE** panel and select **Start Capture**. 1. If CodeFusion Studio prompts you to create the Python environment for the Zephelin backend, select **Create the Python environment** and wait for the installation to finish. This prompt can appear the first time you start a capture. The Zephelin Trace Viewer then opens automatically and starts displaying data as it arrives. 1. For UART, restart your application so it begins transmitting trace data. Press the board's reset button, or run the **CFS: flash & run** task, as described in [Step 4](#step-4-capture-the-profiler-trace). For **USB**, skip this step: resetting disconnects the device, and CodeFusion Studio starts the stream when the capture begins, so it attaches to an already-running application. 1. Select **Stop Capture** to end the session. The viewer stops receiving data. Live sessions don't create trace files, so there's no conversion step and no **Traces captured successfully** notification. ### How the connection is established When you start a live capture, CodeFusion Studio: 1. Activates the Zephelin Trace Viewer extension and opens the live viewer. It passes the configured backend endpoint and the AI model paths from your trace configuration. 1. Passes the backend and interpreter paths derived from your Zephyr package, unless you set `zephelin.backendPath` or `zephelin.pythonPath` yourself, as described in [Advanced: Set up the Zephelin backend manually](#advanced-set-up-the-zephelin-backend-manually). The extension starts the backend from those paths. 1. Connects to the TCP server at **TCP Server Host** and **TCP Server Port**. 1. Forwards trace data from the trace interface to the TCP server throughout the capture. The backend passes the data to the viewer, which displays it as it arrives. ### Advanced: Set up the Zephelin backend manually CodeFusion Studio looks for the Zephelin repository in the `modules/zephelin` directory of your [Zephyr package](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/available-packages/#zephyr-projects), and for the interpreter at `.venv-zephelin/bin/python` in the root of your open workspace, or `.venv-zephelin\Scripts\python.exe` on Windows. The repository must contain the backend (`server/run_backend.py`). A package that includes only the Zephelin library doesn't work. If CodeFusion Studio can't find the backend, or you want to use your own clone, follow these steps to set it up manually: 1. Clone the Zephelin repository and check out revision `2ffa839`. Earlier revisions of the backend can't find the Zephyr repository, so live tracing fails to start. ``` git clone https://github.com/antmicro/zephelin git -C zephelin checkout 2ffa839f47bafb697ed1a9a0e623cdc6472d58ce ``` 1. Create a virtual environment and install both requirements files from the clone: ``` cd zephelin python3 -m venv .venv source .venv/bin/activate python3 -m pip install -r requirements.txt -r server/requirements.txt ``` On Windows, activate the environment with `.venv\Scripts\activate` instead. 1. Point the Zephelin Trace Viewer extension at the repository clone and the interpreter, either in VS Code **Settings** or directly in `settings.json`: | Setting | Value | | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `zephelin.backendPath` | Absolute path to the Zephelin repository clone. | | `zephelin.pythonPath` | Absolute path to the Python executable in the virtual environment where the requirements are installed, for example `/.venv/bin/python`, or `\.venv\Scripts\python.exe` on Windows. | Both settings take precedence over the paths CodeFusion Studio derives from the Zephyr package. 1. Run **Developer: Reload Window** from the Command Palette. 1. Follow [Start a live tracing session](#start-a-live-tracing-session) to configure and start live capture. For the backend's own command line options and the standalone workflow outside VS Code, see the [Zephelin live tracing documentation](https://antmicro.github.io/zephelin/live_tracing.html). #### Zephelin settings managed by CodeFusion Studio CodeFusion Studio sets the following settings from the **Trace Configuration** view each time you save it, so you don't need to edit them. | Setting | Set from | | ------------------------- | ------------------- | | `zephelin.tcpServerHost` | **TCP Server Host** | | `zephelin.tcpServerPort` | **TCP Server Port** | | `zephelin.backendHost` | **Backend Host** | | `zephelin.backendPort` | **Backend Port** | | `zephelin.buildDir` | **Build Directory** | | `zephelin.tflmModelPaths` | **AI Models** | ## Troubleshooting ### Capture interrupted If the connection to the trace device is lost during capture — for example, the serial connection drops or the USB device is disconnected — the Trace Capture panel displays **Capture interrupted** with two options: - **Reconnect and retry** – Reconnects to the selected trace device and starts a new capture with your existing settings. This begins a new trace file rather than continuing the interrupted one. For USB, this works only if the device still has the same bus number and address. If it re-enumerates with a new address after disconnecting, use **Select source** to reselect it. - **Select source** – Opens the Trace Configuration view so you can reselect the serial port or USB device, adjust the baud rate (UART only), or change the output directory. Common causes of interrupted captures: - Another application claimed exclusive access to the serial port - The USB cable was disconnected or the board lost power - The serial port device name changed (common on Windows after reconnecting USB devices) - A mismatch between the baud rate in the Trace Capture panel and the baud rate compiled into the firmware (UART only), which can interrupt capture or produce unreadable trace data If reconnection fails repeatedly, verify the correct trace source is selected (serial port for UART, USB device for USB) and that no other application (such as a serial monitor or terminal) is using it. ### Live tracing fails to start The Trace Capture panel reports an error beginning with **Failed to start recording**, followed by the underlying cause. Common causes: - `The Zephelin Trace extension is not installed or enabled` – Install or re-enable the [Zephelin Trace Viewer](https://marketplace.visualstudio.com/items?itemName=Antmicro.zephelin-trace) extension, then run **Developer: Reload Window** from the Command Palette. - **The Zephyr package doesn't contain Zephelin** – CodeFusion Studio looks for the backend in your Zephyr package and can't find it. Find where the package is installed with `cfsutil pkg path zephyr`, as described in [Verify installation](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/manage-packages-cfsutil/#verify-installation), and confirm that `modules/zephelin/server/run_backend.py` exists there. If it doesn't, set up the backend as described in [Advanced: Set up the Zephelin backend manually](#advanced-set-up-the-zephelin-backend-manually). - **The Python environment is missing** – CodeFusion Studio found the backend but there's no interpreter at `.venv-zephelin/bin/python` (or `.venv-zephelin\Scripts\python.exe` on Windows) in the root of your workspace, because you declined or cancelled the prompt to create one. Start the capture again and select **Create the Python environment**. - **The manual backend settings are incorrect** – If you set `zephelin.backendPath` or `zephelin.pythonPath` yourself, those values take precedence over the paths CodeFusion Studio derives from the Zephyr package, so a wrong value breaks live tracing even when the package is fine. In VS Code **Settings** or `settings.json`, confirm that `zephelin.backendPath` is the absolute path to a Zephelin repository that contains `server/run_backend.py`, and that `zephelin.pythonPath` is the absolute path to the Python executable of a virtual environment where the requirements are installed. To use the Zephyr package again, clear both settings. - **The TCP connection could not be established** – CodeFusion Studio retries for about 20 seconds, then gives up if nothing is listening at **TCP Server Host** and **TCP Server Port**. Confirm that the Zephelin backend started and that it listens on that host and port. If another application uses the port, select a different **TCP Server Port** in the **Trace Configuration** view. - **The serial port is unavailable** – As with file-based capture, close any serial monitor or terminal holding the trace UART before starting capture. If a session starts and then drops, the panel shows **Recording error** with the reason, and the session is torn down so the serial port and TCP connection are released. Resolve the cause and start a new capture. ### No data appears in the live viewer If the viewer opens but stays empty, the application is most likely not transmitting yet. For UART, restart the application after starting the capture: press the board's reset button or run **CFS: flash & run**. Live tracing doesn't reset the target for you. For USB, don't reset the board. Stop the capture and start it again. If data still doesn't appear, confirm that the profiling options are enabled for the core you are capturing from (see [Step 2](#step-2-configure-profiling-options)). For UART, also confirm that **Serial Port** and **Baud Rate** match the trace interface configured in your firmware. ### Trace file fails to open If selecting a `.tef` file produces an unexpected error — for example, a dialog similar to: ``` Unable to open 'tracefile_YYYYMMDD_HHMMSS.tef'. Assertion Failed: Argument is undefined or null. ``` a compatibility issue with the installed version of the Zephelin Trace extension may be the cause. To recover: - **If automatic extension updates are enabled (default):** 1. Reload the VS Code window to apply any pending extension updates — open the Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`) and run **Developer: Reload Window**. 1. If the error persists, [disable automatic extension updates](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/manage-extension-versions/#disable-automatic-extension-updates) for the Zephelin Trace Viewer extension, then [try installing a different version](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/manage-extension-versions/#install-a-specific-version). - **If automatic extension updates are disabled:** Try updating the Zephelin Trace Viewer extension first — the issue may already be fixed in a newer release. If that doesn't resolve it, [try installing a different version](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/manage-extension-versions/#install-a-specific-version). ### Build fails with memory overflow after enabling profiling Enabling Zephelin profiling options increases memory usage and may cause the build to fail with linker errors. **Error signature:** ``` section 'XXXXX' will not fit in region 'XXXXX' region 'XXXXX' overflowed by XXX bytes ld returned 1 exit status ``` If you encounter this error, the device may not have sufficient memory to support profiling in the current application. You can try disabling some profiling options to reduce memory usage, but this may not resolve the issue. ### USB capture shows metrics but no inference traces If USB capture shows periodic metrics such as **CPU Load** and **Memory Usage**, but no inference traces, the application likely completed its inferences before capture attached. This occurs with applications that run their traced activity once at startup, including the **Zephyr Single Core TensorFlow AI Inference Profiling** template. Capture over UART instead. Start capture, then press the reset button or run **CFS: flash & run** to re-run the inferences. The profiling template selects UART by default. For instructions, see [Capture the profiler trace](#step-4-capture-the-profiler-trace). ## Advanced: Customize instrumentation trigger and stopper functions When you enable the **Application Callgraph** profiling option, the instrumentation subsystem captures function call graphs and application-level tracing. Instrumentation starts when the trigger function enters and stops when the stopper function exits. By default, CodeFusion Studio uses the `main` function as both trigger and stopper, capturing the entire execution from when `main()` starts until it returns. To scope instrumentation to a different function, enter its symbol name in the **Trigger Function** and **Stopper Function** fields, shown under **Application Callgraph** on the **Profiling** tab in System Planner. The trigger and stopper can be the same function or two different functions. After entering these values, regenerate the code and rebuild the project to apply them to the Zephyr instrumentation configuration. To use a function other than `main`: 1. **Ensure the function is not inlined.** To prevent inlining, specify the `__noinline` attribute in the function definition. This attribute is available from the `` header. ``` #include __noinline void run_inference(void) { // Your code here } ``` 1. **Run a pristine build** to generate the ELF file containing the function symbols. 1. **Extract the function symbol name** from the built ELF file. For C projects, the symbol name matches the function name. For C++ projects, the function symbol is typically mangled and must be extracted from the ELF file. ``` nm /build/zephyr/zephyr.elf | grep ``` For example, if your function is named `run_inference`: ``` nm m4/build/zephyr/zephyr.elf | grep run_inference ``` The output shows the symbol name. For C projects, this is typically the function name itself (`run_inference`). For C++ projects, this will be a mangled name like `_Z13run_inferencev`. ``` 10002888 T _Z13run_inferencev ``` 1. **Enter the symbol names in System Planner.** If the trigger and stopper are different functions, repeat steps 1–3 for each function. In **System Planner**, on the **Profiling** tab, expand the core and select **Application Callgraph**. In the **Trigger Function** field, enter the exact trigger symbol name. In the **Stopper Function** field, enter the exact stopper symbol name. If both roles use the same function, enter the same symbol name in both fields. 1. Save your changes. 1. **Regenerate code and run a pristine build** to apply the configuration changes, then reflash your project using **CFS: flash** or **CFS: flash & run** (see [Generate, build, and flash](#step-3-generate-build-and-flash)). ``` cfsutil tasks run pristine_build --project cfsutil tasks run --project ``` 1. Capture a new profiling trace following the steps in [Capture the profiler trace](#step-4-capture-the-profiler-trace). For more details about the instrumentation mechanism, see the [Zephyr Instrumentation documentation](https://docs.zephyrproject.org/4.3.0/services/instrumentation/index.html). ## Advanced: Adjust the TFLM profiler event limit By default, the TFLM profiler reserves memory for 256 operator events per inference and records up to that limit. Each operator emits at least one event, and an operator that runs more than once during an inference emits an event each time. Operators beyond the limit are not traced, and a warning is logged. A limit that is too low truncates the trace; a limit that is too high reserves unused memory. Adjust the limit to match the operator events your inference produces. If you don't know the event count, use the layer or operator count of the model as a starting point: 1. **Open the `prj.conf` file** in your project core directory. For example, if your core is named `m4`, the file is located at `/m4/prj.conf`. 1. **Set the event limit** to the number of operator events your inference produces: ``` # Support up to 512 TFLM events CONFIG_ZPL_TFLM_PROFILER_MAX_EVENTS=512 ``` 1. Save the file. 1. Run **[CFS: pristine build](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/build-and-flash/tasks/#cfs-pristine-build)** to apply the configuration change, then reflash your project using **CFS: flash** or **CFS: flash & run**. 1. Capture a profiling trace following the steps in [Capture the profiler trace](#step-4-capture-the-profiler-trace). # Registers The Registers feature displays registers used by the configuration code and their corresponding values. It also highlights registers that are modified due to changes in peripheral or signal configurations. Modified registers are marked with an asterisk (\*). ## Search and filter registers Use the **Search** field to locate registers by name or address. Use the preset filters to view registers with modified or unmodified values. ## View register details Click a register name to view its bit-level details, including individual bit values, access types, and descriptions. 1. **Hexadecimal values**: Displays the current and reset hexadecimal values. 1. **Binary values**: Shows the reset value in binary. Modified bits are highlighted with a distinct border. 1. **Field details**: Click a bit group or register field to view details such as access type (R/W), bit range, and description. # SRU Config The Signal Routing Unit (SRU) is a hardware crossbar switch available on [SHARC-FX processors](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/about/supported-processors/index.md) that connects peripheral inputs and outputs to each other, and to and from external pins. The SRU Config tool lets you configure this routing graphically, removing the need to edit hardware registers directly. The **SRU Config** tab only appears on the [System Planner dashboard](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/index.md) when the active System on Chip (SoC) is a SHARC-FX processor. ## SRU Config overview The **SRU Config** screen consists of two tabs: 1. **Connections** – Configure routing one peripheral at a time, with a full connection details view for each signal. 1. **Routing** – View and search all configured routes in a single table. ### Connections tab The **Connections** tab consists of several key components: - **Filter options**: Use the search bar and filters to locate specific signals or peripherals, for example searching for `SPT0A` or filtering to only **Modified** signals. - **Peripheral list**: View available peripherals and pin buffers in the side panel. Select the chevron to expand a peripheral or pin buffer group and reveal its individual entries. Each entry shows its input and output signal counts as a pair of badges, for example `→ 4` and `10 →` for four inputs and ten outputs. - **Signal connections**: Select an entry to view its input and output signals, for example the `SPT0A_CLK_I` input and `SPT0A_CLK_O` output of **SPORT 0A** (Synchronous Serial Port). - **Connection Details panel**: Select **Configure** on a signal to open the **Connection Details** panel and edit its routing. #### Filter options Use the **Search** field to find a signal or peripheral by name, alias, or description. When you enter a search term, a scope picker appears, letting you narrow the search to pin buffers, peripherals, signal names, or descriptions. Use the **All**, **Default**, and **Modified** filter chips to show only signals with their default routing or only signals you've changed. When your search text has no results for a filter chip, that chip is unavailable and the current filter stays active. #### Peripherals panel The peripherals panel lists **Pin Buffers** and **Peripherals** as two separate groups. Pin buffers are grouped by interface, for example **DAI1** (Digital Applications Interface) on current SHARC-FX processors. Select the chevron to expand the group and reveal its individual entries. Each entry uses a shorter label than its full signal name, for example **PB02** rather than `DAI1_PB02_O`. Peripherals with multiple instances, such as **SPORT**, also appear as an expandable accordion group; select the group to expand it with the chevron and reveal its individual entries, for example **SPORT 0A**, **SPORT 0B**, and so on. Peripherals with a single instance appear as flat rows. Each entry shows a name with a count of its input and output signals, shown as a pair of badges — for example `→ 4` and `10 →` for four inputs and ten outputs. Select the entry itself to view its signals in the main panel. If the active SoC has no SRU peripherals or pin buffers available, the panel displays an empty state instead of the list. #### Signal connections Selecting a peripheral entry, such as **SPORT 0A** (Synchronous Serial Port), displays its signals as signal cards in the main panel, grouped into **Input Signals** and **Output Signals**. Within each of these, signals are further grouped by their signal type (for example **Clock Signals** or **Data Signals**) and sorted by name within each type group. Numeric portions are sorted by value, so `SIGNAL2` appears before `SIGNAL10`. If no entry is selected, the main panel displays an empty state. Select the chevron on a signal to expand it in place and view its current connection. Select the connected signal's name to jump to its card, if it has one — fixed sources such as `LOW` aren't selectable. A signal with no connections shows **Unused** instead of a connection count, and can't be expanded. Each connection listed under an expanded output signal has an action. On a **Modified** connection, select **Reset Source** to revert the input to its default routing, clear its description and alias, and reset its polarity to normal. On a **Default** connection, select **Remove** to disconnect the input by routing it to the fixed `LOW` source while leaving its description, alias, and polarity unchanged. Selecting a pin buffer entry, such as **PB02**, displays a **Direction** menu (**Input**, **Output**, or **Bidirectional**) and the fixed package **Pin location** for that pin buffer, for example `DAI1_PIN02 (P18)`, above three sections in the main panel: - **Inputs** shows the dedicated input signal of the pin buffer, for example `DAI1_PB02_I`. - **Outputs** shows the dedicated output signal of the pin buffer, for example `DAI1_PB02_O`. - **Direction Controls** shows the enable signal of the pin buffer, for example `DAI1_PBEN02_I`. Changing **Direction** changes what the enable signal is routed to, and updates the other signals of the pin buffer to match: - **Output** routes the enable signal to a fixed **HIGH** source. - **Input** routes the enable signal to a fixed **LOW** source. - **Bidirectional** restores the last real signal that was routed to the enable signal, or opens a picker to select one if no real signal was routed to it before. ### Editing a connection Select **Configure** on a signal to open the **Connection Details** panel. The panel shows an input or output variant depending on the type of signal you select. #### Input signal - **Source Details** has only an **Output Signal** picker to select the output that drives the input. - **Destination Details** summarizes the input signal itself — its name, owning peripheral, and signal type — and includes its **Alias** field. Enter a name here to give the signal a custom display name. When a signal has an alias, CFS shows it as the primary label everywhere the signal appears — signal cards, the Connection Details panel, and picker fields — with the underlying signal name shown alongside it for reference. You can search for a signal by its alias or its name. - **Polarity control** has an **Invert signal polarity** checkbox. Select it to invert the signal, or clear it to use the default normal polarity. Signal cards and the **Routing** tab mark an inverted connection as **Modified**, even when it uses its default source. The **Connection Details** panel for the output derives the input status only from its source, so the same connection can appear as **Default** there. This section only appears for an input signal whose SoC data model supports hardware polarity inversion, such as `DAI0_PB19_I`. - Use **Description** to record a note about the input and its routing for anyone who reads the configuration later. #### Output signal - **Source Details** summarizes the output signal itself and includes its **Alias** field (see [Input signal](#input-signal) for what an alias does). - **Destination Details** has an **Input Signals** picker for adding inputs — an output can drive more than one input. Each connected input is also part of this section, as its own row: - A **Default** or **Modified** badge shows whether the row is at its default routing (the routing the SoC ships with) or routing you've changed. - Expand a row to edit that input's own **Description**. There's no single **Description** field for the output signal itself, since a single output can drive several inputs, each with its own description. - Select **Remove** on a row to remove that connection. The input signal alias, if any, is unaffected. What removal does depends on the row: - On a **Modified** row, it reverts the input to its default routing and clears the input signal description. The input signal polarity remains unchanged. - On a **Default** row, it disconnects the input by routing it to the fixed `LOW` source and leaves the input signal description unchanged. Note **Remove** is unavailable when the default routing is already `LOW`, since there's nothing left to disconnect. Edits are staged in the panel and only take effect when you select **Save**. Warning An output signal can drive more than one input. If you add an input that's already **Modified** — routed to a different output you (or someone else) previously changed — CFS shows a **Reroute selected input?** confirmation dialog before saving, listing the affected routing as `` → `` and asking "Do you want to continue?" Select **Confirm and Reroute** to proceed. ### Routing tab The **Routing** tab displays every configured connection in a single searchable table, rather than one peripheral at a time. Use the **All**, **Default**, and **Modified** filter chips to narrow the table, the same as on the **Connections** tab. The **Search** field here matches source and destination signal names and aliases only — it doesn't search descriptions, and there's no scope picker. An **Inverted Signal** icon appears next to the destination name for any input signal with polarity inversion enabled (see [Input signal](#input-signal)). Use the **Routing** tab to review or audit all routing across the SoC. Use the **Connections** tab to configure or edit routing for a specific peripheral. Each row has two actions: - **Reset Source** – Reverts the routing of that input to its default, clears its **Description** and **Alias**, and resets its polarity to normal. Unavailable if the row already uses its default routing with normal polarity. - **Configure** – Jumps directly to that signal's peripheral on the **Connections** tab, with the **Connection Details** panel already open. ## Key concepts - **Signal**: An input or output on an SRU-connected peripheral. Input signal names end in `_I`; output signal names end in `_O`. - **Pin buffer**: A group of signals that connects a peripheral to and from an external pin — an input signal, an output signal, and an enable signal named with a `_PBEN##_I` suffix (for example `DAI0_PBEN01_I`) that controls whether the pin buffer drives the pin. - **Connection**: A route from an output signal (source) to an input signal (destination). - **Signal group**: A peripheral instance, such as **SPORT 0A**, that groups the signals belonging to it. A signal group can contain multiple signal types, such as clock, data, or frame sync. - **Alias**: An optional, user-defined custom name for a signal, shown alongside the underlying signal name. - **LOW / HIGH**: Fixed logic-level sources, rather than routable signals. The default connections of a pin buffer tie its input signals to `LOW` and its enable signal to `HIGH` or `LOW` depending on pin direction, so unused pins default to a safe fixed state. ## Next steps After you select **Save**, CFS applies SRU connections, descriptions, and aliases to the open `.cfsconfig` editor. The file is marked as having unsaved changes until you save it, as with other System Planner edits. After configuring your SRU connections, use [Generate Code](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/generate-code/index.md) to apply the desired configuration. # Uninstall CodeFusion Studio ## Uninstall the extension from VS Code 1. Select the **Extensions** icon from the activity bar. Note You can also open Extensions using the keyboard shortcut **Ctrl + Shift + X** (Windows/Linux) or **Cmd + Shift + X** (macOS). 1. Find the **CodeFusion Studio** extension in the **INSTALLED** list. 1. Click on the **Manage** (cog) icon on the right hand side. 1. Select **Uninstall**. 1. Restart VS Code for the changes to take effect. Alternatively, reload the VS Code window by opening the Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`) and running **Developer: Reload Window**. Warning Uninstalling CodeFusion Studio does not remove its dependent extensions. These extensions (including Microsoft C/C++, Cortex-Debug, and Zephelin Trace Viewer) will remain installed in VS Code. If you no longer need them, uninstall each one separately using the same uninstall process. To view the complete list of dependent extensions, open the **Dependencies** tab in the CodeFusion Studio extension details before uninstalling. ## Uninstall from file system You can uninstall CodeFusion Studio using the Maintenance Tool. 1. Navigate to the directory where **CodeFusion Studio** is installed. - The Windows default location is `C:\analog\cfs\` - The macOS or Linux default location is `~/analog/cfs/` 1. Open the folder for the version you want to uninstall. 1. Launch the Maintenance Tool: - On Windows, double click **MaintenanceTool.exe** - On macOS, double click **MaintenanceTool.app** - On Ubuntu, double click **MaintenanceTool** 1. Select **Remove all components** and follow the prompt to continue. 1. Check that the correct directory is being removed and click **Uninstall**. 1. Wait while the Maintenance Tool uninstalls CodeFusion Studio. 1. When the process completes, close the uninstaller. ## Uninstall packages From CFS 2.0.0 and later, SDKs, plugins, and data models are installed using the [Package Manager](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/index.md). These packages are stored locally and are not removed when you uninstall CFS. To fully reset your environment and remove cached packages, delete the following directory: - **Linux:** `/home//.local/share/com.analog.cfs` - **macOS:** `/Users//Library/Preferences/com.analog.cfs` - **Windows:** `C:\Users\\AppData\Local\com.analog.cfs` ## Command line uninstall Use the following command to uninstall CodeFusion Studio from the default location: - Windows: `C:\analog\cfs\2.4.0\MaintenanceTool.exe purge` - Linux: `~/analog/cfs/2.4.0/MaintenanceTool purge` - macOS: `~/analog/cfs/2.4.0/MaintenanceTool.app/Contents/MacOS/MaintenanceTool purge` # Workspace management Learn how to create, open, and manage workspaces in CFS, view workspace templates in the Workspace Creation Wizard, and perform target-specific setup. - How to [Create a new workspace](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-new-workspace/index.md) - How to [Open an existing workspace](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/open-workspace/index.md) - How to [Explore and open MSDK examples](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/open-and-migrate-example/index.md) - How to [Migrate a project to System Planner](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/migrate-project-to-system-planner/index.md) - AI workspaces: - [Create workspace from AI model](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-workspace-from-ai-model/index.md) - [Deploy and profile an AI model](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/deploy-and-profile-ai-model/index.md) - Target-specific [setup steps](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/targets/index.md) # Create a new workspace New workspaces are created with the Workspace Creation Wizard. ## Launch the Workspace Creation Wizard 1. Click the CodeFusion Studio icon in the VS Code activity bar. 1. Click **New Workspace**. ## Create a workspace 1. Choose a processor from the list. You can type a partial name to filter the options. 1. Choose a board and package. For an ADI board, select the desired board under **Standard Boards and Packages**. For a custom board, select it under **Custom Board Packages**. 1. **Select a workspace template** or choose to **Manually configure the workspace** ### Manually configure the workspace Choose this option to set up your system configuration step by step. 1. Select one or more cores to include in your workspace. The primary core is mandatory and must be enabled to proceed. 1. Select a **Code Generation Plugin**. The available options depend on the core you select. - MSDK: Generates projects for MSDK platforms. - Registers-Only (bare-metal): This is intended as a reference for advanced workflows. It enables code generation for platforms that do not use Zephyr or MSDK. The generated code references registers directly using memory-mapped register (MMR) access. Build or debug support is not included as the generated register definitions are intended to be integrated into custom toolchains or external workflows. Registers-Only Plugin deprecated The Registers-Only Plugin is deprecated and will be removed in a future release. - SHARC-FX: Generates projects for SHARC-FX processors. - Zephyr: Generates projects based on the Zephyr RTOS. 1. Define the **Platform Options** for each core as described below. | Option | Description | | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | **Project Name** | Enter a unique name for each core to avoid issues during project generation. For example, use a core ID such as `CM4` or `RV` to clearly distinguish projects associated with different cores. | | **Zephyr Version** | Select the Zephyr release version to target. The available versions depend on the installed packages. | | **Build System** | Choose a build system such as **Ninja** or **Make**. **Ninja** is recommended and selected by default. | | **Board Name** | Specify the board name. For MSDK projects, use standard board names such as `EvKit_V1`, `APARD`, or `FTHR`. For Zephyr projects, use the format `//` as defined by the `identifier` field in your Zephyr board’s YAML file. For example, the board name for the MAX32690 FTHR board is defined in `/SDK/zephyr/zephyr/boards/adi/max32690fthr/max32690fthr_max32690_m4.yaml` under `identifier: max32690fthr/max32690/m4`. | | **Zephyr KConfig Flags** | Add optional Zephyr configuration flags. | | **Enable Core Dump** | Enables generation of debug metadata for retrospective crash analysis. Required for use with the [Core Dump Analysis Tool](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/core-dump-analysis/core-dump-overview/index.md). | | **Zephyr Additional CMake Arguments** | Provide extra compiler or linker options. | 1. Click **Continue** to move to the next core configuration. 1. Repeat until all cores are configured. ### Select a workspace template Choose a pre-defined SoC template with ADI-recommended configuration options. You can choose from single or multi-core options. ### Complete workspace setup 1. Enter the workspace name (use letters, numbers, underscores, dashes, and periods only. No spaces or other special characters are permitted). 1. Use the default location or uncheck the box to choose a different location. Note The workspace location can be edited manually or a new workspace location can be set using the **Browse** button. 1. Click **Create Workspace**. 1. If you receive the notification **Do you trust the authors of the files in this workspace?**, click **Yes, I trust the authors** to continue. 1. Once created, the workspace files will appear in the File Explorer, and the System Planner Configuration Tools dashboard will open. For information on using the dashboard, see [System Planner Configuration Tools](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/index.md). 1. If generation fails, error messages will guide you to resolve issues before trying again. ### Copy workspace settings You can create new workspaces based on the settings of an existing workspace by clicking **Configure Workspace** in the CodeFusion Studio interface. This opens the workspace creation wizard, pre-filled using the settings stored in your selected `.cfsworkspace` file. You can then modify options such as processor selection, board configuration, core settings, and firmware platform. For example, if you initially created a workspace for the MAX32690 EV kit using an MSDK template, you could use **Configure Workspace** to start from that setup but switch to a Zephyr template without starting from scratch. # Create a workspace from an AI model The Workspace from AI Model feature streamlines the creation of AI-ready development workspaces pre-configured for deploying and profiling machine learning models on Analog Devices microcontrollers. This workflow is optimized for quickly evaluating model compatibility and performance on target hardware. ## Overview Use this feature when you want to: - Quickly evaluate an AI model on Analog Devices hardware - Automatically generate a workspace pre-configured for AI deployment - Check model compatibility with target processor cores before committing to development - Profile your model's performance (inference time, memory usage) on actual hardware This workflow is optimized for ML engineers who want to move from a trained model to hardware evaluation with minimal embedded systems knowledge. The feature automates workspace creation, model integration, and compatibility checking. For general-purpose development without AI models, use the standard [Create a new workspace](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-new-workspace/index.md) workflow instead. ## Before you start Ensure you have the following: - **AI model file**: A trained model in a supported format (`.tflite` is commonly used for TensorFlow Lite models). For a complete list of supported formats, see [Supported AI model formats](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/about/supported-ai-model-formats/index.md). - **Sample input data** (optional): Test input data matching your model's input format. Example data files are available in the CodeFusion Studio repository at `cfs-ai/examples/` (for example, `hello_world_f32.bin` for the `hello_world_f32.tflite` model). ## Create a workspace 1. Click the CodeFusion Studio icon in the VS Code activity bar. 1. Click **New Workspace from AI model**. 1. In the **Files** section, configure your model and workspace settings: - **Model File** (required): Click **Browse** to open the **Model Zoo**, then select a model from the library or a local file. See [Select a model from the Model Zoo](#select-a-model-from-the-model-zoo). - **Sample Data** (optional): Click **Browse** to select sample input data for testing. When you select a Model Zoo model that provides sample data for the chosen quantization, this field is populated for you. For the hello_world examples, use the corresponding `.bin` file (for example, `hello_world_f32.bin` for `hello_world_f32.tflite`). Example data files are located in the `cfs-ai/examples/` directory of the [CodeFusion Studio repository](https://github.com/analogdevicesinc/codefusion-studio). - **Workspace Name** (optional): Enter a custom name for your workspace. If left blank, the system generates a name based on your SoC and package selection (for example, `MAX32690-TQFN`). 1. In the **SoCs** section, select your target hardware: - Use the search box to filter the list of available System-on-Chip (SoC) options - Select the SoC that matches your hardware (for example, **MAX32690**, **MAX78002**, **ADSP-SC5xx**) - Compatible SoCs display a **Compatible** badge after model compatibility checking completes Note Only SoCs with AI profiling support appear in this list. The catalog is automatically filtered to show compatible hardware. Compatibility checking runs automatically when you select a model file. 1. After selecting an SoC, select your development board from the **Board** menu. If only one board supports the selected SoC, it is selected automatically. 1. In the **Cores** section, select the core that runs your AI model: - Each core in the SoC is listed with its support status - Supported cores show a toggle labeled **Run model on core** - Unsupported cores display an **Unsupported** badge and cannot be selected - A supported core is initially pre-selected. When compatibility results are available, the selection is updated to a compatible core if one is found - You can select only one core at a time. Turning on **Run model on core** for another core turns off the previous selection 1. Click **Create Workspace**. If the compatibility check reported the selected core as incompatible, failed, or hasn't finished yet, a **Potential compatibility issues** dialog opens first. Click **Create anyway** to continue, or click **Cancel** to return to the wizard and select a different core or model. A workspace created despite this warning might not build or run as expected. If the check failed, see the **CodeFusion Studio** output for details. The system validates your selections, then generates the workspace and the AI model code. A notification shows the progress, and the **Create Workspace** button is disabled until generation finishes. Generating the AI model code can take several minutes. When generation is complete, the workspace opens automatically in a new VS Code window. To stop the process, click **Cancel** in the progress notification. If you cancel or generation fails, the partially generated workspace is removed. ## Select a model from the Model Zoo The **Model Zoo** is a library of AI models hosted by Analog Devices. When you click **Browse** on the **Model File** field, the Model Zoo opens so you can browse, search, and filter models, or select your own model from a local file. Select a model as described in [Select a model from the Model Zoo](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/manage-ai-models/#select-a-model-from-the-model-zoo). The model file field is populated in the **Files** section, along with the sample data field when the model provides sample data for the chosen quantization. The wizard keeps your selection and checks it for compatibility as you choose your SoC and cores in the later steps. You can access models from a custom Model Zoo. See [Use a custom model zoo](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/manage-ai-models/#use-a-custom-model-zoo). ## Field descriptions | Field | Required | Description | | ----------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Model File | Yes | The AI model to deploy. Select a model from the [Model Zoo](#select-a-model-from-the-model-zoo), local file or URL. Supported formats include `.tflite` (TensorFlow Lite), `.pth.tar` (PyTorch), and others. See [Supported AI model formats](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/about/supported-ai-model-formats/index.md). | | Sample Data | No | Test input data matching your model's input format. Must be a binary file (`.bin`) containing the input tensor data. Example files available in `cfs-ai/examples/` directory (e.g., `hello_world_f32.bin`). | | Workspace Name | No | Custom name for the workspace directory. If omitted, auto-generates as `{SoC}-{Package}` (e.g., `MAX32690-TQFN`). | | SoC | Yes | Target microcontroller family. Only SoCs with AI plugin support are shown. Compatible SoCs display a **Compatible** badge after automatic compatibility checking. | | Board | Yes | Specific development board variant. Available options depend on the selected SoC. Automatically selected when only one board is available. | | Run model on core | Yes | Toggle for each supported processor core. Turn on this option to target that core for model deployment. Only one core can be selected at a time. | ## Opening the workspace 1. The workspace and its AI model code are generated in your configured workspace location (typically `~/cfs/2.4.0/`) - The generated workspace includes a complete AI application that: - Loads your model file into memory - Runs inferences based on the provided data: - If sample data is provided, runs for `(sizeof(dataset)/sizeof(model_input))` iterations - If no sample data is provided, runs 10 inferences on random input data - Generates profiling information during execution 1. VS Code automatically opens the new workspace 1. A build process starts automatically to compile the AI application 1. The **[AI Hardware Profiling](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/deploy-and-profile-ai-model/index.md)** view (`.cfs/ai.cfsaiprof` file) opens ## Next Steps - [Deploy and profile your AI model](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/deploy-and-profile-ai-model/index.md) - Set up hardware connections and run the model on your development board - [View Compatibility Report](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/compat-report/index.md) - Check detailed compatibility analysis for each processor core - [View Resource Profiling Report](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/profiling-report/index.md) - Analyze performance metrics and memory usage # Deploy and profile an AI model After creating a workspace from an AI model, use the AI Hardware Profiling view to deploy your model to hardware and capture performance metrics. This interface guides you through hardware configuration, deployment, and profiling data collection. ## Before you start Ensure you have: - Created a workspace using [Create workspace from AI model](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-workspace-from-ai-model/index.md), or using [New Workspace](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-new-workspace/index.md) with an AI model template - Waited for the initial build to complete (status shows **Built**) - Connected your development board hardware - see [Connect hardware](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/connect-hardware/index.md) for detailed connection instructions: - Debug probe connected (such as J-Link or CMSIS-DAP) - USB/UART cable connected for serial output - Identified your serial port designation on your host system (see [Connect hardware](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/connect-hardware/#identify-your-serial-port)) ## Open the AI Hardware Profiling view If you create a workspace using [**Create Workspace from AI Model**](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-workspace-from-ai-model/index.md), the AI Hardware Profiling view (`.cfs/ai.cfsaiprof`) opens automatically. If you use [**New Workspace**](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-new-workspace/index.md) with an AI model template, such as **Zephyr Single Core TensorFlow AI Inference Profiling**, the `ai.cfsaiprof` file is created, but the view does not open automatically. To open the AI Hardware Profiling view for the first time, or resume where you left off, complete the following steps: 1. In the VS Code Explorer, navigate to the `.cfs` folder in your workspace 1. Open the `ai.cfsaiprof` file The profiling interface appears with hardware configuration options and status indicators. ## Understanding the interface The AI Hardware Profiling view contains several key sections: ### Status indicators Two status indicators appear at the top of the view: | Status | Possible Values | Description | | ----------------- | -------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Building** | Building → Built → Error | Indicates compilation status of the AI application. Must show **Built** before deployment. The initial build uses the standard build task for your project. | | **Deploy status** | Undeployed → Deploying → Running → Stopped → Error | Tracks model deployment and trace capture status. | ### Model Instructions This section provides guidance for hardware setup: - **How to run**: Explains that you need to connect a debugger to flash the application to your board. Select [Read more](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/connect-hardware/index.md) for detailed connection instructions. - **Capture Output**: Explains that you need to connect a USB/UART port to capture profiling data from the board. Select [Read more](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/connect-hardware/#identify-your-serial-port) for port identification guidance. Note The `` placeholders in these messages refer to specific ports on your development board. Consult your board's documentation or see [Connect hardware](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/connect-hardware/index.md) for board-specific connection diagrams. ### Configuration options Before deploying, configure your hardware connections: - **Host USB port designation**: Dropdown menu of available serial ports detected on your system. Select the port that corresponds to your board's UART connection. - **Run with**: Dropdown menu of available debuggers. Select your debug probe type (such as J-Link or CMSIS-DAP). ## Deploy the model Follow these steps to deploy your AI model to hardware: 1. Wait for the build to complete. The **Building** status indicator should show **Built**. - If the build fails (status shows **Error**), check the **Terminal** panel (**View → Terminal**) for compilation errors. - If you need to rebuild from scratch after editing code, select **Clean & Build**. 1. Verify your hardware connections are complete: - Debug probe is connected to your board and recognized by your system - USB/UART cable is connected - Board is powered on For detailed connection instructions, see [Connect hardware](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/connect-hardware/index.md). 1. In the **Run with** dropdown, select your debug probe type: - **J-Link** - for Segger J-Link debuggers - **CMSIS-DAP** - for CMSIS-DAP compatible debuggers (including MAX32625PICO) 1. In the **Host USB port designation** dropdown, select the serial port that corresponds to your board's UART connection. Example Typical port names: - **Windows**: `COM3`, `COM4`, etc. - **macOS**: `/dev/tty.usbserial-*` - **Linux**: `/dev/ttyUSB0`, `/dev/ttyACM0`, etc. If you're unsure which port is correct, see [Identify serial port designation](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/connect-hardware/#identify-your-serial-port). 1. Click the **Run** button. The deployment process begins: - Status changes from **Undeployed** to **Deploying** - The application is flashed to the hardware using the selected debugger - Once flashing completes, status changes to **Running** - The system begins listening on the serial port for profiling trace data 1. **Press the Reset button on your board** to restart the application and begin trace data transmission. For applications that run once and exit (such as the AI model profiling examples), you may need to press Reset multiple times to capture additional trace data. 1. When you have collected sufficient trace data, click the **Stop** button to end the capture session. The status changes to **Stopped** and a notification displays **Traces captured successfully** with links to the generated trace files. For captures that generate a `.tef` file, selecting **Stop** also converts the captured trace into a `.cfsreport` file and opens it automatically in the **Runtime Profile Report** view. If no traces were captured, you will see a notification saying **No traces were captured**. See [Troubleshooting](#troubleshooting) for common causes. ## View profiling results After successfully capturing traces, the notification provides links to the generated `.tef` files. Click a file link to open it in the Zephelin Trace Viewer. The trace viewer displays profiling information based on the options enabled in System Planner's **Profiling** tab. For details on available profiling options and how to interpret trace data, see [Profiling](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/profiling/index.md). For a better viewing experience, right-click the trace viewer and select **Move to New Window** to get a full-screen view. ### Runtime Profile Report For captures that generate a `.tef` file, the **Runtime Profile Report** that opens automatically after you select **Stop** shows measured performance from the trace, alongside a summary of the model: | Field | Description | | -------------------- | ---------------------------------------------------------------------- | | MODEL | Name of the model under test. | | MODEL PATH | Path to the model file on disk. | | FRAMEWORK | Runtime framework used on the target hardware, such as `TFLite Micro`. | | LAYER COUNT | Total number of layers in the model. | | AVERAGE LATENCY | Average inference time, measured on the target hardware. | | THROUGHPUT | Average inferences per second, measured on the target hardware. | | ITERATIONS | Number of inferences captured during the trace. | | LAYERS | Count of accelerated layers out of total layers on the target. | | RUN TIME PERFORMANCE | Visual graph showing available memory and run-time memory usage. | The **Model Layers** table lists per-layer timing and memory data measured from the captured trace. ## Troubleshooting **Issue**: "No traces were captured" notification appears after clicking Stop The board may not be sending profiling trace data. Common causes: - **You did not press the Reset button on the board** after clicking Run. The board must reset to start sending trace data. - **Profiling options not configured**: Open **System Planner** → **Profiling** tab and verify that profiling features are enabled for your core. For best results, enable at least **AI Model Profiling** plus one or more additional options (**Application Callgraph**, **CPU Load**, or **Memory Usage**). After making changes, select **Generate Code**, then select **Clean & Build** in the AI Hardware Profiling view to rebuild and try capturing again. - **Wrong serial port selected**: Verify you selected the correct serial port for your board's UART connection. See [Identify your serial port](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/connect-hardware/#identify-your-serial-port). - **Serial port in use by another application**: Close any serial monitor, terminal, or other application that might be using the same port. - **Board did not run**: Verify the board is powered on and the firmware was flashed successfully. Check the **Terminal** panel for flash errors. **Issue**: Deployment fails with `Model Deployment failed` error Check the **Terminal** panel (**View → Terminal**) for the specific error message and details. **Issue**: Build status stuck on **Building** The initial build can take several minutes depending on your system: - Check the **Terminal** panel to see build progress - For build errors, check that all required packages and toolchains are installed for your selected SoC ## Next steps - Analyze captured trace data in the Zephelin Trace Viewer to examine inference timing and performance - Generate [Compatibility Analyzer report](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/compat-report/index.md) and [Resource Profiling report](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/profiling-report/index.md) for additional static analysis of your model using the [Manage AI Models](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/manage-ai-models/index.md) tab - For more advanced profiling workflows and configuration options, see [Profiling](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/profiling/index.md) # Migrate a project to System Planner To enable System Planner in an existing project, you'll need to create a new workspace using the latest format. Most project files can be reused directly, but the .cfsconfig file must be recreated manually. This is because older .cfsconfig files are not compatible with the new System Planner format. Warning It is strongly recommended to keep a backup copy of the original project files. ## Migrate a project 1. Save a local copy of the original `.cfsconfig` file from your existing project. 1. Create a new workspace using the [workspace creation wizard](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-new-workspace/index.md). 1. Open the original `.cfsconfig` file in a text editor. Tip In VS Code, right-click the file and select **Open with**, then choose **Text Editor**. 1. Compare the new `.cfsconfig` file to the locally saved original and identify any missing top-level fields. 1. Use [System Planner](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/index.md) to update configurations as needed. For example, you may need to: - Allocate and configure peripherals - Assign and configure pins - Configure clocks - Allocate and partition memory - View registers. 1. Save your changes. 1. Verify the pin and clock assignments with System Planner. # Explore and open MSDK examples The MSDK provides example projects for each supported microcontroller. These examples demonstrate peripheral APIs, middleware, and other libraries, serving as references and starting points for your own applications. Note If you plan to migrate a project to System Planner, follow the steps in [migrate a project to System Planner](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/migrate-project-to-system-planner/index.md) ## Before you start Install the MSDK using the [Package Manager](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/index.md). CodeFusion Studio automatically locates the installed package and its examples. ## Open an example project 1. Click the CodeFusion Studio icon in the VS Code activity bar. 1. Click **Browse MSDK Examples**. Tip You can also open the **Command Palette** (`Ctrl+Shift+P` / `⇧⌘P` on macOS) and type **Browse MSDK Examples** to launch the same dialog. 1. In the dialog that appears, choose your target SoC. 1. Browse or search for the desired example. 1. Click **Select Example**. 1. Choose a destination folder to create a local copy of the project. 1. A new VS Code window opens. If you receive the notification **Do you trust the authors of the files in this workspace?**, click **Yes, I trust the authors** to continue. 1. If your existing project has not been configured as a CodeFusion Studio workspace, wait for the **Configuring** dialog box to complete before proceeding. ## Open multiple examples together (optional) You can open multiple example projects in a single workspace—for example, to compare code or build and run multi-core projects. ### Duplicate the example folder Warning We strongly recommend copying the example projects before modifying any files to preserve the original examples. 1. Open **File Explorer**. 1. Examples are located in the Package Manager package directory. Select **Browse MSDK Examples** to determine the correct location. - **Linux:** `/home//.local/share/com.analog.cfs/packages/conan/p/msdk/p/Examples` - **macOS:** `/Users//Library/Preferences/com.analog.cfs/packages/conan/p/msdk/p/Examples` - **Windows:** `C:\Users\\AppData\Local\com.analog.cfs\Data\packages\conan\p\msdk\p\Examples` 1. Copy the **Examples** folder to a writable location. ### Open the examples in VS Code 1. Launch **VS Code**. 1. Click the **Explorer** icon in the activity bar. 1. Click **Open Folder**. Tip You can also select **File > Open Folder** from the top menu. 1. Navigate to the location where you saved the examples. 1. Select two example projects to open. Warning You must select two distinct projects, each containing a **makefile** at the highest level in their respective folder structure. 1. If prompted with **Do you trust the authors of the files in this workspace?**, click **Yes, I trust the authors**. 1. If your existing project has not been configured as a CodeFusion Studio workspace, wait for the **Configuring** dialog box to complete before proceeding. 1. Confirm the projects are ready by expanding each `.vscode` folder and verifying that `settings.json` contains valid project settings. # Open an existing workspace ## Open a workspace file If the project contains a `*.code-workspace` file, open the file directly. 1. Click the CodeFusion Studio icon in the VS Code activity bar. 1. Click **Open Workspace** to open the file explorer. 1. Select the desired workspace and click **Open Workspace**. 1. After opening the workspace, the contents are displayed in the **Explorer** view in the primary side bar. Note On some systems, files starting with `.` are hidden by default. ## Open a folder If the project doesn't contain a `*.code-workspace` file, open the workspace directory using the following steps. 1. Click on the **Explorer** icon in the VS Code activity bar. 1. Click **Open Folder**. Tip Alternatively, click **File > Open Folder** from the menu. 1. If you receive the notification **Do you trust the authors of the files in this workspace?**, click **Yes, I trust the authors** to continue. 1. If a **Configuring** dialog box appears, wait for it to complete before proceeding. # Target-specific setup CodeFusion Studio supports multiple targets, allowing you to configure workspaces that match your hardware. The following pages provide reference guides for creating workspaces and applications for specific targets. For details on hardware implementation, refer to the relevant hardware reference manual. - How to enable and configure [TrustZone](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/targets/trustzone/index.md) projects # Arm® TrustZone® Arm® TrustZone® is a hardware-based security technology available on certain Arm processor cores, such as Cortex-M33. In CodeFusion Studio, the MAX32657 and MAX32658 devices include TrustZone support. It allows you to create independent **secure** and **non-secure** execution environments: - **Secure environment** — runs trusted code and protects sensitive assets, such as secure boot, cryptographic libraries, or key storage. - **Non-secure environment** — runs code that does not require isolation, such as the main application, drivers, and general-purpose user code. This separation ensures that critical assets and operations are protected, even if the non-secure code is compromised. In CodeFusion Studio, these execution environments are represented as separate projects in your workspace. Note For more background on TrustZone, refer to the [Arm TrustZone overview](https://www.arm.com/technologies/trustzone-for-cortex-m). ## Enable TrustZone support in CodeFusion Studio In CodeFusion Studio, TrustZone support is available when creating a new workspace on MAX32657 and MAX32658 devices using the **TF-M Secure Partition template**. This provides a ready-to-use TF-M setup with a secure baseline aligned with Zephyr and ADI defaults. ### Create a TrustZone-enabled project To create a TrustZone-enabled project, start by following the general steps in [Create a new workspace](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-new-workspace/index.md). 1. Select a MAX32657 or MAX32658 device, then choose a board. 1. In the **Workspace Creation Options** screen, select the **TF-M Secure Partition** template configured with Trusted Firmware-M (TF-M) support. This option automatically sets up a secure partition environment using ADI defaults. ### TrustZone project flags When you create a TrustZone-enabled workspace using the TF-M template, CodeFusion Studio clearly marks each project with a flag in [System Planner](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/index.md), helping you distinguish secure and non-secure configurations. # Tutorials # Tutorials - [GNU Debugger (GDB)](https://developer.analog.com/docs/codefusion-studio/latest/tutorials/gdb-tutorial/index.md) covering the basics of the GNU Debugger (GDB) and how to use it with CodeFusion Studio. - [MAX32657/MAX32658 Zephyr 4.4.0](https://developer.analog.com/docs/codefusion-studio/latest/tutorials/max32657-zephyr/index.md) covering how to build and run examples on MAX32657 and MAX32658 using the Zephyr 4.4.0 packages. # GDB Tutorial In this tutorial you'll find: - [GDB basics](https://developer.analog.com/docs/codefusion-studio/latest/tutorials/gdb-tutorial/gdb-basics/index.md) covering the basics of the GNU Debugger (GDB) and how to use it with CodeFusion Studio. - [GDB command types](https://developer.analog.com/docs/codefusion-studio/latest/tutorials/gdb-tutorial/gdb-command-types/index.md) overview of common GDB command categories and their purposes. - [GDB commands](https://developer.analog.com/docs/codefusion-studio/latest/tutorials/gdb-tutorial/gdb-commands/index.md) listing common GDB commands # GDB Basics The GNU Debugger (GDB) allows you to connect to and debug a wide variety of target devices. It consists of a pair of command-line tools: a GDB server, and a GDB client. These two tools are used together to locally or remotely analyze your program and asssembly code, and single step through the program. To use GDB, you start a GDB server which physically connects to the target device, and then connect to the server with a GDB client, allowing you to interact with the target device. ## Required Client Version CFS includes a pre-configured version of GDB, so you don’t need to install it separately. For best results, it is recommended to use GDB 7.12+ or later: - **GDB 7.12+** – Supports modern debugging features, including inline breakpoints. - **GDB 8.x+** – Adds improvements and bug fixes for a better debugging experience. Note You can check the GDB version by running `show version` in the VS Code debug console. # GDB command types The following GDB command types are available when you use the GNU Debugger (GDB) during a debug session in CodeFusion Studio. For practical command examples and syntax, see [GDB Commands](https://developer.analog.com/docs/codefusion-studio/latest/tutorials/gdb-tutorial/gdb-commands/index.md). ## Breakpoints Breakpoints allow you to set a precise location in your code where execution will stop automatically. GDB provides options to add conditions to breakpoints, allowing you to target specific errors that occur only under certain circumstances. ### Conditional breakpoints Conditional breakpoints allow you to break on a specific line of code only if a certain condition is met. For example, you can break on a line of code only if a variable is greater than a certain value. ### Temporary breakpoints Temporary breakpoints allow you to set a breakpoint that triggers once and then deletes itself. ### Delete existing breakpoint The recommendation is to delete breakpoints not in use as there are a limited number of hardware breakpoints available. ### Inline breakpoints Inline breakpoints allow you to pause execution within a specific expression or statement, such as inside a loop or method chain. ## Watchpoints Watchpoints are more powerful than breakpoints because they can evaluate multiple conditions or monitor when a specific variable is accessed or changed. This gives you greater control to inspect structures or arrays at specific times or debug memory access issues. The drawback is that they are much slower, since the debugger analyzes every instruction when a watchpoint is set. ## Stack backtrace Stack backtrace allows you to rollback the stack frames to see how execution and branching progressed through the code. This helps you diagnose where you were before hitting a breakpoint or stopping program execution. ## Info The `info` commands retrieve contextual information about the program’s current state, such as function arguments, core register values, and local or global variables. ## Print The `print` commands display or manipulate variables. They can show arrays in various formats, perform calculations on specific variables or memory addresses, and work with C files. ## Examine The `examine` commands show the address of a variable or the contents of memory. They can also display instructions and format information. `Examine` commands offer richer display capabilities than `print` commands and work with both C and assembly files. ### Examine source code The `examine source code` command allows you to access the assembly source code of a function. ## Find The `find` command allows you to scan a specific address range for a pattern or known value. You can use it to locate a specific instance, inspect stack space, or examine stack memory. It’s useful for checking stack overflow or watermark levels to see how much of the stack has been used. ## Multiple image support GDB normally parses one ELF file at a time. However, the `add-symbol-file` command allows you to load multiple ELF files in the same GDB session and dynamically switch between them. Use this command when debugging a system with multiple cores or images, allowing you to step across boundaries and continue debugging. # GDB Commands Use the following commands to interact with the GNU Debugger (GDB) and debug your program. Many of the commands have shortcuts that can be used to save time and keystrokes. ## Navigation | Command | Shortcut | Description | | ------------- | -------- | --------------------------------------------- | | ctrl+c | N/A | Halt the current program execution | | continue | c | Resume execution | | step | s | Step into the function | | step [value] | s 10 | Step the next 10 source lines | | next | n | Run the next line in the function (step over) | | next [value] | n 10 | Run the next 10 lines in current function | | until [value] | u 20 | Run until line 20 of the current file | | finish | f | Run to the end of the function or stack frame | ## Breakpoints | Command | Shortcut | Description | | ------------------ | ----------------------- | ---------------------------------------------------- | | break main | b main | Break on main () entry | | break on function | b main.c:func | Break on function () in main.c | | break on line | b main.c:18 | Break on line 18 of main.c | | break on condition | b main.c:18 if foo > 20 | Break if foo > 20 (boolean condition) | | break and delete | tbreak main | Fire once and deletes itself | | info breakpoints | N/A | Lists all breakpoints | | ignore 2 20 | N/A | Ignore breakpoint 2[1](#fn:1) for the first 20 times | | disable 2 | N/A | Disable breakpoint 2[1](#fn:1) | | delete 2 | N/A | Delete breakpoint 2[1](#fn:1) | ## Watchpoints | Command | Description | | ------------------------- | ------------------------------ | | watch foo | Watch foo | | watch myarray[10].val | Watch .val in myarray[10] | | watch \*0x1000FEFE | Watch memory addr 0x1000FEFE | | watch foo if foo > 20 | Conditional watch (foo >20) | | watch foo if foo + x > 20 | Complex conditional expression | | info watchpoints | Lists all watchpoints | | delete 2 | Delete watchpoint 2[1](#fn:1) | ## Stack Backtrace | Command | Shortcut | Description | | --------- | -------- | ------------------------------------------------- | | backtrace | bt | Display a stack backtrace (function call history) | | frame | | Display the current stack frame | | up | | Move up the stack | | down | | Move down the stack | ## Info | Command | Description | | ---------------- | --------------------------- | | info locals | List all local variables | | info variables | List all global variables | | info args | List all function arguments | | info registers | List all registers | | info breakpoints | List all breakpoints | | info watchpoints | List all watchpoints | ## Print | Command | Shortcut | Description | | -------------- | ------------------------- | -------------------------------------------- | | print | p | Print the value of a variable or expression | | print variable | p foo | Print the value of foo | | print multiple | p foo+bar | Print the complex expression of foo plus bar | | print/hex () | p/x &main | Print the address of main() | | print/hex () | p/x $r4 | Print the value of register r4 in hex | | print array () | p/a *(uint32_t[8]*)0x1234 | Print the array of 8 u32s at address 0x1234 | ## Variables | Variable | Description | | -------- | -------------------- | | a | Address | | b | Byte, 1B | | c | Character | | d | Decimal point | | f | Float | | g | Giant, 8B | | h | Halfworld, 2B | | i | Instruction | | o | Octal integer | | s | String | | t | Binary integer | | u | Unsigned decimal int | | w | Word, 4B | | x | Hex integer | | z | Padded hex | ## Examine FMT is a repeat count, followed by a format and size letter. | Command | Shortcut | Description | | ---------------- | ----------- | -------------------------------------------- | | examine/[FMT] | x | Examine the count in format and size | | examine variable | `x foo` | Examine memory at the address given by `foo` | | examine () | x/4c 0x581F | Show four characters at address 0x581F | | examine () | x/4xw &main | Show four words in hex at main() | ### examine source code | Command | Description | | ---------------------------------------------------- | ------------------------------------------------ | | list | Show source for the current location | | list \*0x1234 | Show source for address 0x1234 | | `list main.c:func` | Show source for `func()` from `main.c` | | disas func | List ASM code for func() | | find /b 0x0, 0x10000, 'H', 'e', 'l', 'l', 'o' 0x581f | search for a byte pattern between 0x0 to 0x10000 | | x/s 0x581f | Examine string at address 0x581f | ## Find | Command | Description | | ------- | ---------------------------------------------------------- | | find | Scan a specific address range for a pattern or known value | ## Multiple image support | Command | Description | | --------------- | ------------------------------------------- | | add-symbol-file | Adds new ELF file into the same GDB session | ______________________________________________________________________ 1. Breakpoint and watchpoint numbers can be determined by viewing the `$bpnum` variable immediately after creation. [↩](#fnref:1 "Jump back to footnote 1 in the text")[↩](#fnref2:1 "Jump back to footnote 1 in the text")[↩](#fnref3:1 "Jump back to footnote 1 in the text")[↩](#fnref4:1 "Jump back to footnote 1 in the text") # MAX32657/MAX32658 Zephyr 4.4.0 This tutorial gets you up and running with MAX32657 or MAX32658 development on Zephyr 4.4.0 using CodeFusion Studio. You install the required packages, run the Blinky example to verify your board, and then run the low power mode example. ## Prerequisites Before you begin: 1. Install the `zephyr/4.4.0-b.1` package (`zephyr_arm_toolchain/1.0.3` is installed automatically as a dependency): - **Command Palette:** Open the Command Palette and run **(CFS) Install Package**. Find `zephyr/4.4.0-b.1` in the list and install it. See [Install packages using the Command Palette](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/manage-packages-command-palette/index.md). - **Command line:** Run the following from the CFS Terminal. See [Install packages using cfsutil](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/manage-packages-cfsutil/index.md). ``` cfsutil pkg install zephyr/4.4.0-b.1 ``` 1. Install J-Link drivers **V8.94 or later** and configure your CFS J-Link (`cfs.jlink.path`) path to point to the J-Link installation directory — see [Install J-Link drivers](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-drivers/install-jlink-drivers/index.md). 1. Connect your EV Kit — see [Connect hardware](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/connect-hardware/#max32657-max32657evkit). ## Tutorials Run the tutorials in order — low power mode builds on the setup from Blinky. - [Blinky](https://developer.analog.com/docs/codefusion-studio/latest/tutorials/max32657-zephyr/blinky/index.md) — Flash an LED and verify your board. - [Low power mode](https://developer.analog.com/docs/codefusion-studio/latest/tutorials/max32657-zephyr/low-power-mode/index.md) — Step the device through its supported low power states. # Blinky Blinky is the simplest example and the one to run first — it verifies your board by flashing an LED and printing over UART. Before you begin, complete the [prerequisites](https://developer.analog.com/docs/codefusion-studio/latest/tutorials/max32657-zephyr/#prerequisites). ## Create the Blinky workspace [Create a new workspace](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-new-workspace/index.md), selecting **MAX32657** or **MAX32658** as the device, the **EvKit_V1** board, and the **Zephyr Single Core Blinky** template. ## Build Blinky 1. In the **Actions** view, select **Pristine Build (m33)** to build the project. 1. Confirm that the build completes successfully — the terminal output ends with `zephyr.elf`. ## View the serial output Blinky prints a message over the UART0 console each time the LED toggles. Set up the serial monitor before flashing so you capture the output. A USB connection creates a virtual serial port at **115200** baud. No extra hardware is required. 1. Identify which serial port the board is using: - **Windows:** Open Device Manager → **Ports (COM & LPT)** and note the COM port (for example, `COM3`). - **macOS:** Run `ls /dev/tty.*` in Terminal and look for `/dev/tty.usbserial-*` or `/dev/tty.usbmodem*`. - **Linux:** Run `ls /dev/ttyUSB* /dev/ttyACM*` in a terminal and look for `/dev/ttyUSB0` or `/dev/ttyACM0`. Tip Unsure which port? Disconnect the cable, note which ports disappear, then reconnect. For additional troubleshooting steps, see [Connect hardware](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/connect-hardware/#troubleshooting). 1. Open a serial terminal. To use the VS Code Serial Monitor: 1. Install the [Serial Monitor](https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-serial-monitor) extension from the VS Code Marketplace, if it is not already installed. 1. Select the **Serial Monitor** tab in the panel, next to the **Terminal** and **Output** tabs. 1. Set the Monitor Mode to **Serial**. 1. Set the Port to the port you identified in step 1. 1. Set the Baud rate to **115200**. 1. Click **Start Monitoring**. For other terminal options (Tera Term, Minicom, or PuTTY), see [Serial output](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-interface/#serial-output). ## Flash and run In the **Actions** panel, click **Flash & Run (J-Link)(m33)**. When flashing completes, LED0 on the EV Kit blinks and the serial terminal prints a message each time the LED changes state. ## Modify and debug 1. In the **Explorer**, open `m33/src/main.c`, find the line that defines `SLEEP_TIME_MS`, and change the default from `1000` to `300` to make the LED blink faster. 1. Rebuild the project. 1. Select the **Run and Debug** icon on the **Activity Bar**. 1. From the menu, select **CFS: Debug with JlinkGDBServer and JLink (Arm Embedded)**. 1. Click the **Start Debugging** icon (green play button) or press **F5**. The debugger halts execution at the start of `main()`. 1. Use the debug action buttons in the VS Code toolbar to control execution. 1. Click **Step Over** repeatedly to single-step through the `while (1)` loop. As you step past each toggle, the LED turns on, then off. 1. Click **Continue** to resume running. The LED blinks at the new, faster rate, and the serial terminal shows the ON/OFF messages. For more on breakpoints, variable inspection, and stepping, see [Debug an application](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-an-application/index.md). CFS also includes additional debugging tools. See [Debug tools](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/index.md). # Low power mode The **Zephyr Single Core PM GPIO Wakeup** template demonstrates Zephyr power management on MAX32657/MAX32658. The template enables power management and configures a button as a wake-up source by default, so no manual setup is required. The wake-up button is preconfigured to `P0.12` (devicetree alias `sw0`, labeled **SW2** on the EV Kit). For pin assignments, see [System Planner](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/index.md). The example cycles through the enabled low power states for the MAX32657/MAX32658 CPU: runtime idle, standby, and suspend to RAM. Before you begin, complete the [prerequisites](https://developer.analog.com/docs/codefusion-studio/latest/tutorials/max32657-zephyr/#prerequisites) and then run [Blinky](https://developer.analog.com/docs/codefusion-studio/latest/tutorials/max32657-zephyr/blinky/index.md) first. ## Build the example [Create a new workspace](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-new-workspace/index.md), selecting **MAX32657** or **MAX32658** as the device, the **EvKit_V1** board, and the **Zephyr Single Core PM GPIO Wakeup** template. In the **Actions** view, select **Pristine Build (m33)** to build the project. ## Run and monitor the example In a low power state, the device is idle and gives no outward sign of activity — that is intended. Use the serial console to confirm which state the device entered and that the button press woke the device. The example prints the active power state over the UART0 console at **115200** baud. 1. Open a serial terminal connected to the EV Kit at **115200** baud, as described in [View the serial output](https://developer.analog.com/docs/codefusion-studio/latest/tutorials/max32657-zephyr/blinky/#view-the-serial-output). Connect it **before** you flash to capture the startup output. 1. In the **Actions** panel, click **Flash & Run (J-Link)(m33)** to program the device. The device boots and enters the first low power state. The serial terminal shows output similar to the following: ``` Device ready: max32657evkit Press the user button to wakeup device from deepsleep mode: Entering PM state RUNTIME_IDLE ``` 1. Press the **SW2** button on the EV Kit to wake the device. The serial terminal reports the next power state: ``` Entering PM state STANDBY ``` 1. Repeat the previous step to step through each power state (the next is suspend to RAM). After the last state, the example returns to the first. Logging runs in immediate mode This example uses immediate-mode logging so that deferred log work does not wake the device while it is in a low power state. ## Next steps You have now verified that the MAX32657/MAX32658 can enter and wake from its supported low power states using a GPIO wake-up source. Try the other MAX32657/MAX32658 templates in the Workspace Creation Wizard, or continue with the CodeFusion Studio documentation to learn more about [debugging applications](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-interface/index.md), using [debug tools](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/index.md), configuring SoC resources with [System Planner](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/index.md), and automating workflows with [cfsutil](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/index.md). # Release Notes # Release Notes - [2.4.0 Release Notes](https://developer.analog.com/docs/codefusion-studio/latest/release-notes/2.4.0/index.md) - [2.3.0 Release Notes](https://developer.analog.com/docs/codefusion-studio/latest/release-notes/2.3.0/index.md) - [2.2.1 Release Notes](https://developer.analog.com/docs/codefusion-studio/latest/release-notes/2.2.1/index.md) - [2.2.0 Release Notes](https://developer.analog.com/docs/codefusion-studio/latest/release-notes/2.2.0/index.md) - [2.1.0 Release Notes](https://developer.analog.com/docs/codefusion-studio/latest/release-notes/2.1.0/index.md) - [2.0.2 Release Notes](https://developer.analog.com/docs/codefusion-studio/latest/release-notes/2.0.2/index.md) - [2.0.1 Release Notes](https://developer.analog.com/docs/codefusion-studio/latest/release-notes/2.0.1/index.md) - [2.0.0 Release Notes](https://developer.analog.com/docs/codefusion-studio/latest/release-notes/2.0.0/index.md) - [1.1.0 Release Notes](https://developer.analog.com/docs/codefusion-studio/latest/release-notes/1.1.0/index.md) - [1.0.2 Release Notes](https://developer.analog.com/docs/codefusion-studio/latest/release-notes/1.0.2/index.md) - [1.0.0 Release Notes](https://developer.analog.com/docs/codefusion-studio/latest/release-notes/1.0.0/index.md) See [Help](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/about/help/index.md) for details on how to get support with CodeFusion Studio. # 1.0.0 Release Notes ## Source CodeFusion Studio source can be found on [GitHub](https://github.com/analogdevicesinc/codefusion-studio/releases/tag/V1.0.0/) under tag `V1.0.0` ## About this release CodeFusion Studio 1.0.0 is the first release of CodeFusion Studio. This release includes support for various MAX32xxx and MAX7800x parts using the Micro SDK or Zephyr. Pin and Clock config tools are available, as well as an ELF Explorer utility. ## What's new ### Tools - **Pin Config Tool**: Manage pin multiplexing and pin config choices in a graphical environment, before generating code for your SoC. - **Clock Config Tool**: Enable or disable the clock to various peripherals, and configure any dividers, muxes, or intermediate steps in the clock tree. - **ELF File Explorer**: Perform detailed analysis and inspection of ELF file contents. Currently limited to GCC-derived ELF files. - **Quick Action Panel**: Access quick links to perform common tasks like **build**, **clean**, **flash**, and **debug**. - **CFS Build Task Icons**: Execute selected tasks for the active project with the status bar icons. - **CFS Terminal**: Use a terminal variant to VS Code that is aware of CFS settings and paths. Call `cfsutil`, Zephyr's `west`, and more without any manual configuration. ### SDK and software - Support for Zephyr 3.7. [Get started](https://docs.zephyrproject.org/3.7.0/) - Support for the Micro SDK (MSDK). [Get started with MSDK](https://analogdevicesinc.github.io/msdk/USERGUIDE/) ### Host architecture support CodeFusion Studio is supported on the following host operating systems: - Windows 10 or 11 (64-bit) - macOS (ARM64) - Ubuntu 22.04 and later (64-bit) ### Target architecture support Introduced support for the following processors: | Processor | MSDK | Zephyr | Pin Config | Clock Config | | ------------------------------------------------------------ | ---- | ------ | ---------- | ------------ | | [MAX32655](https://www.analog.com/en/products/MAX32655.html) | Yes | - | - | - | | [MAX32662](https://www.analog.com/en/products/MAX32662.html) | Yes | - | - | - | | [MAX32670](https://www.analog.com/en/products/MAX32670.html) | Yes | - | - | - | | [MAX32672](https://www.analog.com/en/products/MAX32672.html) | Yes | - | - | - | | [MAX32675](https://www.analog.com/en/products/MAX32675.html) | Yes | - | - | - | | [MAX32690](https://www.analog.com/en/products/MAX32690.html) | Yes | Yes | Yes | Yes | | [MAX78000](https://www.analog.com/en/products/MAX78000.html) | Yes | - | - | - | | [MAX78002](https://www.analog.com/en/products/MAX78002.html) | Yes | - | Yes | - | ## Known Issues ### Project management issues - No `launch.json` in imported Zephyr samples. - Zephyr samples do not have a `launch.json` generated when imported. When trying to debug, you will be prompted to create a new `launch.json` file which you can modify as required. ### Tools Issues - Clock speeds displayed in Clock Config tool - The clock displayed on the canvas is the input clock to the peripheral and may not take into account any internal clock dividers in the peripheral itself. Such internal clock dividers are generally configured when initializing and configuring the peripheral in your application code. - Pin Config for MAX78002 - SWD pin configuration (`MISC.SWDIO` and `MISC.SWCLK`) may not work as expected. Leave `SWDIO`, `SWCLK`, and `GPIO` pins `P0.28` or `P0.29` disabled in the pin config tool. - Pin Config for MAX32690 - `P0.18`, `P3.8`, and `P3.9` cannot be assigned or configured on the MAX32690 WLP. They can only be used in the default power on mode (inputs, no pulls, using VDDIO). - Spurious compilation errors in headers - Incomplete IntelliSense Configuration prevents IntelliSense scanning all include paths which may result in false entries in the **Problems** tab. These can be ignored if the application builds successfully. - GPIO pull strength is inverted under Zephyr. - The Zephyr 3.7 version of the `MXC_GPIO_Config()` function sets the pull strength inverted. When using Zephyr, set the **Select Pull-up/Pull-down** field in the **Pin Config** tool to the opposite strength of what you require: | Required Value | Select in Config Tool | Value of GPIOn_PS | | ---------------- | --------------------- | ----------------- | | Strong Pull-Up | Weak Pull-Up | 0 | | Weak Pull-Up | Strong Pull-Up | 1 | | Weak Pull-Down | Strong Pull-Down | 1 | | Strong Pull-Down | Weak Pull-Down | 0 | Note For MSDK projects the values are correct and should be used normally within the **Pin Config** tool. The value of the GPIO pull select `PS` register should be 0 when strong and 1 when weak. - ELF File Explorer doesn't refresh automatically. - If you modify an ELF file while it is open in the ELF Explorer, you will need to close and reopen the file to see any changes. ### Debug issues - Segger JLink does not support all parts. See the following table for details. | Part | Issue | Alternatives | | ------------ | --------------------------- | ---------------------------------------------- | | MAX32662 | Not supported | Use MAXPICO debugger instead | | MAX32670 | Not supported | Use MAXPICO debugger instead | | MAX32690FTHR | Serial output not available | Use MAXPICO debugger if you need serial output | | APARD32690 | Serial output not available | Use MAXPICO debugger if you need serial output | | MAX78000FTHR | Not supported | Use MAXPICO debugger instead | | MAX78002 | Not supported | Use MAXPICO debugger or MAX78000 instead | Note When selecting a JLink session for the MAX78002, CodeFusion Studio will use a MAX78000 session implicitly so no manual intervention is required. - M4 core breakpoints are also set on RISC-V core. - If debugging a dual core application and setting a breakpoint on the M4 that could also apply to the RISC-V core such as a file and line combination or a symbol that is present in both images, then that breakpoint will also be applied to the RISC-V core errorenously. This can be avoided by either using a unique file or symbol name on each core or setting the breakpoints directly from the disassembly view. - Another side effect of this is that the RISC-V appears to have 2 breakpoints set on `main`, so you may need to run or step twice to run beyond the first line in your `main` function. # 1.0.2 Release Notes ## Source CodeFusion Studio source can be found on [GitHub](https://github.com/analogdevicesinc/codefusion-studio/releases/tag/V1.0.2/) under tag `V1.0.2` ## About this release CodeFusion Studio 1.0.2 is a patch release to fix a critical bug related to [VS Code 1.98 (February 2025)](https://code.visualstudio.com/updates/v1_98). CodeFusion Studio 1.0.0 does not work correctly with VS Code 1.98+ due to a change in Node.js, which breaks webview-based features, including: - ELF File Explorer - Config Tools (Pin Mux, Clock Config) Upgrade to CodeFusion Studio 1.0.2 to resolve this issue. If upgrading is not immediately possible, use [VS Code 1.97.2](https://code.visualstudio.com/updates/v1_97). ## What's new ### Bug fixes - Fix incompatibility issue with VS Code 1.98 (February 2025) - Fix issue with README.md ## Known Issues See [1.0.0 known issues](https://developer.analog.com/docs/codefusion-studio/latest/release-notes/1.0.0/#known-issues) for other issues. # 1.1.0 Release Notes ## Source CodeFusion Studio source can be found on [GitHub](https://github.com/analogdevicesinc/codefusion-studio/releases/tag/V1.1.0/) under tag `V1.1.0` ## About this release CodeFusion Studio 1.1.0 introduces major enhancements for multi-core development, including multi-core project management, heterogeneous multi-core debugging, and powerful resource partitioning tools. ## What's new ### Tools - [**System Planner**](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/index.md): A new centralized interface for accessing configuration tools and managing workspace resources, including cores, peripherals, clocks, pins, and memory partitions. - [**Memory Allocation**](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/memory-allocation/index.md) – Define and manage memory partitions per core to optimize resource distribution across multi-core SoCs. - [**Peripheral Allocation**](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/peripheral-allocation/index.md)– Assign and configure peripheral blocks per core directly within the System Planner. - **Heterogeneous Multi-Core Debugging** – Debug multiple cores in a single environment, eliminating the need for multiple IDEs. - [**Device Tree View**](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/developer-tools/device-tree-view/index.md): Enables hardware component review for Zephyr-based projects, improving visibility and configuration management. - [**Workspaces for Multi-Core Projects**](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-new-workspace/index.md) – Projects are now upgraded to workspaces, allowing one project per core for better organization and management. This ensures a streamlined development process across multiple cores in a unified workspace. - **UX upgrades** - Improved accessibility and usability for the [**Registers**](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/registers/index.md) page and [**Pin Config**](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/pin-config/index.md) page. - **Context menu enhancements** – With the move to multi-project per core workspaces, context-based action filtering has been introduced. Clicking on a project in the **Context** panel dynamically updates the **Actions** panel to display only relevant actions. - [**Catalog Manager**](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/developer-tools/catalog-manager/index.md) – A background service that automatically syncs the SoC data model, ensuring up-to-date information on cores, boards, and other hardware configurations. - [**Plugin based project creation**](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/plugins/index.md) – A flexible, extensible plugin architecture that cleanly separates configuration from code generation, allowing developers to create plugins that align with internal standards. ### Development platforms and tools - Support for Zephyr RTOS 4.1 [Get started](https://docs.zephyrproject.org/4.1.0/) - Support for the Micro SDK (MSDK) [Get started with MSDK](https://analogdevicesinc.github.io/msdk/USERGUIDE/) - Support for Registers-only (bare-metal) – A reference plugin for advanced workflows that generates MMR-based code for use in custom toolchains. - Compiler and debug support available for Zephyr (ARM Cortex-M only) and MSDK (ARM Cortex-M and RISC-V) projects. #### Supported versions | Component | Version | | -------------------------- | --------- | | Arm GNU Toolchain | 14.2.Rel1 | | xPack GNU RISC-V Toolchain | 14.2.0-3 | | Zephyr RTOS | 4.1.0 | | Zephyr SDK | 0.17.0 | ### Host architecture support CodeFusion Studio is supported on the following host operating systems: - Windows 10 or 11 (64-bit) - macOS (ARM64) - Ubuntu 22.04 and later (64-bit) ### Target architecture support Introduced support for the following processors: | Processor | MSDK | Zephyr | Config Tools | TESA | | -------------------------------------------------------------- | ---- | ------ | ------------ | ---- | | [MAX32650](https://www.analog.com/en/products/max32650.html) | Yes | Yes | No | Yes | | [MAX32660](https://www.analog.com/en/products/max32660.html) | Yes | Yes | No | No | | [MAX32666](https://www.analog.com/en/products/max32666.html) | No | Yes | No | No | | [MAX32675C](https://www.analog.com/en/products/max32675c.html) | Yes | Yes | No | No | ## Known issues - CodeFusion Studio is not compatible with VS Code version 1.99. This is expected to be resolved in newer versions of VS Code. [VS Code v1.98](https://code.visualstudio.com/updates/v1_98) is known to be compatible with CodeFusion Studio. ### Project management issues - Zephyr supported for single-core configurations only - Allocating Zephyr firmware to a RISC‑V core is unsupported and can produce invalid DTS overlays or build failures. Additionally, combinations that include Zephyr on ARM Cortex‑M cores and MSDK or bare-metal on RISC‑V cores are also unsupported. Use Zephyr only on ARM Cortex‑M cores in standalone configurations. ### Tools issues - Build failure when using conflicting timer modes (Zephyr projects) - Zephyr projects that configure multiple Timer (TMR) peripherals in different modes, for example TMR0 in **PWM mode** and TMR1 in **Compare mode**, fail to build with the error: `multiple definition of 'Wrap_MXC_TMR_*`. This is because the `wrap_max32_tmr.h` contains function definitions that are referenced by multiple drivers. The issue can be resolved by prefixing the function definitions in `wrap_max32_tmr.h` with `static inline`. - Peripheral configuration support - Peripheral configuration is currently supported for: ADC, I2C, SPI, Timers, UART, Watchdog Timers (WDT), and Real-Time Clocks (RTC). This also includes low-power variants such as LPTMR and LPUART. - Timer pin limitations - Some packages may not expose all timer signals on pins. For example, on the MAX32690 TQFN package, TMR2 and LPTMR1 have no exposed pins, which limits certain functionalities. These timers can still be used in modes that don’t require physical pins. When selecting modes, avoid selecting modes that require pins. These modes are not hidden in the UI. - Unsupported peripherals in Zephyr - Some peripherals are not supported in Zephyr. Enabling an unsupported peripheral results in a warning message `peripheral is not currently supported` in the **Warnings** section of the generated overlay file. Disable the unsupported peripheral and regenerate the code to resolve the warning. Refer to the generated overlay file for a complete list of unsupported peripherals. - Partition naming restrictions - Partition names created in the Memory Allocation tool must not start with a number, contain spaces, or include special characters (excluding `_`). Using an invalid partition name results in a `parse error: expected '{', '=', or ';'` during code generation. - MSDK `Board_Init()` interferes with peripheral allocation - CFS applies peripheral configuration from your `.cfsconfig` file through the `PeripheralInit()`function. In MSDK-based projects, the SDK also provides a `Board_Init()` function that runs before `PeripheralInit()` and may configure peripherals such as UARTs or LEDs. To ensure `.csfconfig` settings take full effect, override the SDK’s `Board_Init()` function by adding an empty version to a source file, such as `main.c`. This replaces the weak version defined by the SDK: ``` int Board_Init(void) { // Prevent MSDK from pre-configuring peripherals return 0; } ``` #### Registers-only (bare-metal) plugin issues The Registers-only (bare-metal) plugin is available when using the manual configuration option in the [Workspace Creation Wizard](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-new-workspace/index.md). The generated code is intended for **reference only**. Build and debug support is not included, and the code may not obey all the constraints on ordering and timing required by the hardware. The following limitations are known: - Clock enable missing for peripherals assigned to non-primary core - Clock enable instructions are only emitted when the peripheral is assigned to the primary core. - Oscillator initialization not generated - Code generation emits code to configure the clock tree, but it does **not** generate code to initialize the oscillators. Manual setup is required. - Timer configuration in 32-bit mode is incomplete - When using timers in 32-bit mode, the generated code does not set the TMRb clock to match TMRa, as required by the hardware. ### Debug issues - Segger JLink does not support all parts. See the following table for details. For a list of supported devices, see the [Segger website](https://www.segger.com/supported-devices/jlink/maxim/). | Part | Issue | Alternatives | | ------------- | --------------------------------------------------------- | ---------------------------------------------- | | MAX32655FTHR | No JTAG connector for direct JLink connection | Use MAXPICO debugger instead | | MAX32660EVSYS | No JTAG connector for direct JLink connection | Use MAXPICO debugger instead | | MAX32662 | Not supported | Use MAXPICO debugger instead | | MAX32666FTHR | Serial output not available | Use MAXPICO debugger instead | | MAX32670EVKIT | J-Link supported, but board does not expose SWD/JTAG pins | Use MAXPICO debugger instead | | MAX32690FTHR | Serial output not available | Use MAXPICO debugger if you need serial output | | APARD32690 | Serial output not available | Use MAXPICO debugger if you need serial output | | MAX78000FTHR | Not supported | Use MAXPICO debugger instead | - Debug toolbar remains after stopping session - After pressing **Stop** following a **Restart** during a debug session, the debug toolbar may remain visible. To remove it, open the command palette and type `Reload Window`. - RISC-V debug session exits when modifying local variable during live debug with OpenOCD - Modifying a local variable's value through the **Variables** view during a RISC-V debug session with OpenOCD can cause the session to exit unexpectedly. ### SDK issues - Maintenance Tool not supported on macOS 15 Sequoia - The Maintenance Tool does not currently work on macOS 15 Sequoia. To uninstall CodeFusion Studio on this platform, manually delete the CodeFusion Studio directory from the filesystem. # 2.0.0 Release Notes ## Source CodeFusion Studio source can be found on [GitHub](https://github.com/analogdevicesinc/codefusion-studio/releases/tag/V2.0.0/) under tag `V2.0.0` ## About this release CodeFusion Studio 2.0.0 introduces major enhancements across AI development, debugging, and system configuration tools, with expanded processor and SDK support. ## What's new The following are some of the new features and enhancements introduced in version 2.0.0. ### AI tools This release introduces the first in a growing suite of AI development features for embedded platforms. - **AI-enabled SoC support:** New and existing processors now support AI model deployment through dedicated workspace templates. These include MAX32657, MAX32690, MAX78002, and the ADSP-2183x / SC83x SHARC-FX family. For details, see [supported processors and model formats](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/about/supported-ai-model-formats/index.md). - **[Embedded AI Tools](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/manage-ai-models/index.md)**: Available in System Planner when using supported processors. This tool lets you import supported model files, assign them to cores, configure settings, run compatibility and profiling checks, and generate source code for deployment. - **CFSAI Command-Line Utility**: The `cfsai` utility provides the same capabilities from the terminal, allowing you to compile models, run compatibility and profiling reports, and integrate analysis into automated workflows. ### Debugging tools - **[Core Dump Analysis Tool](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/core-dump-analysis/index.md)**: A dedicated debug panel in CodeFusion Studio that helps developers analyze core dumps captured during system crashes. - **[GDB Toolbox](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/gdb-toolbox/index.md)**: Allows you to run default or custom JSON-based GDB scripts to inspect program state and automate debugging during a halted session. ### Installation and setup - **[Package Manager](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/index.md)**: Allows you to download SDKs, toolchains, and plugins on demand from a remote server, simplifying setup and keeping your environment up to date without requiring a full reinstallation. - **[Telemetry](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/about/telemetry/index.md)**: Adds an opt-in dialog on first launch that collects anonymous diagnostics and usage data. ### System Planner enhancements - **[Memory Allocation enhancements](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/memory-allocation/index.md)**: Includes an interactive memory bar that lets you create or edit partitions directly from the visual layout. Clicking on an available region prepopulates the form to speed up configuration. - **[Peripheral Allocation enhancements](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/peripheral-allocation/index.md)**: Provides a more intuitive setup flow—from the moment you allocate a peripheral through to pin assignment and final configuration. Deletion and navigation across core projects are also easier, with visual cues throughout the entire setup flow to guide your actions. - **[Profiling](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/profiling/index.md)**: Adds support for Zephelin profiling in Zephyr-based projects. This feature enables developers to capture runtime and AI inference-level performance data, and prepare captured CTF traces for visualization in the Zephelin Trace Viewer. Profiling can be enabled and configured directly from the System Planner for supported processors. - **Peripheral configuration support**: Adds configuration support for additional peripherals, including Inter-IC Sound Interface (I2S), One-Wire (OWM), and True Random Number Generator (TRNG). Existing peripherals such as ADC, I2C, RTC, SPI, Timers, UART, and WDT remain supported. ### Workspace Creation Wizard enhancements - **[Workspace Creation Wizard enhancements](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-new-workspace/index.md)**: A new guided sidebar shows your progress at every step, making it easier to see where you are in the process. The workspace creation flow has also been streamlined for faster setup. Template selection is now built into the wizard alongside the manual option, so you no longer need to navigate to a separate page. Manual setup has also been simplified, with an intuitive step-by-step sequence that guides you through each core configuration in order. The result is a smoother, faster setup experience with fewer clicks and no extra steps. - **[TrustZone support](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/targets/trustzone/index.md)**: Added support for Arm® TrustZone® when creating workspaces for MAX32657. You can enable TrustZone using either the TF-M Secure Partition template or manual configuration. ### Development platforms and tools - Support for Zephyr RTOS 4.2 [Get started](https://docs.zephyrproject.org/4.2.0/) - Support for the MSDK [Get started with MSDK](https://analogdevicesinc.github.io/msdk/USERGUIDE/) - Support for the ADSP-2183x/SC83x SHARC-FX family: - Adds build and debug support for SHARC-FX–based devices on Windows. - ADI ICE drivers are required to debug SHARC-FX processors using ADI ICE probes. - During installation, select the checkbox **ADI ICE Drivers (Requires Administrator)** to install these drivers. - If you skip this option, you can install the drivers later. For details, see [Install ICE drivers manually](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-drivers/install-ice-drivers/index.md). - Requires installation of the Xtensa SHARC-FX toolchain through the Package Manager. - For multicore devices such as the ADSP-SC835W, start debugging on the SHARC-FX core first, then attach to the Arm Cortex-M33 core. - For additional information, see [Debugging a SHARC-FX application](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-sharc-fx/index.md). - **System Planner** currently provides **Pin Mux configuration only** for SHARC-FX devices in this release. - Advanced workflow support for Registers-only (bare-metal): A reference plugin that generates low-level MMR initialization code for use in custom toolchains. The option is available when manually creating a MAX32xxx and MAX78xxx supported workspace. - Compiler and debug support available for Zephyr (Arm Cortex-M only) and MSDK (Arm Cortex-M and RISC-V) on MAX32xxx and MAX78xxx microcontrollers, and SHARC-FX (ADSP-2183x/SC83x family). #### Software component versions installed with CFS 2.0.0 | Component | Version | Notes | | --------------------------- | --------- | --------------------------------------------------------------------- | | Bare-metal ARM toolchain | 14.3.Rel1 | GCC toolchain for 32-bit Arm® targets | | Bare-metal RISC-V toolchain | 14.2.0 | GCC toolchain for RISC-V targets | | MSDK | 2.0.0 | Part support and examples for MAX32xxx and MAX78xxx microcontrollers | | SHARC-FX SDK | 3.0.3 | SDK for the Cortex-M33 core on SHARC-FX targets | | Zephyr RTOS | 4.2.0 | Real-time operating system for MAX32xxx and MAX78xxx microcontrollers | | Zephyr SDK | 0.17.4 | GCC-based toolchain for 32-bit Arm® development with Zephyr RTOS | ### Host architecture support CodeFusion Studio is supported on the following host operating systems: - Windows 11 (64-bit) - macOS 15 and macOS 26 (ARM64) - Ubuntu 22.04 and 24.04 (64-bit) *Earlier or newer OS versions may work but are not officially supported.* ### Target architecture support Introduced support for the following processors: | Processor | Bare-metal SDK[1](#fn:sdk) | Zephyr | Config Tools[2](#fn:cfg) | AI Tools[3](#fn:ai) | [TESA](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/resources/security-resources/index.md)[4](#fn:tesa) | | ------------------------------------------------------------------------- | -------------------------- | ------ | ------------------------ | ------------------- | -------------------------------------------------------------------------------------------------------------------------------- | | [MAX32650](https://www.analog.com/en/products/max32650.html) | Yes | Yes | Yes | No | Yes | | [MAX32657](https://www.analog.com/en/products/MAX32657.html) | No | Yes | Yes | Yes | Yes | | [MAX32670](https://www.analog.com/en/products/max32670.html) | Yes | Yes | Yes | No | Yes | | [MAX32690](https://www.analog.com/en/products/MAX32690.html) | Yes | Yes | Yes | Yes | Yes | | [MAX78000](https://www.analog.com/en/products/MAX78000.html) | Yes | Yes | Yes | No | Partial | | [MAX78002](https://www.analog.com/en/products/MAX78002.html) | Yes | Yes | Yes | Yes | No | | [ADSP-21834 / 21834W](https://www.analog.com/en/products/adsp-21834.html) | Yes | No | Partial | Yes | No | | [ADSP-21835 / 21835W](https://www.analog.com/en/products/adsp-21835.html) | Yes | No | Partial | Yes | No | | [ADSP-21836 / 21836W](https://www.analog.com/en/products/adsp-21836.html) | Yes | No | Partial | Yes | No | | [ADSP-21837 / 21837W](https://www.analog.com/en/products/adsp-21837.html) | Yes | No | Partial | Yes | No | | [ADSP-SC834 / SC834W](https://www.analog.com/en/products/adsp-sc834.html) | Yes | No | Partial | Yes | No | | [ADSP-SC835 / SC835W](https://www.analog.com/en/products/adsp-sc835.html) | Yes | No | Partial | Yes | No | ## Known issues and limitations ### Plugin issues - SHARC-FX templates supported on Windows only - Workspace templates for ADSP-2183x and ADSP-SC83x processors are supported on Windows only. On macOS and Linux, creating a workspace with these templates is not supported, even if the option appears available. - Plugin update from `com.analog.project.zephyr41.plugin` to `com.analog.project.zephyr.plugin` - Zephyr plugins have been renamed to remove the version suffix. When opening legacy project configuration files, you may see the message: ``` Missing Plugin Required. Please install `com.analog.project.zephyr41.plugin` in order to continue. ``` Update the plugin reference in the `.cfsconfig` file to use the new name (`com.analog.project.zephyr.plugin`), or create a new workspace using the latest Zephyr 4.2 template. ### Installation issues - Installer fails due to missing symlink permissions on Windows - On Windows, installation can fail with the message `Installer Error: Error during installation process`. Ensure you have permission to create symbolic links (for example, by enabling Developer Mode) before running the installer. ### Installation issues - Uninstall does not remove package data - Uninstalling CodeFusion Studio 2.0.0 does not remove locally installed packages. To fully reset your environment before reinstalling, see [Uninstall CodeFusion Studio](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/uninstall/uninstall-cfs/#uninstall-packages). ### Tools issues #### System Planner - External clock pin configuration not emitted in Zephyr projects - In Zephyr projects, electrical properties of external clock pins (such as voltage levels or pull resistors) set in the System Planner UI are not written to the generated device tree overlay file. External clock pins in Zephyr projects always use the default options. - MAX32670 clock configuration issues in System Planner UI - In Zephyr projects: - The following configurations are not supported, as Zephyr does not currently support them: - Selecting the Always-On Domain Clock for the LPUART peripheral. - Selecting the IPO as a clock source for the WDT peripherals. - In MSDK and Zephyr projects: - Changing the IPO prescaler value is not supported, as there is currently no runtime support to change this value. - Selecting the Always-On Domain CLock for the LPTMR peripherals is not supported. - Assigning UART peripherals to IBRO as the clock source results in an incorrect baud rate: the actual rate is fixed at 57600 regardless of the configured value (for example, 115200). - RTC external clock option missing on MAX32657 - Although the RTC module supports an external clock source on pin P0.12, this option does not appear in the RTC Clock Source dropdown in **Clock Config**. This behavior is due to a limitation in Zephyr. - External clock functionality limitations - Despite the presence of external clock enumeration values in the `tmr.h` header files, external clock functionality is not implemented for MAX32655, MAX78000, or MAX78002, and is incorrectly implemented for MAX32690 (LPTMRs). This limitation affects both MSDK and Zephyr projects. #### AI Tools - Visual C++ Redistributable requirement on Windows - The AI Tools (including the `cfsai` utility and Embedded AI Tools) on Windows require the [Visual C++ Redistributable for Visual Studio 2015](https://aka.ms/vs/16/release/vc_redist.x64.exe) to be installed. Without this redistributable, the tools may fail to run correctly. - Spaces in Embedded AI Tool filenames - The Compatibilty Checking and Profiling Report generation utilities do not support paths with spaces. Avoid spaces in paths. - C/C++ needed to build Tensorflow applications - In most non-AI templates (for example, *Zephyr Single Core Blinky*), the template language is C with `main.c`. When building a TFLM model - either using Embedded AI Tools or the `cfsai build` command - C++ is required. Use a supported AI-based template (such as *Zephyr Single Core TensorFlow AI Model*), otherwise replace `main.c` with `main.cpp` or use a C++ wrapper to interact with TensorFlow. - AI model assignment in SC83x Single Core template - In the Embedded AI Tools tab, you can add and enable AI models on both the SHARC-FX and Arm® Cortex-M33 cores when using the **SC83x Single Core (TFLM)** template. However, code generation is only supported for the SHARC-FX core in the Single Core template. #### Debug and analysis tools - Zephelin profiler **Prepare CTF trace for visualization (Zephelin)** not supported on Windows - The **Prepare CTF trace for visualization (Zephelin)** task is supported on macOS, Linux, and on Windows only when using WSL2 (Windows Subsystem for Linux 2). Running this action on Windows outside of WSL2 displays an error notification indicating that the feature is not supported. To prepare and visualize CTF traces on Windows, run the task from a WSL2 Linux environment instead. - Zephelin profiler trace capture error when serial port is in use - Running **Capture profiler trace (Zephelin)** while a serial monitor or terminal is connected to the same UART device can cause the action to fail with the error: ``` serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?) ``` To resolve the issue, close any serial monitor or other application using the port before starting the capture. - Serial port name formatting in VS Code Serial Monitor (macOS) - When using **Capture Profiler Trace (Zephelin)** on macOS, the **VS Code Serial Monitor** extension may display serial port names with trailing spaces or extra suffixes (for example, `- FTDI` or `- ARM`). This can cause connection issues when the port is copied directly into the dialog. Remove any trailing spaces or extra text so the name matches the actual device path (for example, `/dev/tty.usbserial-0001`). The correct device name can be verified by listing ports in the `/dev/` folder. - Core Dump Analysis and GDB Toolbox: GDB binary not Python-enabled on macOS - On macOS, you may encounter errors such as `Error: failed to launch debug session` in the GDB Toolbox or Core Dump Analysis if the GDB binary lacks Python support or uses an incompatible Python version. To enable Python-based scripts, complete the following actions: 1. Install Python 3.10 using Homebrew: ``` brew install python@3.10 ``` Python 3.9 and 3.10 are known to be compatible. 1. Update your `launch.json` to point to the Python-enabled GDB binary. Each configuration (OpenOCD, J-Link, and Core Dump Analysis) includes a separate `osx` section.\ Update all three references (if used) to `arm-none-eabi-gdb-py`, for example: ``` "osx": { "gdbPath": "${config:cfs.sdk.path}/Tools/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gdb-py" } ``` 1. Create and build a Zephyr project, then launch a debug session. 1. Run a supported Python-based script (such as **Thread Analyzer**) from the GDB Toolbox panel to verify Python scripting is working.\ For instructions on running GDB Toolbox scripts, see [Using the GDB Toolbox](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/gdb-toolbox/gdb-toolbox/index.md). If the script runs without error, Python support for GDB is correctly configured. - Linux: Python environment errors when running GDB Toolbox scripts - On some Linux systems, a minimal or broken Python 3.10 installation can cause import errors such as `ModuleNotFoundError: No module named '_struct'` or `_posixsubprocess` when launching GDB Toolbox scripts or Core Dump Analysis. Verify your installation and reinstall Python 3.10 to restore missing modules if needed: ``` sudo apt install --reinstall python3.10 ``` - Serial monitor fails to open serial port on Linux - On Linux, the serial monitor may fail to access `/dev/ttyUSB*` devices during debugging, showing the message `Failed to open the serial port`. This occurs when the user account lacks permission to access serial ports. To resolve, add your user to the `dialout` group and restart the system: ``` sudo usermod -aG dialout ``` Opening VS Code with elevated privileges also avoids the issue, but adding the user to the group is the recommended solution. #### Other tools - Query execution on Symbol Explorer (ELF File Explorer) - The Symbol Explorer page in the ELF File Explorer supports filtering using SQL queries, subject to AlaSQL limitations. For example, queries that select multiple columns with the same name only display the first column. Use column aliases to distinguish repeated fields. Advanced SQL functions (such as `conv`) are not supported. See [AlaSQL](https://github.com/alaSQL/alasql) for supported features and limitations. ### Debug issues - Not all debug functionality of the boards is accessible using the Segger J-Link. For a list of supported devices, see the [Segger website](https://www.segger.com/supported-devices/jlink/maxim/). | Board | Issue | Alternatives | | -------------- | --------------------------------------------------------- | ---------------------------------------------- | | MAX32650EVKIT | Serial output not available | Use MAXPICO debugger if you need serial output | | MAX32650FTHR | Serial output not available | Use MAXPICO debugger if you need serial output | | MAX32655FTHR | No JTAG connector for direct J-Link connection | Use MAXPICO debugger instead | | MAX32660EVSYS | No JTAG connector for direct J-Link connection | Use MAXPICO debugger instead | | MAX32666FTHR | Serial output not available | Use MAXPICO debugger if you need serial output | | MAX32670EVKIT | J-Link supported, but board does not expose SWD/JTAG pins | Use MAXPICO debugger instead | | MAX32675CEVKIT | Serial output not available | Use MAXPICO debugger if you need serial output | | MAX32690FTHR | Serial output not available | Use MAXPICO debugger if you need serial output | | APARD32690 | Serial output not available | Use MAXPICO debugger if you need serial output | | MAX78000FTHR | Not supported | Use MAXPICO debugger instead | - Restarting a RISC-V debug session fails with an OpenOCD protocol error - On MAX32xxx and MAX78xxx evaluation boards, clicking **Restart** during a RISC-V debug session causes a `Protocol error with Rcmd: FC`. This is expected behavior and occurs because the RISC-V JTAG port must be re-enabled by the Arm core before reconnecting. - RISC-V debug session exits when modifying register values with OpenOCD - Editing a core register (such as a0 or a1) in the **Variables** view during a RISC-V debug session can cause the session to exit unexpectedly when execution is resumed (for example, with Step Over). ______________________________________________________________________ 1. Indicates support for bare-metal development workflows in CodeFusion Studio, including the MSDK for MAX32xxx and MAX78xxx microcontrollers, and the ADSP-2183x/SC83x SHARC-FX family. [↩](#fnref:sdk "Jump back to footnote 1 in the text") 1. Indicates support for configuration flows in System Planner. **Yes** = Full support, **Partial** = Pin Mux only, **No** = Not supported. [↩](#fnref:cfg "Jump back to footnote 2 in the text") 1. Indicates AI Tools support in CodeFusion Studio, including model integration and advanced analysis for embedded AI applications. [↩](#fnref:ai "Jump back to footnote 3 in the text") 1. TESA security support: **Yes** = Full TESA support including UCL and USS, **Partial** = UCL support only, **No** = Not supported. [↩](#fnref:tesa "Jump back to footnote 4 in the text") # 2.0.1 Release Notes ## Source CodeFusion Studio source can be found on [GitHub](https://github.com/analogdevicesinc/codefusion-studio/releases/tag/V2.0.1/) under tag `V2.0.1` ## About this release CodeFusion Studio 2.0.1 delivers stability improvements, bug fixes, and an expanded set of workspace templates. This release also adds support for the MAX32658 SoC and introduces Zephyr 4.3.0 support for the MAX32657 and MAX32658. ## What's new The following are some of the new features and enhancements introduced in version 2.0.1. ### Workspace templates This release adds 16 new workspace MSDK and Zephyr templates, expanding support for multicore development, AI workloads, and additional peripheral examples. ### New MSDK templates - Single Core DMA - Single Core Hello World (C++) - Single Core I2C Scan - Single Core ICC - Single Core RTC - Single Core UART Loopback - Dual Core Sync (ARM + RISC-V) ### New Zephyr templates - ADC Sequence - Basic Synchronization - Counter Alarm - C++ Synchronization - Dining Philosophers - Hello World (C++) - I2C Custom Target - LittleFS - Watchdog For details see Supported templates. ### Expanded SoC and RTOS support - **MAX32658 SoC support:** CodeFusion Studio now supports the new MAX32658 SoC, including System Planner configuration, Zephyr development, and debug support. - **Zephyr 4.3.0 support:** Added support for Zephyr 4.3.0 on MAX32657 and MAX32658. MAX32657 also continues to support Zephyr 4.2.0. - To develop with MAX32657 and MAX32658 on Zephyr 4.3.0, install the `zephyr/4.3.0-b.1` package. *This package currently targets these SoCs only*. You can install this using `(CFS) Install Package` from the VS Code Command Palette or from the CFS Terminal by running: ``` cfsutil pkg install zephyr/4.3.0-b.1 ``` For more details, see [Package Manager overview](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/index.md). ### Bug fixes General stability and performance improvements across project setup, AI Tools, System Planner, and Package Manager workflows. Fixes include improved Package Manager error handling, System Planner UI fixes, refinements to AI tools, and a variety of usability and platform compatibility enhancements. ### Development platforms and tools - Support for Zephyr RTOS 4.2 [Get started](https://docs.zephyrproject.org/4.2.0/) - Added support for Zephyr RTOS 4.3 for MAX32657 and MAX32658 - Support for the MSDK [Get started with MSDK](https://analogdevicesinc.github.io/msdk/USERGUIDE/) - Support for the ADSP-2183x/SC83x SHARC-FX family: - Adds build and debug support (Windows only) - Supports Pin Mux configuration only in System Planner - Requires ADI ICE drivers and the Xtensa SHARC-FX toolchain to be installed - See [Debugging a SHARC-FX application](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-sharc-fx/index.md) for details - Advanced workflow support for Registers-only (bare-metal): A reference plugin that generates low-level MMR initialization code for use in custom toolchains. The option is available when manually creating a MAX32xxx and MAX78xxx supported workspace - Compiler and debug support available for Zephyr (Arm Cortex-M only) and MSDK (Arm Cortex-M and RISC-V) on MAX32xxx and MAX78xxx microcontrollers, and SHARC-FX (ADSP-2183x/SC83x family) #### Software component versions installed with CFS 2.0.1 | Component | Version | Notes | | --------------------------- | --------- | --------------------------------------------------------------------- | | Bare-metal ARM toolchain | 14.3.Rel1 | GCC toolchain for 32-bit Arm® targets | | Bare-metal RISC-V toolchain | 14.2.0 | GCC toolchain for RISC-V targets | | MSDK | 2.0.1 | Part support and examples for MAX32xxx and MAX78xxx microcontrollers | | SHARC-FX SDK | 3.0.3 | SDK for the Cortex-M33 core on SHARC-FX targets | | Zephyr RTOS | 4.2.0 | Real-time operating system for MAX32xxx and MAX78xxx microcontrollers | | Zephyr SDK | 0.17.4 | GCC-based toolchain for 32-bit Arm® development with Zephyr RTOS | ### Host architecture support CodeFusion Studio is supported on the following host operating systems: - Windows 11 (64-bit) - macOS 15 and macOS 26 (ARM64) - Ubuntu 22.04 and 24.04 (64-bit) *Earlier or newer OS versions may work but are not officially supported.* ### Target architecture support Introduced support for the following processor: | Processor | Bare-metal SDK[1](#fn:sdk) | Zephyr | Config Tools[2](#fn:cfg) | AI Tools[3](#fn:ai) | [TESA](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/resources/security-resources/index.md)[4](#fn:tesa) | | ------------------------------------------------------------ | -------------------------- | ------ | ------------------------ | ------------------- | -------------------------------------------------------------------------------------------------------------------------------- | | [MAX32658](https://www.analog.com/en/products/MAX32658.html) | No | Yes | Yes | No | Yes\* | ## Known issues and limitations ### Plugin issues - MSDK Single Core UART Loopback template (AD-APARD32690-SL) - When using the MSDK Single Core UART Loopback template on the AD-APARD32690-SL, flashing and running the example results in an `Example failed` message in the UART console. This occurs because the example attempts to transmit on UART0 TX, which the board already uses for console output, causing a signal conflict. This issue will be resolved in the next release by updating the example to use UART2 as the transmit interface. - TrustZone workspace creation - Manually creating a workspace and enabling TrustZone can lead to build errors in the Non-Secure partition. To avoid this, use the TF-M Secure Partition workspace template in the Workspace Creation Wizard instead of creating the workspace manually. - TrustZone / TF-M Secure Partition template debugging limitations (MAX32657 / MAX32658) - When debugging the TF-M Secure Partition workspace template on MAX32657 or MAX32658, only the debug configurations that match the project’s security build setting (as defined by `cfs.project.board`) are supported. By default, the template is built as Non-Secure. - If the project is built as Non-Secure (default), `"cfs.project.board": "max32657evkit/max32657/ns"` is used in `vscode/settings.json`, and only Non-Secure debug configurations are supported. - If the project is built as Secure, set `"cfs.project.board": "max32657evkit/max32657"`. Only Secure debug configurations are supported. Important Switching between Secure and Non-Secure debug flows requires rebuilding the project with the corresponding `cfs.project.board` setting. ### Tools issues #### AI Tools - Compatibility Analyzer and Resource Profiling report fails to open correctly - If you open the AI Tools tab in System Planner, make no edits, and then click **Open Compatibility Report** or **Open Profiling Report**, System Planner closes unexpectedly, leaving only the selected report open. To reopen System Planner, click the `.cfsconfig` file or go to **Config Tools > Open Config File**. #### Debug and analysis tools - GDB Toolbox – Analyze Threads (not supported on MAX32657 / MAX32658) - The Analyze Threads GDB Toolbox script is currently not supported on MAX32657 and MAX32658 devices. Running this action may result in errors such as: `ERROR: Error analyzing thread...expected string or bytes-like object` - Zephelin profiler not supported on Zephyr 4.3.0 - While this latest release adds support for MAX32657 and MAX32658 with Zephyr 4.3.0, the Zephelin profiler remains unsupported on this version. For additional Zephelin profiler limitations, see the [2.0.0 known issues](https://developer.analog.com/docs/codefusion-studio/latest/release-notes/2.0.0/#known-issues-and-limitations) ### Debug issues - OpenOCD (macOS) `No J-Link device found` with on-board J-Link only - On macOS, when running OpenOCD actions (Erase, Flash, Flash & Run) for MAX32657 / MAX32658, you may see the following error: `No J-Link device found`. This issue occurs only when neither a PICO nor an external Segger J-Link debugger is attached, and OpenOCD is using the on-board J-Link (J-Link OB-MAX32690-ADI). This behavior is specific to macOS and does not occur when an external debugger is connected. - J-Link / OpenOCD: `Multiple devices found, specify the desired device` - When flashing or debugging with J-Link, you may see an error similar to: ``` Error: Multiple devices found, specify the desired device Info: Found 2 devices: Info: Device 0 serial: Info: Device 1 serial: ``` This occurs when more than one J-Link debugger is visible to the host PC (for example, when both the on-board J-Link and an external J-Link are active on MAX32657 / MAX32658 EV kits). Disconnect any unused J-Link probes and ensure only one debugger is enabled. On MAX32657 / MAX32658 EV kits, you can also remove the shunt on **JP6** to disable the on-board J-Link (J-Link OB-MAX32690-ADI) when using an external debugger. For the recommended jumper configuration when using an external J-Link on MAX32657 / MAX32658 EV kits, see [Troubleshooting](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/troubleshooting/#max32657-and-max32658-configure-for-an-external-j-link). As an advanced workaround for lab setups where multiple J-Links must remain connected, you can force the tools to select a specific probe in `launch.json`: ``` // OpenOCD configuration "openOCDLaunchCommands": [ "adapter serial " ] // J-Link configuration "serialNumber": "" ``` Replace `` with the serial number of the desired J-Link device (you can copy it from the error message). For more details, see the [OpenOCD](https://openocd.org/doc-release/html/Debug-Adapter-Configuration.html#index-adapter-serial) and [Cortex-Debug](https://github.com/Marus/cortex-debug/blob/master/debug_attributes.md) documentation. - J-Link v11 with OpenOCD: `LIBUSB_ERROR_NOT_SUPPORTED` - When using OpenOCD with the J-Link interface (`interface/jlink.cfg`) on boards such as MAX32657 / MAX32658 (for example: `west flash --runner openocd --no-reset --config "interface/jlink.cfg"`), you may see errors similar to the following: ``` Warn : Failed to open device: LIBUSB_ERROR_NOT_SUPPORTED Error: No J-Link device found ``` This issue is caused by the J-Link version. Installing **Segger J-Link version 12.1 or later** resolved the problem and allows OpenOCD to detect and use the probe correctly. - Not all debug functionality of the boards is accessible using the Segger J-Link. For a list of supported devices, see the [Segger website](https://www.segger.com/supported-devices/jlink/maxim/). | Board | Issue | Alternatives | | -------------- | --------------------------------------------------------- | ---------------------------------------------- | | MAX32650EVKIT | Serial output not available | Use MAXPICO debugger if you need serial output | | MAX32650FTHR | Serial output not available | Use MAXPICO debugger if you need serial output | | MAX32655FTHR | No JTAG connector for direct J-Link connection | Use MAXPICO debugger instead | | MAX32660EVSYS | No JTAG connector for direct J-Link connection | Use MAXPICO debugger instead | | MAX32666FTHR | Serial output not available | Use MAXPICO debugger if you need serial output | | MAX32670EVKIT | J-Link supported, but board does not expose SWD/JTAG pins | Use MAXPICO debugger instead | | MAX32675CEVKIT | Serial output not available | Use MAXPICO debugger if you need serial output | | MAX32690FTHR | Serial output not available | Use MAXPICO debugger if you need serial output | | APARD32690 | Serial output not available | Use MAXPICO debugger if you need serial output | | MAX78000FTHR | Not supported | Use MAXPICO debugger instead | See [2.0.0 known issues](https://developer.analog.com/docs/codefusion-studio/latest/release-notes/2.0.0/#known-issues-and-limitations) for other issues. ______________________________________________________________________ 1. Indicates support for bare-metal development workflows in CodeFusion Studio, including the MSDK for MAX32xxx and MAX78xxx microcontrollers, and the ADSP-2183x/SC83x SHARC-FX family. [↩](#fnref:sdk "Jump back to footnote 1 in the text") 1. Indicates support for configuration flows in System Planner. **Yes** = Full support, **Partial** = Pin Mux only, **No** = Not supported. [↩](#fnref:cfg "Jump back to footnote 2 in the text") 1. Indicates AI Tools support in CodeFusion Studio, including model integration and advanced analysis for embedded AI applications. [↩](#fnref:ai "Jump back to footnote 3 in the text") 1. TESA security support: **Yes** = Full TESA support including UCL and USS, **Partial** = UCL support only, **No** = Not supported. * For MAX32658, use the MAX32657 USS and UCL examples. [↩](#fnref:tesa "Jump back to footnote 4 in the text") # 2.0.2 Release Notes ## Source CodeFusion Studio source can be found on [GitHub](https://github.com/analogdevicesinc/codefusion-studio/releases/tag/V2.0.2/) under tag `V2.0.2` ## About this release CodeFusion Studio 2.0.2 is a patch release that fixes a regression affecting CFS [Telemetry](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/about/telemetry/index.md). In CodeFusion Studio 2.0.1, telemetry events were not collected due to this regression. This impacted the following event types: - Workspace creation events - Extension activation events Ensure that you are running the CodeFusion Studio 2.0.2 VS Code extension to resolve this issue. If extension auto-updates are enabled, no action is required. For installation or upgrade steps, refer to [Install the CodeFusion Studio VS Code extension](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/install-extensions/index.md). Note CodeFusion Studio 2.0.2 is distributed only through the Visual Studio Code Marketplace. A standalone installer is not provided for this release, so manual installation using a VSIX file is not supported. ## What's new ### Bug fixes - Fixed an issue where CFS telemetry events were not correctly emitted in version 2.0.1 - Updated release notes and `CHANGELOG.md` ## Known Issues See [2.0.1 known issues](https://developer.analog.com/docs/codefusion-studio/latest/release-notes/2.0.1/#known-issues-and-limitations) for other issues. # 2.1.0 Release Notes ## Source CodeFusion Studio source can be found on [GitHub](https://github.com/analogdevicesinc/codefusion-studio/releases/tag/V2.1.0/) under tag `V2.1.0` ## About this release CodeFusion Studio 2.1.0 introduces a preview of the AI Debug Assistant, an agentic AI system that actively participates in your debug sessions. The release also comes with updates to existing features, including Package Manager improvements and workspace creation enhancements. ## What's new The following features and enhancements are introduced in version 2.1.0. ### [AI Debug Assistant](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/ai-debug-assistant/index.md) The AI Debug Assistant is a new agentic debugging tool that connects compatible AI clients, such as GitHub Copilot and Claude Code, directly to your live debug sessions. Built on the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/), it enables AI models to autonomously investigate faults, inspect hardware state, and coordinate across multiple cores in real time. Rather than answering static questions about your code, the assistant can: - Autonomously investigate hard faults: Read fault registers, decode exception types, walk the call stack, and identify the root cause - Inspect live hardware state including registers, memory, variables, stack traces, and thread lists directly from the target - Set and manage breakpoints and hardware watchpoints, including conditional breakpoints - Execute GDB commands with built-in safety guards - Coordinate multi-core debug sessions to surface shared-memory race conditions and DMA conflicts - Follow pre-built diagnostic workflows for crash diagnosis, memory corruption, peripheral misconfiguration, and firmware size analysis The assistant exposes a comprehensive set of tools and pre-built diagnostic workflows through MCP, making it compatible with any MCP-supported AI client — not just the ones supported today. For setup instructions and usage examples, see [Using the AI Debug Assistant](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/ai-debug-assistant/using-ai-debug-assistant/index.md). ### Package Manager improvements This release introduces significant improvements to Package Manager, including improved authentication handling and support for semantic version ranges in package installation commands. These enhancements simplify authentication workflows and make it easier to install and update compatible package versions. #### Package Manager authentication Authentication handling for Package Manager has been clarified and improved. - Authentication is now managed using: - `cfsutil myanalog` (login, logout, and status) - `cfsutil pkg auth-remote` for configuring authentication on package remotes. - The following commands are now deprecated and display warnings directing users to the new workflow: - `cfsutil pkg login` - `cfsutil pkg logout` - `cfsutil auth` (login, logout, and status) - The `cfsutil pkg list-remotes` command now displays authentication status, including inactive sessions. - An issue was fixed where adding a package remote could be accidentally cancelled by clicking outside the prompt in the Command Palette. #### Support for Semantic versioning for package install commands Package installation using the `cfsutil pkg install` command now supports semantic version range expressions. CodeFusion Studio packages use semantic versioning in the format `MAJOR.MINOR.PATCH` (for example, `2.1.0`). Version ranges allow compatible minor and patch versions to be installed automatically. The following version range operators are supported in `cfsutil pkg install`: - Caret (`^`) - Tilde (`~`) - Comparison operators (`>=`, `<=`, `>`, `<`) When a version range is specified, `cfsutil` installs the newest available version that satisfies the constraint. #### New installation flag - `--local`: Install packages from the local cache only (offline mode) For detailed version range syntax and examples, see [CFSUtil](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/package-manager/#install). ### Workspace creation improvements Plugin options are now filtered by core during manual workspace creation. For example, selecting a RISC-V core shows only supported plugins (such as MSDK), while unsupported options such as Zephyr are hidden. Cores in the workspace creation wizard are now ordered with the primary core listed first. ### Development platforms and tools - Support for Zephyr RTOS 4.2 [Get started](https://docs.zephyrproject.org/4.2.0/) - Support for the MSDK [Get started with MSDK](https://analogdevicesinc.github.io/msdk/USERGUIDE/) - Support for the ADSP-2183x/SC83x SHARC-FX family: - Adds build and debug support for SHARC-FX–based devices on Windows. - ADI ICE drivers are required to debug SHARC-FX processors using ADI ICE probes. - During installation, select the checkbox **ADI ICE Drivers (Requires Administrator)** to install these drivers. - If you skip this option, you can install the drivers later. For details, see [Install ICE drivers manually](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-drivers/install-ice-drivers/index.md). - Requires installation of the Xtensa SHARC-FX toolchain through the Package Manager. - For multicore devices such as the ADSP-SC835W, start debugging on the SHARC-FX core first, then attach to the Arm Cortex-M33 core. - For additional information, see [Debugging a SHARC-FX application](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-sharc-fx/index.md). - **System Planner** currently provides **Pin Mux configuration only** for SHARC-FX devices in this release. - Advanced workflow support for Registers-only (bare-metal): A reference plugin that generates low-level MMR initialization code for use in custom toolchains. The option is available when manually creating a MAX32xxx and MAX78xxx supported workspace. - Compiler and debug support available for Zephyr (Arm Cortex-M only) and MSDK (Arm Cortex-M and RISC-V) on MAX32xxx and MAX78xxx microcontrollers, and SHARC-FX (ADSP-2183x/SC83x family). #### Software component versions installed with CFS 2.1.0 | Component | Version | Notes | | --------------------------- | --------- | --------------------------------------------------------------------- | | Bare-metal ARM toolchain | 14.3.Rel1 | GCC toolchain for 32-bit Arm® targets | | Bare-metal RISC-V toolchain | 14.2.0 | GCC toolchain for RISC-V targets | | MSDK | 2.1.0 | Part support and examples for MAX32xxx and MAX78xxx microcontrollers | | SHARC-FX SDK | 3.0.3 | SDK for the Cortex-M33 core on SHARC-FX targets | | Zephyr RTOS | 4.2.0 | Real-time operating system for MAX32xxx and MAX78xxx microcontrollers | | Zephyr SDK | 0.17.4 | GCC-based toolchain for 32-bit Arm® development with Zephyr RTOS | ### Host architecture support CodeFusion Studio is supported on the following host operating systems: - Windows 11 (64-bit) - macOS 15 and macOS 26 (ARM64) - Ubuntu 22.04 and 24.04 (64-bit) *Earlier or newer OS versions may work but are not officially supported.* ### Target architecture support Processor support is unchanged in this release. For the full list, see [supported processors](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/about/supported-processors/index.md). ## Known issues and limitations ### AI Debug Assistant The AI Debug Assistant is a preview feature. Some commands may not behave as expected, particularly around session management and GDB command passthrough. Improvements are planned for future releases. The following commands listed in the `@cfs-debug help` output do not work as expected: - **`clear all breakpoints`**: Returns help text instead of clearing breakpoints. Use `remove breakpoint at :` to remove breakpoints individually. - **`x/16xw
`**: Returns help text instead of examining memory. Use `read memory at
` instead. - **Conditional breakpoints**: You may encounter issues with natural language forms such as `set a conditional breakpoint where counter > 10`. It may be helpful to use the structured form, such as `set breakpoint at main.c:42 if counter > 10`, instead. For best results, use a Claude model (such as Claude Sonnet 4.5 or Claude Opus 4.6) with the `@cfs-debug` chat participant. Other models may work for basic commands but could produce inconsistent results or errors for AI analysis features. ### Debug issues - The **Analyze Threads** GDB Toolbox script requires an OpenOCD debug configuration. JLinkGDBServer does not support Zephyr thread awareness, which causes the script to fail when using a J-Link debug configuration. Use `CFS: Debug with GDB and OpenOCD (Arm Embedded)` instead. - Not all debug functionality of the boards is accessible using the Segger J-Link. For a list of supported devices, see the [Segger website](https://www.segger.com/supported-devices/jlink/maxim/). #### J-Link limitations by board | Board | J-Link limitation | Alternative | | -------------- | --------------------------------------------------------- | ---------------------------------------------- | | MAX32650EVKIT | Serial output not available | Use MAXPICO debugger if you need serial output | | MAX32650FTHR | Serial output not available | Use MAXPICO debugger if you need serial output | | MAX32655FTHR | No JTAG connector for direct J-Link connection | Use MAXPICO debugger instead | | MAX32660EVSYS | No JTAG connector for direct J-Link connection | Use MAXPICO debugger instead | | MAX32666FTHR | Serial output not available | Use MAXPICO debugger if you need serial output | | MAX32670EVKIT | J-Link supported, but board does not expose SWD/JTAG pins | Use MAXPICO debugger instead | | MAX32675CEVKIT | Serial output not available | Use MAXPICO debugger if you need serial output | | MAX32690FTHR | Serial output not available | Use MAXPICO debugger if you need serial output | | APARD32690 | Serial output not available | Use MAXPICO debugger if you need serial output | | MAX78000FTHR | Not supported | Use MAXPICO debugger instead | See [2.0.1 known issues](https://developer.analog.com/docs/codefusion-studio/latest/release-notes/2.0.1/#known-issues-and-limitations) for other issues. # 2.2.0 Release Notes ## Source CodeFusion Studio source can be found on [GitHub](https://github.com/analogdevicesinc/codefusion-studio/releases/tag/V2.2.0/) under tag `V2.2.0` ## About this release CodeFusion Studio 2.2.0 builds on the foundation established in previous releases, focusing on two key areas: **expanded platform support** and **AI workflow enhancements**. ## What's new The following are some of the new features and enhancements introduced in version 2.2.0: ### AI workflow enhancements AI capabilities have been enhanced with improved command-line integration, streamlined workspace creation, redesigned compatibility and profiling reports, and debugging improvements: - **[`cfsutil ai`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/index.md) — AI tools integrated into cfsutil:** Completing the CLI-first workflow, the `cfsai` command-line tool has been migrated into `cfsutil` as the `cfsutil ai` command group, enabling end-to-end AI model workflows — from compatibility checking to code generation — entirely from the command line: - [`cfsutil ai build`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/build/index.md) — compile a model into deployable C/C++ source code. - [`cfsutil ai compat`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/compat/index.md) — check model compatibility with a target SoC and core. - [`cfsutil ai profile`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/profile/index.md) — profile model resource usage before deployment. - [`cfsutil ai model`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/model/index.md) — new in this release: add, list, update, and remove AI models within a workspace without editing `.cfsconfig` files manually. - [`cfsutil ai workspace create`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/workspace/index.md) — new in this release: generate a workspace directly from an AI model file with automatic compatibility checking and initial build. - [`cfsutil ai backends`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/backends/index.md) — list available AI backends and extension fields. `cfsai` remains available as a compatibility wrapper and continues to work for existing scripts. Deprecated flag: `--json` The `--json` flag has been deprecated across all `cfsutil ai`, `cfsutil elf`, and `cfsutil socs` commands. Use `--format json` instead. The `--json` flag continues to work but displays a deprecation warning and will be removed in a future release. The new `--format` flag accepts `text` (default) or `json` values and provides consistent output formatting across all commands. - **[Workspace from AI Model](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-workspace-from-ai-model/index.md) — Streamlined AI workspace creation:** - Create AI-ready workspaces directly from a model file with automatic compatibility checking and hardware configuration. - New wizard guides you through model file selection, SoC/board selection, and per-core targeting. - Generated workspaces include pre-configured AI application with model integration and sample data handling. - [AI Hardware Profiling view](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/deploy-and-profile-ai-model/index.md) provides guided deployment to hardware with build status tracking and one-click model deployment. - **[Embedded AI Tools](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/manage-ai-models/index.md) enhancements:** - UX enhancements to the Compatibility and Resource Profiling report outputs, making model resource and performance estimates and compatibility results easier to visualize and interpret. - Improved access to Compatibility and Resource Profiling reports, with a new **Open Report** option on the CFS Home page. - **[AI Debug Assistant](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/ai-debug-assistant/index.md) — improvements:** - General bug fixes and stability improvements. We recommend using the MCP server for production workflows for maximum portability and future compatibility. - **[Profiling](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/profiling/index.md) — streamlined Zephelin trace capture workflow:** - A new **Trace Capture** panel in the CFS Home Page provides a streamlined interface for capturing profiling traces. Configure trace settings once, then start and stop capture with a single click. - Enhanced **Profiling Configuration** in System Planner now displays cores individually with expandable configuration forms, making it easier to configure profiling options for multi-core workspaces. - Trace capture automatically generates both `.ctf` (Common Trace Format) and `.tef` (Trace Event Format) files, eliminating the need for manual conversion. - The [Zephelin Trace Viewer](https://marketplace.visualstudio.com/items?itemName=Antmicro.zephelin-trace) extension is automatically installed as a dependency of the CodeFusion Studio extension and lets you visualize trace data directly within VS Code, providing an integrated alternative to the web-based viewer. - New profiling options include **CPU Load** and **Memory Usage** sampling and **Application Callgraph** for capturing function call graphs and application-level tracing. ### Expanded platform support The following platform and tooling improvements expand CodeFusion Studio's reach across additional hardware and workflows: - **[`cfsutil`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/index.md) — CLI-first workspace and build workflows:** It is now possible to set up a workspace, build, and flash a project entirely from the command line, without opening the IDE. Use these commands in sequence: - [`cfsutil socs list`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/socs/#list) — list available SoCs. - [`cfsutil socs info`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/socs/#info) — display available boards, packages, and cores for a specific SoC. - [`cfsutil workspace configure`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/workspace/#configure-workspace) — generate a `.cfsworkspace` configuration file from command-line options. Previously this required the IDE. - [`cfsutil workspace create`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/workspace/#create-workspace) — create the workspace from a configuration file or from command line arguments. - [`cfsutil tasks list`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/tasks/#list-tasks) and [`cfsutil tasks run`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/tasks/#run-a-task) — discover and run build and flash tasks. - **[Memory Viewer](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/memory-viewer/index.md) — multicore-aware memory inspection:** - The Memory Viewer is a new debug tool that lets you inspect device memory during live and retrospective debug sessions. It integrates directly with the CodeFusion Studio debug infrastructure, providing a native alternative to the Cortex-Debug memory viewer. - Displays memory in a scrollable hex and ASCII grid with configurable byte grouping (1, 2, or 4 bytes), column count (4–64), endianness (big/little), and display format (hexadecimal or decimal). - Navigates to any address by entering a hex or decimal value in the toolbar. - Auto-refreshes when the debugger halts and marks data as stale when the target resumes. Supports manual refresh when already halted. - Tracks all active debug sessions simultaneously and updates automatically when you switch context in a multi-core environment. - Supports retrospective debugging against core dump sessions in read-only mode. - **[Core Dump Analysis](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/core-dump-analysis/index.md) — expanded SoC support:** - Core dump support has been expanded to nine additional MAX devices: MAX32650, MAX32655, MAX32660, MAX32662, MAX32666, MAX32670, MAX32672, MAX78000, and MAX78002. - Core dump analysis now supports a total of 12 SoCs. For details on enabling and using core dump support, see the [Core Dump Analysis documentation](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/core-dump-analysis/index.md). - **[System Planner](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/index.md) improvements:** - Enhanced **Pin Config** search for faster and more precise identification of pins, signals, and peripherals, with categorized results and navigation in the Pin Mux view. - **[Automated version resolution](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/install-required/index.md)** — when opening a `.cfsconfig` file with missing data models or plugins, System Planner displays a resolution screen with automated installation options. - Added full System Planner support (Memory Allocation, Peripheral Allocation, Pin Config, and Registers) for MAX32660, MAX32662, MAX32666, MAX32672, and MAX32675C microcontrollers. - **[Workspace templates](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-new-workspace/index.md) — expanded template library:** This release adds new templates and extends existing templates to additional boards. - **New templates include:** - **MSDK**: Library generation, Library usage, Watchdog - **Zephyr**: Basic threading, Button handling, POSIX philosophers, UART echo These templates are available across a range of supported processors, including MAX32655, MAX32657, MAX32658, MAX32666, MAX32672, MAX32690, and MAX78000. - **Board support expanded for existing templates:** Existing MSDK templates (DMA, Hello World (C++), I2C scan, RTC, UART Loopback) now support MAX78000. Existing Zephyr templates (ADC sequence, I2C custom target, LittleFS, Watchdog) now support MAX32666 and MAX78000. Templates are shown in the [Workspace Creation wizard](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-new-workspace/index.md) based on your selected device — choose your processor and board to see available templates for your hardware. - **Workspace Creation Wizard — SoC selection improvements:** Enhanced SoC selection page with expandable family cards, sticky search with match count and highlighting, and improved responsive layout. - **Expanded SoC and RTOS support:** - Added support for Zephyr 4.3.0 across all supported MAX32xxx and MAX78xxx microcontrollers. - **[Package Manager](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/package-manager/index.md) enhancements:** - Some packages require license acceptance before installation. When installing packages through either the VS Code Command Palette or `cfsutil`, a license acceptance prompt appears during installation. In the Command Palette, review the license agreement and any referenced URLs, then select **Accept** (or **Accept All**, if multiple licenses are listed) to proceed. In the command line, `cfsutil` prompts for confirmation using an interactive `y/n` prompt. For automated workflows, the new `--acceptLicense` flag on [`cfsutil pkg install`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/package-manager/#install) accepts package license agreements automatically, allowing installation in scripts and CI pipelines without interactive prompts. - A new **(CFS) Delete Package from Cache** command in the Command Palette lets you delete packages that have been uninstalled but remain in the local cache. Multiple cached packages can be selected for deletion at once. - **[Plugins SDK](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/plugins/develop-plugins/index.md) reorganization:** The Plugins SDK is now distributed as the `cfs-plugins-sdk` package in the CodeFusion Studio repository, providing better version alignment with CFS releases and clearer dependency tracking. For complete documentation on developing plugins, including API reference and templating guide, see the [CFS Plugins SDK README](https://github.com/analogdevicesinc/codefusion-studio/blob/main/packages/cfs-plugins-sdk/README.md). - **[`cfsutil` SoC command updates](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/socs/index.md) — updated output format:** The previous `{name}-{package}` format used to identify SoCs failed for parts with hyphens in their names, such as `adsp-21836`. The output format has been updated to separate SoC name and package explicitly. `socs export` now takes the SoC name as a positional argument with a separate `-p, --package` flag; `socs list` now groups packages per SoC. Breaking change The default output format of `socs list` (text and JSON) and the usage of `socs export` have changed. If you have scripts that rely on the previous format, use the `--legacy` flag for `socs list` or the deprecated `-n, --name` flag for `socs export` while you migrate. Both will be removed in a future release. ## Software component versions installed with CFS 2.2.0 | Component | Version | Notes | | --------------------------- | --------- | --------------------------------------------------------------------- | | Bare-metal ARM toolchain | 14.3.Rel1 | GCC toolchain for 32-bit Arm® targets | | Bare-metal RISC-V toolchain | 14.2.0 | GCC toolchain for RISC-V targets | | MSDK | 2.2.0 | Part support and examples for MAX32xxx and MAX78xxx microcontrollers | | SHARC-FX SDK | 3.0.3 | SDK for the Cortex-M33 core on SHARC-FX targets | | Zephyr RTOS | 4.3.0 | Real-time operating system for MAX32xxx and MAX78xxx microcontrollers | | Zephyr SDK | 0.17.4 | GCC-based toolchain for 32-bit Arm® development with Zephyr RTOS | ## Host architecture support CodeFusion Studio is supported on the following host operating systems: - Windows 11 (64-bit) - macOS 15 and macOS 26 (ARM64) - Ubuntu 22.04 and 24.04 (64-bit) *Earlier or newer OS versions may work but are not officially supported.* ## Target architecture support This release expands System Planner support to additional MAX32xxx processors. For the full list of supported processors and their feature support, see [supported processors](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/about/supported-processors/index.md). ## Known issues and limitations ### Plugins **MSDK Project Plugin incorrectly appears for MAX32657:** When you use the [**Manually configure the workspace**](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-new-workspace/#manually-configure-the-workspace) option in the Workspace Creation Wizard to create a workspace for the MAX32657, the **MSDK Project Plugin** appears in the **Code Generation Plugin** selection screen even though this processor does not support MSDK. Do not select the **MSDK Project Plugin** in the **Code Generation Plugin** step for this processor. For processors with full MSDK support, see [supported processors](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/about/supported-processors/index.md). **TrustZone manual configuration removed for MAX32657/MAX32658:** The manual TrustZone configuration option in the Workspace Creation Wizard has been removed for MAX32657 and MAX32658 devices due to build issues in manually configured TrustZone workspaces. [TrustZone support](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/targets/trustzone/index.md) is still available through the **TF-M Secure Partition template**, which has been verified to build correctly. Use the template-based workflow for all TrustZone projects on these devices. ### Package Manager **Package version conflict with cfs_zephyr_max32657_plugins/1.1.0:** Installing `cfs_zephyr_max32657_plugins/1.1.0` when `cfs_base_plugins/2.0.0` is already installed may result in a version conflict error: `Version conflict: Conflict between cfs_base_plugins/[^2.0.1] and cfs_base_plugins/2.0.0 in the graph.` The Package Manager does not automatically upgrade `cfs_base_plugins/2.0.0` to satisfy the plugin's dependency requirements. **Workaround:** Install `cfs_base_plugins/2.1.0` (or `cfs_base_plugins/2.0.1`) first, then install `cfs_zephyr_max32657_plugins/1.1.0`. Installing `cfs_zephyr_max32657_plugins/1.1.0` without first installing a compatible base plugins version may install `cfs_base_plugins/2.2.0`, which does not support the Zephyr CGM Demo and Zephyr BLE Peripheral workspace templates for MAX32657/8. ### Workspaces and builds **Build error when workspace is opened in OneDrive or a folder with spaces:** A build error occurs when a valid workspace is opened in OneDrive or any location where the folder name contains spaces (for example, `My Workspace` or `OneDrive/My Documents`). This affects the CMake build process, which fails to handle paths containing spaces correctly. **Workaround:** Move the workspace to a folder path without spaces, or ensure the workspace is stored in a local directory path that does not contain spaces. ### CFS Command-Line (cfsutil) **`cfsutil project create` fails for template-based workspaces:** Workspaces created from templates — whether using the Workspace Creation Wizard template flow (such as MSDK Multicore Hello World or Zephyr Single Core Blinky) or template/flag-driven `cfsutil workspace create` flows — generate a workspace configuration with an empty `Projects` array, causing `cfsutil project create` to fail with `Projects cannot currently be generated from this type of workspace file.` Use the [**Manually configure the workspace**](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-new-workspace/#manually-configure-the-workspace) option in the Workspace Creation Wizard, or run [`cfsutil workspace configure`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/workspace/#configure-workspace) followed by `cfsutil workspace create -i`, which uses an input `.cfsworkspace` file with a correctly populated `Projects` array. ### Profiling **Profiling may fail with memory overflow:** Enabling Zephelin profiling options (CPU Load, Memory Usage, Application Callgraph, AI Model Profiling) increases memory usage and may cause build failures with linker errors (`region 'RAM' overflowed by X bytes`). Disabling some profiling options may reduce memory usage, but the device may not have sufficient memory to support profiling in the current application. ### Debugging **J-Link Software and Documentation Pack V8.94 required for MAX32657/8:** As of this release, custom MAX32657/8 J-Link support files have been removed from the installer. Official support for these processors is now provided directly by Segger in J-Link Software and Documentation Pack V8.94 and later. **Minimum required version: V8.94**. Download the latest version from the [Segger website](https://www.segger.com/downloads/jlink/). **J-Link flash erase may not clear full flash on MAX32657:** The **Erase (JLink)** action in the Actions panel may not fully erase flash memory on MAX32657 devices. Although J-Link reports successful completion, residual code may remain in flash, potentially causing unexpected behavior. As a workaround, use the **Erase (OpenOCD)** task instead, or run the following OpenOCD command: ``` openocd -s scripts -f interface/jlink.cfg -f target/max32657.cfg -c "init; reset halt; max32xxx mass_erase 0; shutdown" ``` **erase_JLink task may require cfs.jlink.path configuration:** The `erase_JLink` task (run using [`cfsutil tasks run`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/tasks/index.md)) may fail with `JLinkExe: No such file or directory` if the `cfs.jlink.path` setting is not configured. **Workaround:** Set the `cfs.jlink.path` configuration setting to point to your J-Link installation directory (for example, `/opt/SEGGER/JLink_` on Linux, `/Applications/SEGGER/JLink_` on macOS, or `C:\Program Files\SEGGER\JLink_` on Windows). For detailed instructions, see [Install Segger J-Link debugger drivers](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-drivers/install-jlink-drivers/index.md). **Debugging Zephyr projects with J-Link may not halt at `main`:** When using older versions of the Cortex-Debug VS Code extension or J-Link Software and Documentation Pack, J-Link debugger sessions for Zephyr projects may not halt at the `main` breakpoint on launch. This occurs because the `main` function is reached before the debugger completes its initialization sequence. **Solution:** Update to the latest Cortex-Debug extension (v1.12.1) and J-Link Software and Documentation Pack V9.36 or later to resolve this issue. **J-Link has limited board support:** Not all debug functionality of the boards is accessible using the Segger J-Link. For a list of supported devices, see the [Segger website](https://www.segger.com/supported-devices/jlink/maxim/). | Board | Issue | Alternatives | | -------------- | --------------------------------------------------------- | ---------------------------------------------- | | MAX32650EVKIT | Serial output not available | Use MAXPICO debugger if you need serial output | | MAX32650FTHR | Serial output not available | Use MAXPICO debugger if you need serial output | | MAX32655FTHR | No JTAG connector for direct J-Link connection | Use MAXPICO debugger instead | | MAX32660EVSYS | No JTAG connector for direct J-Link connection | Use MAXPICO debugger instead | | MAX32666FTHR | Serial output not available | Use MAXPICO debugger if you need serial output | | MAX32670EVKIT | J-Link supported, but board does not expose SWD/JTAG pins | Use MAXPICO debugger instead | | MAX32675CEVKIT | Serial output not available | Use MAXPICO debugger if you need serial output | | MAX32690FTHR | Serial output not available | Use MAXPICO debugger if you need serial output | | APARD32690 | Serial output not available | Use MAXPICO debugger if you need serial output | | MAX78000FTHR | Not supported | Use MAXPICO debugger instead | # 2.2.1 Release Notes ## Source CodeFusion Studio source can be found on [GitHub](https://github.com/analogdevicesinc/codefusion-studio/releases/tag/V2.2.1/) under tag `V2.2.1` ## About this release CodeFusion Studio 2.2.1 is an incremental release that builds on the foundation established in CFS 2.2.0. This release includes stability improvements, bug fixes, and new packages for Zephyr 4.4.0 development on MAX32657 and MAX32658. ## Zephyr 4.4.0 support for MAX32657 and MAX32658 To develop with MAX32657 and MAX32658 on Zephyr 4.4.0, install the `zephyr/4.4.0-b.1` package. The Zephyr ARM Toolchain package (`zephyr_arm_toolchain/1.0.1`) is installed automatically as a dependency. Install using **(CFS) Install Package** from the VS Code Command Palette or from the CFS Terminal by running: ``` cfsutil pkg install zephyr/4.4.0-b.1 ``` The release also includes the **Zephyr Single Core PM GPIO Wakeup** workspace template, which demonstrates Zephyr power management on MAX32657/MAX32658 — runtime idle, standby, and suspend to RAM states with GPIO wakeup. The template requires the `zephyr/4.4.0-b.1` package to build. For installation steps and to get started with the new template, see the [MAX32657/MAX32658 Zephyr 4.4.0 tutorial](https://developer.analog.com/docs/codefusion-studio/2.2.1/tutorials/max32657-zephyr/). Warning Do not install the Zephyr 4.4.0 packages for MAX32657 and MAX32658 with earlier versions of CFS. These packages include features such as updated toolchain configuration that are not supported in earlier CFS versions. ## Bug fixes and enhancements - **Workspace Creation Wizard — special character handling in SoC filter:** Fixed an issue where entering special characters (`\`, `^`, `$`, `*`, `+`, `?`, `.`, `(`, `)`, `|`, `[`, `]`, `{`, `}`, `/`, `-`) in the SoC filter field during workspace creation caused the display to crash. The filter now properly escapes these characters, preventing the UI from becoming unresponsive. Wildcard characters not supported The `*` character is not interpreted as a wildcard in the SoC filter. To find SoCs, enter partial names or identifiers without wildcards (example: `MAX32` to find all MAX32xxx devices). - **Core Dump Analysis — removed `cfs.zephyrCoreDumpScriptsPath` setting:** The `cfs.zephyrCoreDumpScriptsPath` VS Code setting has been removed. CodeFusion Studio now resolves the Zephyr core dump scripts path automatically from the Zephyr toolchain, so no manual configuration is required. This change is backward compatible: if you previously defined this setting in your `settings.json`, core dump analysis continues to work, and the existing entry is simply ignored. - **System Planner — I3C pin configuration (MAX32657/MAX32658):** Fixed an issue where enabling all I3C pins generated an undefined devicetree node for the Pull-Up Resistor (PUR) pin in the overlay files. - **System Planner — automated version resolution:** Improved the [automated version resolution](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/install-required/index.md) experience when opening a `.cfsconfig` file with missing data models or plugins. The resolution screen now shows clear progress while it searches for compatible packages. ## Known issues and limitations ### Security **Zephyr 4.4.0 security vulnerabilities:** Some security vulnerabilities addressed in Zephyr 4.4.0 remain under embargo. For details, see the [Zephyr 4.4.0 release notes](https://docs.zephyrproject.org/latest/releases/release-notes-4.4.html#security-vulnerability-related). ### Profiling **Zephelin requires Zephyr 4.3.0:** To use [Zephelin profiling](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/profiling/index.md), build with Zephyr 4.3.0, which is included in the installation and active by default. Zephelin profiling is not available on Zephyr 4.4.0 in this release. ### Debugging **macOS only: Python 3.12 required for GDB Toolbox and Core Dump Analysis on MAX32657/MAX32658:** On macOS, debugging MAX32657 and MAX32658 with the `zephyr_arm_toolchain/1.0.1` package requires Python 3.12. To enable Python-based scripts, install Python 3.12 using Homebrew: ``` brew install python@3.12 ``` If you are using GDB Toolbox scripts, also complete the steps in the entry below. **macOS only: GDB Toolbox requires Python-enabled GDB:** On macOS, the Python-enabled GDB binary must be configured in your workspace's `.vscode/launch.json` to use GDB Toolbox scripts. To enable Python-based scripts, complete the following steps: 1. Open your workspace's `/.vscode/launch.json`, where `` matches your target's core (`m33` or `m4`). In the debug configuration, append `-py` to the `gdbPath` value in the `osx` section. For M33 targets (for example, MAX32657): ``` "osx": { "gdbPath": "${cfs:tool.path.arm.zephyr.eabi.toolchain.debuggerPath}-py" } ``` For M4 targets (for example, MAX32690): ``` "osx": { "gdbPath": "${config:cfs.sdk.path}/Tools/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gdb-py" } ``` 1. Launch (or relaunch) a debug session. 1. Run a supported Python-based script (such as **Thread Analyzer**) from the GDB Toolbox panel to verify Python scripting is working. For instructions, see [Using the GDB Toolbox](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/gdb-toolbox/gdb-toolbox/index.md). **Linux only: Python 3.12 issues for GDB Toolbox and Core Dump Analysis on MAX32657/MAX32658:** On some Linux systems, GDB Toolbox scripts and Core Dump Analysis for MAX32657 and MAX32658 may fail with `ModuleNotFoundError: No module named '_struct'`. In testing, reinstalling the Python 3.12 package resolved the issue: ``` sudo apt install --reinstall python3.12 ``` ## Software component versions installed with CFS 2.2.1 | Component | Version | Notes | | --------------------------- | --------- | --------------------------------------------------------------------- | | Bare-metal ARM toolchain | 14.3.Rel1 | GCC toolchain for 32-bit Arm® targets | | Bare-metal RISC-V toolchain | 14.2.0 | GCC toolchain for RISC-V targets | | MSDK | 2.2.0 | Part support and examples for MAX32xxx and MAX78xxx microcontrollers | | SHARC-FX SDK | 3.0.3 | SDK for the Cortex-M33 core on SHARC-FX targets | | Zephyr RTOS | 4.3.0 | Real-time operating system for MAX32xxx and MAX78xxx microcontrollers | | Zephyr SDK | 0.17.4 | GCC-based toolchain for 32-bit Arm® development with Zephyr RTOS | ## Host architecture support CodeFusion Studio is supported on the following host operating systems: - Windows 11 (64-bit) - macOS 15 and macOS 26 (ARM64) - Ubuntu 22.04 and 24.04 (64-bit) *Earlier or newer OS versions may work but are not officially supported.* ## Target architecture support For the full list of supported processors and their feature support, see [supported processors](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/about/supported-processors/index.md). # 2.3.0 Release Notes ## Source CodeFusion Studio source can be found on [GitHub](https://github.com/analogdevicesinc/codefusion-studio/releases/tag/V2.3.0/) under tag `V2.3.0` ## About this release CodeFusion Studio 2.3.0 expands *AI-assisted embedded development*. A new Model Zoo helps you discover and deploy models. Documentation-backed AI assistant skills answer product questions directly in your editor. Zephelin profiling now captures traces over USB as well as UART, giving deeper insight into AI inference performance on hardware. This release also includes a graphical Package Manager that puts browsing, filtering, and installing packages in one place, alongside workspace template expansion and usability improvements across the Workspace Creation Wizard, System Planner, and debug tools. ## What's new The following are some of the new features and enhancements introduced in version 2.3.0. - **[Workspace templates](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-new-workspace/index.md) — expanded template library:** This release adds new templates and extends existing templates to additional processors (SoCs). **Templates added or updated in this release include:** | Template | Supported processors | | ----------------------------------- | -------------------------------------------------------------------- | | MSDK Single Core AES | MAX32655, MAX32672, MAX78000 | | MSDK Single Core Coremark | MAX32655, MAX32690 | | MSDK Single Core CRC | MAX32655, MAX32672, MAX32690, MAX78000 | | MSDK Single Core CTB AES | MAX32672, MAX32690 | | MSDK Single Core ECC | MAX78000 | | MSDK Single Core Flash | MAX32655, MAX32672, MAX32690, MAX78000 | | MSDK Single Core GPIO | MAX32655, MAX32672, MAX32690, MAX78000 | | MSDK Single Core Hash | MAX32690 | | MSDK Single Core RTC Backup | MAX32655, MAX32672, MAX32690, MAX78000 | | MSDK Single Core SPI | MAX32655, MAX32672, MAX32690, MAX78000 | | Zephyr Single Core ADC Devicetree | MAX32655, MAX32666, MAX32672, MAX32690, MAX78000 | | Zephyr Single Core CRC | MAX32655, MAX32657, MAX32658, MAX32666, MAX32672, MAX32690, MAX78000 | | Zephyr Single Core Eventfd | MAX32655, MAX32657, MAX32658, MAX32666, MAX32672, MAX32690, MAX78000 | | Zephyr Single Core Hello World User | MAX32655, MAX32657, MAX32658, MAX32666, MAX32672, MAX32690, MAX78000 | | Zephyr Single Core LVGL Basic | MAX32672, MAX32690 | | Zephyr Single Core UART Async API | MAX32655, MAX32657, MAX32658, MAX32666, MAX32672, MAX32690, MAX78000 | Templates are shown in the [Workspace Creation wizard](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-new-workspace/index.md) based on your selected device — choose your processor and board to see available templates for your hardware. Note The **Zephyr Single Core Hello World User** template builds a Zephyr userspace application (`CONFIG_USERSPACE=y`), which requires the `gperf` package (`gperf/3.1.0`). When you create a workspace from this template, CFS detects that `gperf` is required and prompts you to install it. See [Commonly available packages](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/available-packages/index.md). **Processor support expanded for existing templates:** | Template | Processors added | | --------------------------------------------------- | ------------------------------------------------ | | MSDK Single Core ICC (Instruction Cache Controller) | MAX32672, MAX78000 | | Zephyr Single Core Basic Synchronization | MAX32657, MAX32658, MAX32666, MAX32672, MAX78000 | | Zephyr Single Core Counter Alarm | MAX32657, MAX32658, MAX32666, MAX32672, MAX78000 | | Zephyr Single Core Dining Philosophers | MAX32657, MAX32658, MAX32666, MAX32672, MAX78000 | | Zephyr Single Core Hello World C++ | MAX32657, MAX32658, MAX32666, MAX32672, MAX78000 | | Zephyr Single Core Synchronization C++ | MAX32657, MAX32658, MAX32666, MAX32672, MAX78000 | - **Quick Access Panel:** The CFS sidebar now includes a **Help and Support** section with links to the Getting Started walkthrough, online documentation, Engineer Zone, and technical support. - **Workspace Creation Wizard — template usability improvements:** - Templates in the **Workspace Template** section of the **Workspace Creation Options** step are now listed in alphabetical order. - A search bar lets you filter templates by name or description, making it faster to find the right starting point. - **[Peripheral Allocation](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/peripheral-allocation/index.md) — automatic signal assignment:** When you allocate a peripheral to a project, CFS automatically assigns each required signal (if it has a single possible pin), reducing manual setup. - **[Memory Viewer](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/memory-viewer/index.md) — go to symbol:** The **Go to** field now accepts symbol names in addition to hex and decimal addresses. Enter a variable or function name to jump directly to its location in memory without looking up the address first. - **[Package Manager UI](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/manage-packages-ide/index.md) — new graphical package management:** A new graphical interface for managing packages directly in VS Code. Browse and filter packages by name, status, SoC, or type; view package details including version history, license, and supported processors; and install or uninstall packages - all without leaving the editor. Open it by clicking **Manage Packages** in the **Home** section of the CFS sidebar, or by running **(CFS) Open Package Manager** from the Command Palette. - **[Telemetry](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/about/telemetry/index.md) — expanded usage insights:** Anonymous, opt-in telemetry covers System Planner configuration, code generation, build, flash, debug, and artificial intelligence (AI) model workflows. Telemetry remains **disabled by default** and collects no personally identifying information. Enabling telemetry is one of the most direct ways to influence what we build next — it tells us which features matter most so we can prioritize them. If you'd like to help shape the roadmap, you can turn it on at any time in **Settings** by searching for `cfs.telemetry`. For more information about what is collected, view [Telemetry](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/about/telemetry/index.md). - **[API key authentication](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/apikey-auth/index.md) for `cfsutil`:** CLI commands that access restricted cloud resources — including `catalog update`, `ai build`, `docker pull`, and package manager commands — can now authenticate using an API key. Set the `CFS_API_KEY` environment variable to your key value before running a command. This is particularly useful in CI/CD pipelines and other automated workflows where interactive login is not possible. Use the following commands under the `cfsutil myanalog apikey` topic to create and manage API keys. These commands require an active myAnalog session: | Command | Description | | ----------------------------------------- | ------------------------------------ | | `cfsutil myanalog apikey create` | Creates a new API key. | | `cfsutil myanalog apikey list` | Lists all API keys for your account. | | `cfsutil myanalog apikey delete ` | Deletes an API key by ID. | - **[Registers-Only Plugin](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-new-workspace/index.md) deprecated:** The Registers-Only (bare-metal) Plugin is deprecated and will be removed in a future release. It remains available in this release for advanced workflows that generate code accessing memory-mapped registers (MMRs) directly. - **[AI-Assisted Development Skills](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/developer-tools/cfs-ai-skills/index.md) — doc-backed answers in your AI assistant:** New `cfs-docs` and `cfs-cli` skills give your AI assistant product-specific answers about CodeFusion Studio. They are bundled with the VS Code extension for GitHub Copilot, and follow the open Agent Skills standard so they also work in Claude Code, OpenAI Codex, and other supported agents. - **[Model Zoo](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/manage-ai-models/#select-a-model-from-the-model-zoo) — browse and select AI models:** When you add a model in the [Embedded AI Tools](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/manage-ai-models/index.md) or create a [workspace from an AI model](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/create-workspace-from-ai-model/index.md), the **Browse** button opens the Model Zoo — a library of AI models hosted by Analog Devices. Search and filter by platform, core, and category, compare model sizes across quantizations, and select a model to populate its file and, when available, sample data fields. You can still select a local model file, or point the Model Zoo at a custom source. - **[Profiling](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/profiling/index.md) — USB trace capture:** Capture Zephelin profiling traces over a USB interface in addition to UART. Select **USB** as the trace interface in System Planner, then select the connected USB device in the Trace Capture panel. - **Machine-readable documentation (`llms.txt`):** The User Guide is available in an AI-friendly format that follows the [llms.txt standard](https://llmstxt.org/). Point your AI assistant at [llms.txt](https://developer.analog.com/docs/codefusion-studio/latest/llms.txt) for an indexed list of documentation sections, or [llms-full.txt](https://developer.analog.com/docs/codefusion-studio/latest/llms-full.txt) for the full documentation content in a single file. - **Build command output:** Build commands display output in a new format. Underlying build behavior is unchanged. ### Development platforms and tools - Support for Zephyr RTOS 4.3 [Get started with Zephyr RTOS 4.3](https://docs.zephyrproject.org/4.3.0/) - Support for the MSDK [Get started with MSDK](https://analogdevicesinc.github.io/msdk/USERGUIDE/) - Support for the ADSP-2183x/SC83x SHARC-FX family (Windows only), which requires the Xtensa SHARC-FX toolchain to build and the ADI ICE drivers to debug through ADI ICE probes. For setup and debugging instructions, see [Debugging a SHARC-FX application](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-sharc-fx/index.md). - Compiler and debug support is available for Zephyr (Arm Cortex-M only) and MSDK (Arm Cortex-M and RISC-V) on supported MAX32xxx and MAX78xxx microcontrollers, and SHARC-FX (ADSP-2183x/SC83x family). #### Software component versions installed with CFS 2.3.0 | Component | Version | Notes | | --------------------------- | --------- | --------------------------------------------------------------------- | | Bare-metal ARM toolchain | 14.3.Rel1 | GCC toolchain for 32-bit Arm® targets | | Bare-metal RISC-V toolchain | 14.2.0 | GCC toolchain for RISC-V targets | | MSDK | 2.3.0 | Part support and examples for MAX32xxx and MAX78xxx microcontrollers | | SHARC-FX SDK | 3.0.3 | SDK for the Cortex-M33 core on SHARC-FX targets | | Zephyr RTOS | 4.3.0 | Real-time operating system for MAX32xxx and MAX78xxx microcontrollers | | Zephyr SDK | 0.17.4 | GCC-based toolchain for 32-bit Arm® development with Zephyr RTOS | ### Host architecture support CodeFusion Studio is supported on the following host operating systems: - Windows 11 (64-bit) - macOS 15 and macOS 26 (ARM64) - Ubuntu 22.04 and 24.04 (64-bit) *Earlier or newer OS versions might work but are not officially supported.* ### Target architecture support Processor support is unchanged in this release. For the full list of supported processors and their feature support, see [supported processors](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/about/supported-processors/index.md). ## Known issues and limitations - **Profiling — USB trace capture on Windows:** USB trace capture does not work reliably on Windows hosts. The device is usually not detected and does not appear in the **USB Device** list, and capture can fail even when the device is detected. Capturing through WSL2 is also unreliable, because USB device sharing is inconsistent. To capture profiling traces over USB, use a macOS or Linux host. - **Profiling — USB trace capture for run-once applications:** USB capture cannot record traces from applications whose traced activity runs once at startup, including the **Zephyr Single Core TensorFlow AI Inference Profiling** template. Periodic metrics such as **CPU Load** remain available. Use UART to capture run-once traces. See [Profiling](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/profiling/#step-4-capture-the-profiler-trace). - **Profiling — USB trace capture fails to build on MAX78002, MAX32650, and MAX32666:** On MAX78002, MAX32650, and MAX32666 Zephyr projects, selecting **USB** as the trace interface generates code that fails to build, because the High-Speed USB peripheral on these processors is not yet supported in the Zephyr devicetree. The build stops with `warning: The High-Speed USB peripheral is not currently supported in devicetree` followed by `error: '__device_dts_ord_DT_N_NODELABEL_zephyr_udc0_ORD' undeclared`. In this release, USB trace capture is supported on MAX32690 only, and on macOS and Linux hosts only (see the Windows limitation in this section). Use UART to capture profiling traces on MAX78002, MAX32650, and MAX32666. See [Profiling](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/profiling/#before-you-start). - **Profiling — trace capture not supported on MAX32675C:** On MAX32675C Zephyr projects, Zephelin profiling trace capture is not supported over UART or USB. - **Model Zoo — default catalog coverage:** The Model Zoo displays models from the default catalog for the ADSP-SC835 / SC835W and MAX32690. For other processors, point the Model Zoo at a custom source or select a local model file instead. - **[Package Manager UI](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/manage-packages-ide/index.md) — Type filter:** The **Type** filter may not always return the correct package results. To find a specific package, search by name using the search field instead. # 2.4.0 Release Notes ## Source CodeFusion Studio source can be found on [GitHub](https://github.com/analogdevicesinc/codefusion-studio/releases/tag/V2.4.0/) under tag `V2.4.0`. ## What's new The following are some of the new features and enhancements introduced in version 2.4.0. ### CLI #### New commands - **[`cfsutil ai e2e`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/e2e/index.md):** Runs the full AI model workflow in one step: compatibility check, optional profiling, workspace creation with build, and flash and serial capture on hardware. By default, the command converts captured TEF traces into CodeFusion Studio reports; use `--no-create-reports` to skip. - **[`cfsutil convert`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/convert/index.md):** Converts a TEF profiling trace into a CodeFusion Studio report (`.cfsreport`). - **[`cfsutil validate config`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/validate/index.md):** Validates a CFS workspace or a standalone `.cfsconfig` file against the schema and reports errors and warnings. Supports `--workspace`, `--input`, `--verbose`, and `--format` flags. The command also reports `pin-conflict` for incompatible physical-pin assignments, `control-invalid` for persisted pin-control errors, and `control-invalid-value` when an unconditional peripheral control value violates its type, range, or pattern constraints. These checks fail the command (critical) when a data model is available for the SoC; validation falls back to schema-only checks (warning) when it isn't. - **[`cfsutil validate dependencies`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/validate/#validate-dependencies):** Checks that packages declared in the workspace and project dependency manifests are installed at compatible versions. Alias `cfsutil validate deps`. Supports `--format` flag. - **[`cfsutil pkg path`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/package-manager/#path):** Retrieves the absolute filesystem path of an installed package by name. - **[`cfsutil telemetry`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/telemetry/index.md):** Manage telemetry preferences from the command line with `cfsutil telemetry enable`, `cfsutil telemetry disable`, and `cfsutil telemetry status`. The CLI displays the privacy disclosure during consent and in human-readable status output, including the data collected and the locally stored usage identifier, and explains the local check used to distinguish ADI-internal from external use. The CLI prompts for consent on its first interactive run and never sends telemetry in CI or other non-interactive environments. For details, refer to [Telemetry](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/telemetry/index.md). #### New flags - **[`cfsutil pkg install`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/package-manager/#install-from-a-local-tarball) — `--tar`:** Install a package from a local tarball using `--tar`, without downloading it from a package server. - **[`cfsutil tasks run`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/tasks/#run-a-task) — `--timeout` and dependency-aware failure messages:** Use `--timeout` with `--capture` to stop a serial port capture session automatically after the specified number of seconds, measured from when the task completes successfully. Omit the flag, or set it to `0`, to capture until you stop it manually. When a task fails and the workspace declares unmet package dependencies, the failure message lists the unmet packages and points to `cfsutil validate dependencies`. Task execution is never blocked or delayed by dependency validation. - **[`cfsutil ai workspace create`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/workspace/#set-model-fields) — `--set`:** Set model fields, such as `enabled`, in the new workspace with `--set key=value`. Repeat the flag to set multiple fields. #### Behavior changes - **[`cfsutil ai model`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/model/#add-command) — paths and URLs stored as provided, and identifier collision detection:** `cfsutil ai model add` stores its `--model`, `--dataset`, and `--network-config` values as provided in the `.cfsconfig` file. `cfsutil ai model update` does the same for `model`, `dataset`, and `networkconfig` values passed through `--set`. Enter relative paths relative to the workspace root, and run these commands from the workspace root because `cfsutil ai build` resolves relative paths from there. Both commands also reject a model when the normalized C identifier for its `Name` or optional `Symbol` collides case-insensitively with either identifier from another model in the same workspace. - **[Verbose and quiet output](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#verbose-and-quiet-output):** `cfsutil` commands are moving to consistent `-v`/`--verbose` and `-q`/`--quiet` behavior. For details of the extra output, see the command page. #### Breaking changes and deprecations - **[JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope):** `cfsutil` commands are moving to a standard `{ok, command, data, warnings, errors}` envelope for `--format json` output. For the list of commands, see [JSON output envelope](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/#json-output-envelope). If you have scripts that parse `--format json` output from these commands, update them to read results from `data`. Some commands also changed the shape of their results; see the command page for details. - **[`cfsutil socs export`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/socs/index.md) — `--gzip` removed:** The `--gzip` flag has been removed. - **CLI flag collisions — short-flag deprecations:** The short flags for several commands collided with the global `-v`/`--verbose` and `-f`/`--format` flags and are deprecated in favor of the long-form variants: [`cfsutil pkg list`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/package-manager/#list) (`-f` → `--filter`), [`cfsutil elf symbols`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/elf-utilities/#symbols) (`-f` → `--full`), [`cfsutil ai workspace create`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/ai/workspace/index.md) (`-f` → `--skip-compat`), and [`cfsutil socs export`](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/socs/#export) (`-v` → `--version`). ### System Planner - **[SRU Config](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/sru-config/index.md) — new tab:** Configure Signal Routing Unit (SRU) connections graphically for SHARC-FX processors, replacing manual register-level configuration. - **[Peripheral Allocation](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/peripheral-allocation/index.md) — SHARC-FX peripheral configuration:** Assign and configure peripherals such as UART, SPI, SPORT, TWI, and DMA on SHARC-FX processors. Code generation creates the matching driver configuration headers and adds the required drivers to the project build. - **[Pin Config](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/pin-config/index.md):** - **Fixed-function pins and configuration display:** Fixed-function pins on SHARC-FX peripherals, such as DAI0, now display their physical pin mappings. **Enable** and **Configure** controls appear only for pins that support those actions. This behavior also applies to peripherals that contain a mix of assignable and fixed signals, such as SYS. In the configuration sidebar, the **Configuration** and **Code Generation Plugin** sections appear only when they contain applicable controls. - **[Pin description editor](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/pin-config/#configuration-sidebar):** Peripherals that allow assignment at the pin level, such as GPIO, now show a **Details** section in the configuration sidebar with a **Description** field for documenting the purpose of the pin. - **[Manage AI Models](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/manage-ai-models/index.md):** - **Renamed tab:** The **Embedded AI Tools** tab in System Planner has been renamed to **Manage AI Models**. Functionality is unchanged. - **Identifier collision detection:** Adding or updating a model reports `This identifier is already in use by another model` when the normalized **Model Name** or **Symbol for data** value (when set) collides case-insensitively with either value from another model in the workspace. - **[Reports saved to your project](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/manage-ai-models/#accessing-and-managing-reports):** Compatibility and profiling reports now save to the `reports` folder of the project assigned to the same core as the model, instead of always saving to the temp directory. ### Build and profiling - **[West Editor](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/developer-tools/west-editor/index.md) — new editor:** Open the `west.yml` manifest of a west workspace that you manage in a graphical editor. View the current status of each project, search and filter projects, edit revisions and groups, and turn groups on or off. - **[AI Hardware Profiling](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/deploy-and-profile-ai-model/index.md):** - **Clean & Build:** The AI Hardware Profiling view now uses the standard build task for your project by default and adds **Clean & Build** to rebuild the AI application from scratch after editing code. - **[Runtime Profile Report](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/workspaces/deploy-and-profile-ai-model/#runtime-profile-report):** For captures that generate a `.tef` file, selecting **Stop** also creates a **Runtime Profile Report** (`.cfsreport`) alongside it and opens the report automatically. The report shows measured latency, throughput, and per-layer timing from the target hardware. - **[Profiling](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/profiling/index.md):** - **[Instrumentation trigger and stopper functions](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/profiling/#advanced-customize-instrumentation-trigger-and-stopper-functions):** Set the functions that start and stop Application Callgraph instrumentation directly in System Planner, using the new **Trigger Function** and **Stopper Function** fields on the **Profiling** tab. - **[Zephelin live tracing](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/profiling/#stream-traces-live):** Stream trace data to the Zephelin Trace Viewer while the capture runs, instead of saving `.ctf` and `.tef` files for later viewing. Turn on **Enable Zephelin Live Tracing** in the **Trace Configuration** view to monitor CPU load, memory usage, and AI inference timing in real time over UART or USB. - **[Tasks](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/cfsutil/tasks/#run-a-task-before-another-task-with-dependson) — `dependsOn` support:** Add a `dependsOn` property to a custom task in `cfs.tasks.json` to run one or more other tasks first when you run the task from the CodeFusion Studio **Actions** view or with `cfsutil tasks run`. ### Debugging - **[Debug with SEGGER Ozone](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-with-ozone/index.md) — per-core actions:** The **Actions** panel shows a separate **Debug with Ozone (``)** action for each Ozone-capable core (Arm Cortex-M and RISC-V), so you can open the debugger for a specific core from either the **Workspace** context or a core context. Cores that don't support Ozone, such as SHARC-FX, no longer show the action. - **[GDB Toolbox](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/gdb-toolbox/index.md) — SHARC-FX fault analysis:** The **Analyze Faults** script supports SHARC-FX targets. During a halted debug session, it reads and decodes the SHARC-FX exception status registers and prints a fault summary. ### AI-assisted development - **[AI-Assisted Development Skills](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/developer-tools/cfs-ai-skills/index.md) — workspace bootstrap and AI model evaluation:** Three new skills extend what your AI assistant can do: `cfs-workspace-bootstrap` sets up a workspace and checks that your environment is ready to build; `cfs-ai-evaluation` evaluates an AI model on a connected ADI board; and `cfs-ai-report` turns the results into an engineering report. They are available in GitHub Copilot, Claude Code, OpenAI Codex, and other supported agents. In this release, the skills have been tested only on the MAX32690 EvKit. Other processors are untested, and results on them might be incomplete. For installation and usage, see [AI-Assisted Development Skills](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/developer-tools/cfs-ai-skills/index.md). If you installed the skills for Claude Code or another agent with CodeFusion Studio 2.3.0, update them to get the new skills. See [Update the skills](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/developer-tools/cfs-ai-skills/#update-the-skills). - **[AI Debug Assistant](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/ai-debug-assistant/index.md):** - **Chat participant and source-search interfaces removed:** The `@cfs-debug` GitHub Copilot chat participant has been removed. The MCP `debug_search_source` tool and `source-search-and-debug` prompt have also been removed; use the file-search capabilities of your AI client instead. Use the [CFS MCP debug server](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/ai-debug-assistant/getting-started/index.md) for AI-assisted debugging with GitHub Copilot Agent Mode, Claude Code, or another MCP-compatible AI client. - **[Automatic client connection](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-tools/ai-debug-assistant/getting-started/#example-github-copilot-agent-mode):** When you start the CFS MCP debug server, the built-in MCP client in VS Code connects automatically, so debug tools are ready to use in GitHub Copilot Agent Mode without an extra manual step. ### Package Manager - **[Manage package remotes](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/manage-packages-ide/#manage-package-remotes) — Remotes tab:** The new **Remotes** tab in the Package Manager lists your package remotes. You can add custom remotes, enable or disable any remote, change the authentication of a custom remote, and delete a custom remote without using the command line. - **[View installed package contents](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/view-installed-packages/index.md) — Packages view:** The new **Packages** view in the CodeFusion Studio sidebar lets you browse, search, and filter the contents of installed packages. By default it shows the packages your workspace depends on. - **[Check for package updates](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/manage-packages-ide/#check-for-package-updates) — update notifications:** CodeFusion Studio now notifies you when newer versions of the installed workspace packages are available. You can also check on demand with the `(CFS) Check for Package Updates` command. - **[`cfspkg://` Git protocol](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/build-and-flash/zephyr/#add-an-installed-package-to-a-west-workspace):** `west` can now clone a package installed with the Package Manager into your own application by using a `cfspkg:///` URL in `west.yml`. The package must already be installed and must be a Git repository. - **[Install packages](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/manage-packages-ide/#install-packages) — dependency conflict detection:** The review summary screen now checks whether the packages you selected pull in incompatible versions of the same package — whether that package is one of your direct selections or a dependency they share — and reports the conflict before you accept licenses. The disputed package is highlighted, and **Continue** is unavailable until you resolve the conflict. See [Dependency conflicts between selected packages](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/troubleshooting-package-manager/#dependency-conflicts-between-selected-packages) for recovery steps. ### Installer - **[Smaller, more flexible installation](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/install-cfs/index.md):** Install toolchains and SDKs separately through the [Package Manager](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/index.md), reducing the initial installer download and allowing you to install only the components you need. See [Commonly available packages](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/available-packages/index.md) for the toolchain and SDK packages that replace the removed installer components. The setup wizard copies the CodeFusion Studio extension VSIX to your system, installs OpenOCD for ADI processors, and can install ADI ICE Drivers on Windows. - **[Set the SDK path](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/set-up-cfs/index.md) — automatic extension host restart:** Changing the SDK path, either in the `cfs.sdk.path` setting or with **Choose SDK path**, restarts the VS Code extension host automatically to apply the new path. You no longer need to restart VS Code. - **[SHARC-FX on Linux](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-sharc-fx/index.md) — new host support:** You can now create, build, and debug SHARC-FX projects on Linux. When run with root privileges, the installer automatically configures [USB permissions for ICE emulators](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/debugging/debug-drivers/install-ice-drivers/#linux). ### Development platforms and tools - Support for Zephyr RTOS 4.4.2 [Get started with Zephyr RTOS 4.4](https://docs.zephyrproject.org/4.4.0/) - Support for the MSDK [Get started with MSDK](https://analogdevicesinc.github.io/msdk/USERGUIDE/) - Support for the ADSP-2183x/SC83x SHARC-FX family (Windows and Linux only) - Compiler and debug support is available for Zephyr (Arm Cortex-M only) and MSDK (Arm Cortex-M and RISC-V) on supported MAX32xxx and MAX78xxx microcontrollers, and SHARC-FX (ADSP-2183x/SC83x family). #### Software component versions available for CFS 2.4.0 Toolchains and SDKs are no longer included in the installer. Install them with the [Package Manager](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/index.md). For the full list of packages, see [Commonly available packages](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/installation/package-manager/available-packages/index.md). | Package | Version | Notes | | -------------------------- | -------- | --------------------------------------------------------------------- | | `gnu_arm_toolchain` | `14.3.1` | GCC toolchain for 32-bit Arm® targets | | `gnu_riscv_toolchain` | `14.2.3` | GCC toolchain for RISC-V targets | | `msdk` | `2.4.0` | Part support and examples for MAX32xxx and MAX78xxx microcontrollers | | `cortex-m_sharcfx_sdk` | `1.0.0` | SDK for the Cortex-M33 core on SHARC-FX targets | | `xtensa_sharcfx_toolchain` | `15.5.2` | Xtensa toolchain for the SHARC-FX cores | | `zephyr` | `4.4.2` | Real-time operating system for MAX32xxx and MAX78xxx microcontrollers | | `zephyr_arm_toolchain` | `1.0.3` | GCC-based toolchain for Zephyr RTOS | ### Host architecture support CodeFusion Studio is supported on the following host operating systems: - Windows 11 (64-bit) - macOS 15 and macOS 26 (ARM64) - Ubuntu 22.04 and 24.04 (x86-64) *Earlier or newer OS versions might work but are not officially supported.* ### Target architecture support Processor support is unchanged in this release. For the full list of supported processors and their feature support, see [supported processors](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/about/supported-processors/index.md). ## Known issues and limitations - **Zephelin profiling — not available on MAX32657 and MAX32658:** The Zephyr 4.4.0 package for these processors does not include Zephelin (`modules/zephelin`). Do not enable the Zephelin Profiler in System Planner for MAX32657 or MAX32658 projects. The **Zephyr Single Core TensorFlow AI Inference Profiling** template is no longer offered for MAX32657. To deploy and run a model on MAX32657, use the **Zephyr Single Core TensorFlow AI Model** template. - **Zephelin live tracing — fails to start with `zephyr/4.4.2`:** The `zephyr/4.4.2` package contains Zephelin revision `77ade5b`, whose backend can't find the Zephyr repository. When **Enable Zephelin Live Tracing** is turned on, selecting **Start Capture** displays an error that begins with `Failed to start Zephelin backend`. To work around this issue, clone Zephelin at revision `2ffa839` and point the Zephelin Trace Viewer extension at the clone, as described in [Advanced: Set up the Zephelin backend manually](https://developer.analog.com/docs/codefusion-studio/latest/user-guide/tools/profiling/#advanced-set-up-the-zephelin-backend-manually). - **OpenOCD — `adi-mpdbgagent.cfg` not supported:** The OpenOCD interface scripts folder (`/Tools/openocd/share/openocd/scripts/interface`) includes `adi-mpdbgagent.cfg`, which was added with an upstream OpenOCD update. It does not support any processor in CodeFusion Studio 2.4.0, and you can ignore it. - **SHARC-FX — `xt-nm` error during flash and erase:** On Windows and Linux, the **CFS: flash (sfx)**, **CFS: flash (m33)**, **CFS: erase (sfx)**, and **CFS: erase (m33)** tasks for SHARC-FX targets report an error because they cannot find `xt-nm`. On Windows, the error is `xt-nm.exe is not recognized as the name of a cmdlet, function, script file, or operable program`. On Linux, the error is `/bin/xt-nm: No such file or directory`. You can ignore these errors. The operation falls back to default values, and the flash or erase completes successfully.