You copied the Doc URL to your clipboard.

Loading a plugin

Loading a plugin enables the SoC Designer tool to find and use your plugin libraries. You can load a plugin by pointing the SoC Designer tool to the plugin libraries in any of the following ways:

Default file location

Place the plugin libraries in a directory named Release (for release mode) or Debug (for debug mode), that are subdirectories of the default plugin directory for the SoC Designer installation. The default plugin directory for SoC Designer is the etc/plugins directory, located in the SoC Designer installation root directory. MAXSIM_HOME is the environment variable that specifies the SoC Designer installation root directory, so the default parent directory for plugin Release and Debug directories is ${MAXSIM_HOME}/etc/plugins.

Plugins are loaded by this method when the SoC Designer tool initializes.


For SoC Designer Canvas, if all of the plugins are loaded using MAXSIM_HOME/etc/plugins, the CASI, CAPI, and CADI interfaces of the opened system is not available to those plugins.

If access to these interfaces is required, load the plugins using the MAXSIM_PLUGINS variable.

Plugin variable location

Place the plugin libraries in a directory named Release (for release mode) or Debug (for debug mode), under a parent directory you specify by the path you set in the environment variable MAXSIM_PLUGINS. Plugins that load by being located in a subdirectory of ${MAXSIM_PLUGINS} load when the SoC Designer system initializes.


The option Include plugins from $MAXSIM_PLUGINS environment variable must be checked in the SoC Designer Preferences > Component Library menu for these plugins to be recognized.

Locate by configuration file entry

Edit a configuration file to locate your plugin libraries. For information on editing configuration files, see the section on file configuration in the SoC Designer User Guide (100996).

The following code snippet loads release and debug libraries for a plugin named gui_plugin_example.

plugin "gui_plugin_example"
    path       = "./Release/gui_plugin_example.dll";
    debug_path = "./Debug/gui_plugin_example.dll";
    init_last = false; // This is the default

init_last is set to indicate whether this plugin must be loaded after all other plugins in the configuration file. Set init_last to true to load the plugin last.

Plugins loaded in configuration files load dynamically. In designer mode, this means that they are loaded when the component list is created or refreshed.

For SoC Designer Simulator, plugins are:

  • Dynamically loaded when a system file is opened.
  • Unloaded when the system closes.


Plugins loaded dynamically cannot add Toolbar menu items.

Loading a plugin in batch mode

The following considerations apply if a plugin is loaded in batch mode:

  • Plugins can be loaded in scripted or non-scripted batch mode.
  • Scripts cannot access GUI functions, therefore only the non-GUI functions of plugins are available to the SoC Designer system in batch mode.

For more information on batch mode processing with the SoC Designer tools, see the SoC Designer User Guide (100996).

For any of the chosen methods used to load plugins into the SoC Designer tool, loading completes with the following actions:

  1. Open the specified libraries.
  2. Execute the MxPluginInit() function in each library.

For more detail on how plugins are initialized, see 3.3 The MxPluginInit function.

Was this page helpful? Yes No