The CodeFusion Studio (CFS) Plugin API enables users to extend key features of CodeFusion Studio, such as workspace setup, project configuration, and source code generation — without modifying the base application.
With the Plugin API, you can develop custom plugins tailored to your project’s needs—for example, upgrading an RTOS version, integrating middleware, or generating code from proprietary templates.
This repository includes:
To learn how to create your own plugin, see:
📄 DEVELOPMENT.md
Type | Purpose |
---|---|
Workspace | Sets up a complete workspace with pre-configured structure and settings |
Project | Defines how a single core/project is structured and configured |
Codegen | Generates source files based on hardware configuration and user selections |
💡 Codegen plugins are often included inside project plugins using the
codegen
section of.cfsplugin
.
For information on using CFS Plugins in CFS, refer to the CFS User Guide.
- The
.cfsplugin
file describes the plugin's metadata, supported SoCs, and specifies which files and templates should be generated. CodeFusion Studio reads this file to determine when and how the plugin is used. - The
index.ts
file exports a class that extendsCfsPlugin
. This class defines the plugin's behavior by implementinggetGenerator()
and optionallygetService()
. - Files are either copied as-is from the
files/
directory or rendered using a templating engine from thetemplates/
directory. - Reusable logic can be placed in a
services/
directory and made available via thegetService()
method.
- Workspace plugin:
zephyr41-single-core-blinky
- Project plugin (with codegen):
zephyr41-project-plugin
You can also reuse helpers in the common/
directory, including:
- Eta-based generators (
CfsEtaWorkspaceGenerator
) - File handling utilities
- Reusable service classes
my-plugin/
├── .cfsplugin # Describes plugin features and file/template outputs
├── index.ts # Main logic file (compiled to index.cjs)
├── files/ # Static files to be copied into generated workspaces
├── templates/ # Eta templates rendered based on user context
└── services/ # Optional: helper logic exposed via getService()
For a full step-by-step guide to creating a plugin, see DEVELOPMENT.md