Skip to content

The CFS Plugin API allows users to customize the workspace, project and code generation features in CodeFusion Studio.

License

Notifications You must be signed in to change notification settings

analogdevicesinc/cfs-plugins

Repository files navigation

CodeFusion Studio Plugins

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:

  • 📦 The CFS Plugin API: ./api
  • 🧩 A library of default and reference plugins: ./plugins

To learn how to create your own plugin, see:
📄 DEVELOPMENT.md


🔌 Plugin Types

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.


🧠 How Plugins Work

  1. 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.
  2. The index.ts file exports a class that extends CfsPlugin. This class defines the plugin's behavior by implementing getGenerator() and optionally getService().
  3. Files are either copied as-is from the files/ directory or rendered using a templating engine from the templates/ directory.
  4. Reusable logic can be placed in a services/ directory and made available via the getService() method.

🧩 Example Plugins

You can also reuse helpers in the common/ directory, including:

  • Eta-based generators (CfsEtaWorkspaceGenerator)
  • File handling utilities
  • Reusable service classes

📂 Plugin Structure Overview

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

About

The CFS Plugin API allows users to customize the workspace, project and code generation features in CodeFusion Studio.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published