CodeFusion Studio’s plugin system is what makes the tool extensible across different firmware platforms, RTOSes, and HALs 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. Three distinct plugin types handle different stages of the development workflow — workspace creation, project setup, and source code generation — and all three are surfaced at the appropriate points in the Workspace Creation Wizard and System Planner.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/analogdevicesinc/codefusion-studio/llms.txt
Use this file to discover all available pages before exploring further.
Plugin types
CFS supports three types of plugins:Workspace plugins
Provide single and multi-core workspace templates pre-populated with ADI-recommended configurations. Shown in the Workspace Creation Wizard when you choose Select a workspace template.
Project plugins
Define how a single-core project is structured and configured — including files, templates, and user-selectable options. Shown in the Workspace Creation Wizard when you choose Manually configure the workspace.
Code generation plugins
Define the templates used to produce source code from System Planner configuration settings (pin mux, memory, clocks, peripherals). Frequently bundled inside project plugins.
How plugins integrate with the CFS workflow
Workspace Creation Wizard
When you open the Workspace Creation Wizard and reach the Workspace Creation Options screen, your choice determines which plugin type drives the experience:- Select a workspace template — You are selecting a workspace plugin. The wizard is pre-populated with that plugin’s defaults and creates a complete, ready-to-use project structure.
- Manually configure the workspace — You are selecting a project plugin for each enabled core. Each core can use a different plugin (for example, Zephyr for CM4 and MSDK for RISC-V on a MAX32690).
System Planner
Plugins define the configuration options that appear throughout the System Planner. These options are specified in two key sections of the plugin’s.cfsplugin file: supportedSocs and properties.
supportedSocs
This section declares which SoCs and boards the plugin supports. SoC data models are distributed through the Package Manager and provide the baseline hardware configuration used by the System Planner:
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 or Zephyr chosen role. These settings influence code generation but do not affect runtime behavior:
supportedControls— Lists SoC-level controls that this plugin exposes to the user (for example,PARITYfor a UART peripheral).addedControls— Platform-specific configuration fields that the plugin adds on top of the hardware defaults, such asCHOSEN(for Zephyr devicetree role) andBAUD(clock frequency for code generation).modifiedControls— Overrides to existing SoC-level controls provided by the plugin.
Code generation
On the Generate Code tab in the System Planner, CFS uses thecodegen section of the selected code generation plugin to generate source files based on the current configuration. The plugin receives the full pin, clock, peripheral, and memory configuration and returns a map of filenames to generated content lines.
List installed plugins with cfsutil
The cfsutil cfsplugins list command enumerates all plugins currently visible to the CLI. This is useful for verifying which plugins are available on a given machine and for diagnosing issues when a workspace or project type is not appearing in the wizard.
Available flags
| Flag | Description |
|---|---|
-s, --search-path | Specify an additional plugin search path. Can be used multiple times. |
--soc | Filter results by supported SoC name. |
--board | Filter results by supported board name. |
--service | Filter results by service type (workspace, project, or codegen). |
--config-options | Include properties.project configuration options in the output. |
cfsutil CLI plugin extensions
The cfsutil CLI is built on oclif and exposes hook points that let external packages add new code generation engines and SoC data models without modifying the core CLI.
add-codegen — adding a code generation engine
The add-codegen plugin pattern implements two oclif hooks: get-engines and generate-code.
The get-engines hook returns an array of engine descriptors to register with the CLI:
generate-code hook performs the actual code generation. It receives three parameters:
engine— the engine name selected by the user.soc— the SoC data model object (pins, features, registers).configdata— an object containing the pin mux and pin configuration choices.
undefined. If it matches, the listener returns an object mapping filenames to arrays of generated lines (without line terminators):
add-soc — adding SoC data models
The add-soc plugin pattern implements the get-data-models hook, which returns a simple object mapping SoC names to the paths of their data model JSON files:
Develop custom plugins
CFS supports fully custom plugins, allowing you to extend its capabilities without modifying the base application. You can develop plugins tailored to specific project needs — such as upgrading an RTOS, integrating middleware, or applying custom code templates. For full details including API reference, templating guide, and plugin structure, see the CFS Plugins SDK README.Plugin discovery
TheCfsPluginManager (part of the cfs-lib package) automatically detects and parses plugins at startup. When VS Code launches, it:
- Scans the directories listed in
cfs.plugins.searchDirectories. - Validates plugin metadata.
- Registers plugin features for the CFS UI and CLI (
cfsutil).
Activate a custom plugin
After building and testing your plugin, make it available in CFS by adding the path to the plugindist directory to your VS Code settings.json:
Add the plugin path
Add the path to your plugin’s output directory under
cfs.plugins.searchDirectories:The path must point directly to the plugin’s
dist folder, not to its source directory.FAQ
What is the difference between a project plugin and a code generation plugin?
What is the difference between a project plugin and a code generation plugin?
A project plugin defines the full project structure: which files and templates are needed to set up the project environment, and what configuration options appear in the Workspace Creation Wizard. A code generation plugin (often bundled inside a project plugin) defines the templates that produce source code from the System Planner configuration. It is possible to have a project plugin that does not include a code generation plugin (for example, if the project uses an external toolchain for code generation), and it is possible for a code generation plugin to be shipped independently of a project plugin.
Can I use more than one plugin in a single workspace?
Can I use more than one plugin in a single workspace?
Yes. In a multi-core workspace, each core can use a different plugin. For example, a MAX32690 workspace might use
com.analog.project.zephyr.plugin for the CM4 core and com.analog.project.msdk.plugin for the RISC-V core. The System Planner and code generation engine handle each core’s plugin independently.Where does CFS look for plugins by default?
Where does CFS look for plugins by default?
CFS scans the directories listed in
cfs.plugins.searchDirectories in your VS Code settings. Plugins installed through the Package Manager are placed in a well-known location that is included in the default search path. You can add additional directories to cfs.plugins.searchDirectories to include custom or locally developed plugins.How do I verify which plugins are visible to the CLI?
How do I verify which plugins are visible to the CLI?
Run
cfsutil cfsplugins list to see all plugins discovered in the default and any configured search paths. Use the --soc, --board, and --service flags to narrow the results. If a plugin you expect to see is missing, run cfsutil cfsplugins list -s /path/to/plugins with the explicit path to confirm whether the plugin is being found.