Table Of Contents

Previous topic

Soclib tools documentation

Next topic

Configuration files

This Page

The soclib-cc command

The main entry point in soclib is the soclib-cc command.

soclib-cc can be used to serve different pusposes. Among them:

  • build a platform, a component.
  • get cflags needed to access compilation headers for software-centric view of the modules. This is used to build an embedded software.
  • gather information about a module’s Metadata.
  • gather information about the current soclib installation and configuration.

Built-in quick help


Like other programs, soclib-cc embeds an in-line help option, to quickly list all available options.

Configuration information


Retrieves the current absolute installation path of the SoCLib library:

$ soclib-cc --getpath

Dumps all the configuration, in a pretty-printed (yet verbose) manner. This is mostly usedful to understand what soclib-cc actually understand from the user’s configuration file.

Gather information about models

These options access the Module Index.


This lists all the known modules names in the index.

-l, --list-descs=long

This lists all the known modules in the index. Output is the name of the module (the index key), and various properties.


This cleans the metadata cache.


This completes a given module name with what is found in the index, for names starting with COMPLETE_NAME. This can serve as a base for shell-completion mechanisms. Example:

$ soclib-cc --complete-name=caba:vci_mw

Output words to complete start at separator COMPLETE_SEPARATOR. This can help working around readline’s lexing. Example:

$ soclib-cc --complete-name=caba:vci_mw --complete-separator=_
$ soclib-cc --complete-name=caba:vci_mw --complete-separator=

Tampering with module definition

Module index can also be accessed to change the defintion of modules.


Add the specified PATH to the list of directories searched for modules definitions. Paths listed with this option are searched first when looking for a module.


Put the said module in Per-module debug mode.


Use DIR as work directory for EDA tools requiring such a directory (modelsim, etc.).

Platform or module compilation


Select the output file for compilation of the module or component. If compiling a component, output should be an object file name (ends with .o); if a platform, it is limited by the host OS rules (should end with .exe on Windows).


Compiles a platform defined in the PLATFORM file. See Platform description files for more information about this file’s format.

-1 ONE_MODULE, --one-module=ONE_MODULE

Compiles just one module and generates one object file containing the whole module code. Use soclib-cc -a to specify compile-time parameters.


Specifies the compile-time parameter NAME for building of module in soclib-cc -1 mode.


Tells soclib-cc to only compile, and not link. This is only available for module building (soclib-cc -1 mode).


Cleans the build, i.e. deletes the products (object and executable files) that would have been produced by the build. This option must be used together with soclib-cc -1 or soclib-cc -p.


Only available with soclib-cc -p. Outputs the cflags needed to compile embedded software using the specified platform.

Compilation mode

-m MODE, --mode=MODE

Sets the build mode. This can be debug, prof or release. This changes the used compilation/linkage flags. Default is release. Intent is:

Maximal optimization level, no debug symbols.
All debug symbols included, no optimization.
Maximal optimization with profiling (gprof) included.
-t ENV, --type=ENV

Uses the build environment named ENV, defaults to “default”.

Building process pretty-printing

During the build process, soclib-cc can output more or less messages depending on the following parameters:

-v, --verbose

Print currently-built module name, together with various information.

-d, --debug

Print lots of information, even data specific to the core of soclib-cc’s implementation.

-q, --quiet

Try not to emit messages, at all.

-P, --progress-bar

Print a progress-bar of the build of a complete platform or module. This gives user a little visual feedback.


Sometimes, user needs help from other people having more experience with SoCLib. If this process happens through email, having all the information peer needs to understand what happened can be a tedious enumeration. These options try to automate this information gathering process.


Generates a log of the environment, command line, executed processes, errors.


Automatically open a browser to the relevant’s website address where to report bugs.