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:
- 📦 Plugin API reference:
./api - 🧩 Reference plugins:
./plugins - 📄 Development guide:
DEVELOPMENT.md
Plugins are defined in their .cfsplugin file. Each plugin can implement one or more of the following services:
workspace– Defines the folder structure and configuration of a generated workspace.project– Configures individual project cores within the workspace.codegen– Generates dynamic files such asboard.confor.overlaybased on hardware selections.properties– Declares user-configurable fields in the System Planner UI.
See cfs-services.ts in the Plugin API for a full interface list.
💡 Codegen plugins are often included inside project plugins using the
codegensection of.cfsplugin.
For information on using CFS Plugins in CFS, refer to the CFS User Guide.
-
Plugin Discovery
CodeFusion Studio reads your.cfspluginto identify the offered services and supported SoCs/boards. -
Default Behavior (Generic Plugin)
If there’s noindex.ts/index.cjs, the default generic plugin implementation (cfs-generic-plugin.ts) in the Plugin API uses Eta to render anything undertemplates/. -
Custom Logic (Optional)
Add anindex.tsexporting a class that implements one or more service interfaces (seecfs-services.ts).
You can:- Reuse the built-in components in
src/generic/componentsin the Plugin API, or - Use your own from scratch (for example: swap out Eta a different engine).
- Reuse the built-in components in
-
Static and Template Files
Each plugin can include:files/→ copied verbatim into the workspacetemplates/→ rendered by Eta (unless you override it in yourindex.ts) All entries must be declared in your.cfspluginunder the appropriate service block.
zephyr-single-core-blinky– Only implements theworkspaceservice. Noindex.tsneeded—uses generic behavior.zephyr-project-plugin– Combinesproject,codegen, andpropertiesservices and ships anindex.tsthat implements all the required service interfaces.
my-plugin/
├── .cfsplugin # Required: Declares plugin metadata, services, and output files/templates
├── index.ts # Optional: Overrides default behavior
├── files/ # Optional: Static files (must be listed)
├── templates/ # Optional: Eta templates (must be listed)
└── services/ # Optional: helper classes for your `index.ts`
For a full step-by-step guide to creating a plugin, see DEVELOPMENT.md