5.3.17 Project Settings dialog

This section describes the dialog (Project > Project Settings , or Settings toolbar button) that sets the project settings and customizes the generation process.

Project top-level settings

This part of the dialog sets the project build options.

Top level component
  • Enter a name into the Top Level Component edit box.

  • Click Use Current to set the component in the workspace as the top component.

  • Click Select From List to open a dialog and select any component in the system.

Configuration
  • Select an entry from the drop-down list to use an existing configuration.

  • Click Add New to create a new configuration. A dialog prompts for the name and a description. Use Copy values from to select a configuration to copy the settings values from. This can be an existing configuration or a default set of configuration settings.

  • Click Delete to delete the selected configuration from the list.

The values default to those of the active configuration.

Selecting a configuration in this dialog does not set the configuration in the Select Active Project Configuration drop-down box on the main window. System Canvas stores the configuration set in this dialog in the project file, to use if you specify it for a build. You can use this control to specify all of the configurations for a project, to simplify switching active configurations.

Note:

If you build systems on Microsoft Windows workstations, other Microsoft Windows workstations need the matching support libraries to run the systems:
Debug builds
Microsoft Visual Studio.
Release builds
Microsoft Visual Studio redistributable package.

Parameter category panel

This section describes the Parameter category panel, which lists parameters for the selected build, under different views.

Parameters - Category View

This view lists categories and the parameters for the selected category.

Top-level configuration details

Select the top-most category item to configure the project settings.

Table 5-5 Configuration parameters in the Category View

Control name Parameter
Configuration name CONFIG_NAME
Platform/Linkage PLATFORM
Compiler COMPILER
Configuration description CONFIG_DESCRIPTION
Build directory BUILD_DIR
Targets

Select the Targets item to configure the build target parameters.

Table 5-6 Target parameters in the Category View

Control name Parameter
Integrated simulator with deprecated scheduler TARGET_ISIM_DEPRECATED
CADI librarya TARGET_MAXVIEW
SystemC component TARGET_SYSTEMC
SystemC component with auto-bridging TARGET_SYSTEMC_AUTO
SystemC integrated simulatora TARGET_SYSTEMC_ISIM
Debugging

Select the Debugging item in the panel to configure the debug parameters.

Table 5-7 Debugging parameters in the Category View

Control name Parameter
Enable model debugging ENABLE_DEBUG_SUPPORT
Source reference GENERATE_LINEINFO
Verbosity VERBOSITY
Model Debugger MODEL_DEBUGGER_COMMAND_LINE
Model Shell and ISIM MODEL_SHELL_COMMAND_LINE
SystemC executable SYSTEMC_EXE
SystemC arguments SYSTEMC_COMMAND_LINE
Sim Generator

Select the Sim Generator item in the panel to configure the Simulation Generator parameters.

Table 5-8 Simulation Generator parameters in the Category View

Control name Parameter
Simgen options SIMGEN_COMMAND_LINE
Warnings as errors SIMGEN_WARNINGS_AS_ERRORS
Using namespace std ENABLE_NAMESPACE_STD
Make options MAKE_OPTIONS
Compiler

Select the Compiler item in the panel to configure the compiler parameters.

Table 5-9 Compiler parameters in the Category View

Control name Parameter
Pre-Compile Actions PRE_COMPILE_EVENT
Include Directories INCLUDE_DIRS
Preprocessor Defines PREPROCESSOR_DEFINES
Compiler Settings ADDITIONAL_COMPILER_SETTINGS
Enable pre-compiling ENBALE_PRECOMPILE_HEADER
Linker

Select the Linker item in the panel to configure the linker parameters.

Table 5-10 Linker parameters in the Category View tab

Control name Parameter
Pre-Link Actions PRE_LINK_EVENT
Linker Settings ADDITIONAL_LINKER_SETTINGS
Post-Build Actions POST_BUILD_EVENT
Post-Clean Actions POST_CLEAN_EVENT
Disable suppression of symbols DISABLE_SYMBOL_SUPRESSION
Parameters - List View

This view lists the parameters and their values. Reorder them by clicking on a column heading.

Parameters - Tree View

This view displays parameters in a tree structure, with expandable categories.

Parameters - setting the release options

This section describes how to set the build options for a project configuration using the Project Settings dialog.

Procedure

  1. Click the Category View tab.
  2. Select the Windows-Release entry and choose the operating system/link options from the Platform/Linkage drop-down menu.
    Option Description
    Linux64 64-bit model for Linux.
    Win64 64-bit model using the release run-time library for Microsoft Windows.
    Win64D 64-bit model using the debug run-time library for Microsoft Windows.
  3. Select the compiler from the Compiler drop-down menu.
  4. Enter a path into the Build directory field to select the directory to perform the builds in.
    This directory contains the source code and the build library for the system model. If the path is not absolute, System Canvas treats it as being relative to the directory that contains the project file.
  5. Enter text into the Configuration description box that describes the configuration.
Parameters - overloading the main() function in the target

This section describes how to replace the default main() of an ISIM with a user-supplied main().

CAUTION:

If you use the option USER_DEFINED_ISIM_MAIN and a user-supplied main(), you cannot build a CADI shared library from the project.

If a CADI shared library is required:

  • Add a new configuration for isim_system that defines USER_DEFINED_MAIN.
  • Add an #ifdef USER_DEFINED_MAIN test block around the main() in the user source file.

Procedure

  1. Define the USER_DEFINED_ISIM_MAIN preprocessor option for the compiler in the Project Settings dialog.
    Figure 5-3 Specifying user-defined main() option
    Specifying user-defined main() option


  2. Supply a C++ file or a library with a user-defined main() function.

    A fragment of the standard IsimMain.cpp file:

    #ifdef USER_DEFINED_ISIM_MAIN    // opposite logic to standard IsimMain.cpp
    #include "SimGenTplMacros.h"
    // function that performs command line parsing
    // CADI system initialization and run
    extern int LoadInitAndRunCADIModel(int argc, char *argv[],
                                       const char* topComponent,
                                       const char* pvLibVersion);
    int main(int argc, char *argv[])
    {
        return LoadInitAndRunCADIModel(argc, argv, SIMGEN_TOP_COMPONENT,
                                                   PVLIB_VERSION_STRING);
    }
    #endif // #ifdef  USER_DEFINED_ISIM_MAIN

    You might define the USER_DEFINED_ISIM_MAIN preprocessor option, for example, so that you can implement processing of your own command-line options but must, after filtering out all user-defined switches, pass the remaining options to the Model Shell entry function LoadInitAndRunCADIModel().

  3. Add the new source file containing the custom main() to the project.

Project parameter IDs

The parameters that configure a project, with IDs, names, defaults, and descriptions.

Table 5-11 Full list of parameters shown in List View

Parameter ID Parameter name Default Description
ADDITIONAL_COMPILER_SETTINGS Compiler settings "" Compiler settings. If your C++ source code uses C++11 syntax, specify -std=c++11 in this parameter. For Microsoft Windows, consult the Visual Studio documentation.
ADDITIONAL_LINKER_SETTINGS Linker settings "" Linker settings. For Microsoft Windows, consult the Visual Studio documentation.
BUILD_DIR Build directory ""

Build directory. If this path is not absolute, it is relative to the position of the project file.

For Microsoft Windows, .\Windows-Debug or .\Windows-Release.

COMPILER Compiler -
VC2013
Microsoft Visual Studio 2013.
VC2015
Microsoft Visual Studio 2015.
gcc
The first gcc version in the Linux search path.
gcc-4.8
GCC 4.8.3 or higher.
gcc-4.9
GCC 4.9.2.
gcc-5.4
GCC 5.4.
CONFIG_DESCRIPTION Configuration description "" Description of the configuration, CONFIG_NAME.
CONFIG_NAME Configuration name "" Name of the configuration.
ENABLE_DEBUG_SUPPORT Enable model debugging "0" Use implementation defined debug support.
ENBALE_NAMESPACE_STD Enable namespace std "1"

Use namespace std:

1 (true)
Generate using namespace std and place in the code.
0 (false)
Specify the namespace. This setting might reduce compilation time.
ENBALE_PRECOMPILE_HEADER Enable precompiling "0" Precompile headers if true/1.
GENERATE_LINEINFO Source reference "LISA Code (incl headers)"

Control line redirection in the generated model source code:

"LISA Code"
Source code.
"LISA Code (incl. headers)"
Source and header.
"Generated Code"
No line redirection at all.
INCLUDE_DIRS Include directories "" Include directories. Separate multiple entries with semicolons.
MODEL_DEBUGGER_COMMAND_LINE Model Debugger "" Options to pass on the command line.
MODEL_SHELL_COMMAND_LINE Model Shell "" Options to pass on the command line.
PLATFORM Platform/linkage -
"Linux64"
64-bit Linux.
"Win64"
64-bit Microsoft Windows release.
"Win64D"
64-bit Microsoft Windows debug.
POST_BUILD_EVENT Postbuild actions "" Commands to execute after building the model. Separate multiple entries with semicolons.
PRE_COMPILE_EVENT Precompile actions "" Commands to execute before starting compilation. Applies to Microsoft Windows only. Separate multiple entries with semicolons.
PREPROCESSOR_DEFINES Preprocessor defines "" Preprocessor defines. Separate multiple entries with semicolons.
PRE_LINK_EVENT Prelink actions "" Commands to execute before starting linking. Applies to Microsoft Windows only. Separate multiple entries with semicolons.
SIMGEN_COMMAND_LINE SimGen options "" Options to pass on the command line.
SIMGEN_WARNINGS_AS_ERRORS Warnings as errors "1"

If 1 (true), treat LISA parsing and compiler warnings as errors.

SYSTEMC_COMMAND_LINE SystemC arguments "" Command-line arguments for System C executable.
SYSTEMC_EXE SystemC executable "" Name of final SystemC executable. Call the file with ‘Run SystemC executable’.
TARGET_ISIM_DEPRECATED Integrated simulator with deprecated scheduler "0" If 1 (true), build an executable with a statically linked CADI system and Model Shell, using the deprecated scheduler.
TARGET_MAXVIEWa CADI library "1" If 1 (true), build a CADI system dynamic library for running from Model Debugger.
TARGET_SYSTEMC SystemC component "0" If 1 (true), build a SystemC component library.
TARGET_SYSTEMC_AUTO SystemC component with auto-bridging "0" If 1 (true), build a SystemC component library with auto-bridging.
TARGET_SYSTEMC_ISIMa SystemC integrated simulator "0" If 1 (true), build a SystemC ISIM executable.
VERBOSITY Verbosity "Off" Verbosity level: "Sparse", "On", or "Off".

Project file contents

Project files describe the settings for each platform and the required files to build models.

System Generator generates the project file from the specified configuration options. File and directory names can be either absolute or relative to the project or repository file. You can use environment variables in filenames.

File or directory entries in project files can include filters to specify the following build options:

Host platform
"Linux64"
64-bit Linux.
"Win64"
64-bit Microsoft Windows release.
"Win64D"
64-bit Microsoft Windows debug.
Compiler
"VC2013"
Microsoft Visual Studio 2013.
"VC2015"
Microsoft Visual Studio 2015.
"gcc"
The first gcc version in the Linux search path.
"gcc-4.8"
GCC 4.8.3 or higher.
"gcc-4.9"
GCC 4.9.2
"gcc-5.4"
GCC 5.4

Note:

For Linux, the compiler version only affects the files that the project file and repositories identify. It does not select the gcc found in the search path. To enable the System Generator to automatically select the libraries that match the current gcc compiler, use the compiler option gcc.
Action
"lisa"
Process the file as a LISA file. This action is not applicable to directories.
"compile"
Process the file as a C++ file. If acting on a directory, the compiler compiles all *.c, *.cpp, and *.cxx files in the directory.
"ignore"
Exclude the file or directory from the build and deploy process, such as a disabled file or project notes.
"link"
Link the file with existing files. If acting on a directory on Microsoft Windows, System Generator adds all *.lib and *.obj files in the directory to the linker input. On Linux, it adds all *.a and *.o files.
"deploy"
Produce a deployable file. If acting on a directory, System Generator copies the entire directory and its subdirectories to the destination. This action is the only action that acts recursively on subdirectories.
"incpath"
Include the directory in the list of include search paths that the -I option for the compiler specifies. This action is the default action for directories.
"libpath"
Include the directory in the list of library search paths that the -L option for the compiler specifies. This action is the default action for directories.

The build options for the file or directory entries are not sensitive to case.

For example, the my_file.lib file can specify host, compiler, and action as:

path = my_file.lib, platform="WIN64"|"Win64D", compiler="VC2013", action="link"|"deploy";

Do not OR the compiler options together. Instead, omit them to permit more than one compiler:

path = ../src/my_windows_code.cpp, platform = "win64";

File entries in the project file can have a compiler filter in addition to the platform and action filters:

path = ../lib/release_2013/my_lib.lib, platform = "win64", compiler="VC2013";
path = ../lib/my_lib.lib, platform = "win64", compiler="VC2013";
path = ../src/my_windows_code.cpp, platform = "win64"; // Not specifying the compiler allows 
                                                       // more than one.
Directories in path statements

Differentiate directories from files with a trailing / character.

Project files can contain directories in the path statement. Platform and compiler filters might apply.

If you apply directory actions to files, System Generator applies them to the directories that contain the files, forming the directory path by removing the filename from the full path. This path specification:

path = MyFile.lisa, actions="lisa|incpath|libpath";

makes System Generator treat MyFile.lisa as the LISA source and add the parent directory of MyFile.lisa to the include and library search paths. If, for example, MyFile.lisa is in the directory C:/ARM/MyProjects/Project_1/, System Generator adds that directory path to the include and library search paths.

Example project file

A typical project file that shows the use of different configuration sections.

Typical project file
sgproject "VP_PhoneSkin.sgproj"
{
    TOP_LEVEL_COMPONENT = "PhoneSkin";
    ACTIVE_CONFIG_LINUX  = "Linux64-Release-GCC-4.8";
    ACTIVE_CONFIG_WINDOWS  = "Win64-Release-VC2013";
    config "Linux64-Debug-GCC-4.8"
    {
        ADDITIONAL_COMPILER_SETTINGS = "-march=core2 -ggdb3 -Wall -std=c++11";
        ADDITIONAL_LINKER_SETTINGS = "-Wl,--no-undefined";
        BUILD_DIR = "./Linux64-Debug-GCC-4.8";
        COMPILER = "gcc-4.8";
        CONFIG_DESCRIPTION = "Default x86_64 Linux configuration for GCC 4.8 with debug information";
        CONFIG_NAME = "Linux64-Debug-GCC-4.8";
        ENABLE_DEBUG_SUPPORT = "1";
        PLATFORM = "Linux64";
        SIMGEN_COMMAND_LINE = "--num-comps-file 10";
        SIMGEN_WARNINGS_AS_ERRORS = "1";
    }
    config "Linux64-Release-GCC-4.8"
    {
        ADDITIONAL_COMPILER_SETTINGS = "-march=core2 -O3 -Wall -std=c++11";
        ADDITIONAL_LINKER_SETTINGS = "-Wl,--no-undefined";
        BUILD_DIR = "./Linux64-Release-GCC-4.8";
        COMPILER = "gcc-4.8";
        CONFIG_DESCRIPTION = "Default x86_64 Linux configuration for GCC 4.8, optimized for speed";
        CONFIG_NAME = "Linux64-Release-GCC-4.8";
        PLATFORM = "Linux64";
        PREPROCESSOR_DEFINES = "NDEBUG";
        SIMGEN_COMMAND_LINE = "--num-comps-file 50";
        SIMGEN_WARNINGS_AS_ERRORS = "1";
    }
    config "Linux64-Debug-GCC-4.9"
    {
        ADDITIONAL_COMPILER_SETTINGS = "-march=core2 -ggdb3 -Wall -std=c++11";
        ADDITIONAL_LINKER_SETTINGS = "-Wl,--no-undefined";
        BUILD_DIR = "./Linux64-Debug-GCC-4.9";
        COMPILER = "gcc-4.9";
        CONFIG_DESCRIPTION = "Default x86_64 Linux configuration for GCC 4.9 with debug information";
        CONFIG_NAME = "Linux64-Debug-GCC-4.9";
        ENABLE_DEBUG_SUPPORT = "1";
        PLATFORM = "Linux64";
        SIMGEN_COMMAND_LINE = "--num-comps-file 10";
        SIMGEN_WARNINGS_AS_ERRORS = "1";
    }
    config "Linux64-Release-GCC-4.9"
    {
        ADDITIONAL_COMPILER_SETTINGS = "-march=core2 -O3 -Wall -std=c++11";
        ADDITIONAL_LINKER_SETTINGS = "-Wl,--no-undefined";
        BUILD_DIR = "./Linux64-Release-GCC-4.9";
        COMPILER = "gcc-4.9";
        CONFIG_DESCRIPTION = "Default x86_64 Linux configuration for GCC 4.9, optimized for speed";
        CONFIG_NAME = "Linux64-Release-GCC-4.9";
        PLATFORM = "Linux64";
        PREPROCESSOR_DEFINES = "NDEBUG";
        SIMGEN_COMMAND_LINE = "--num-comps-file 50";
        SIMGEN_WARNINGS_AS_ERRORS = "1";
    }
    config "Linux64-Debug-GCC-5.4"
    {
        ADDITIONAL_COMPILER_SETTINGS = "-march=core2 -ggdb3 -Wall -std=c++11";
        ADDITIONAL_LINKER_SETTINGS = "-Wl,--no-undefined";
        BUILD_DIR = "./Linux64-Debug-GCC-5.4";
        COMPILER = "gcc-5.4";
        CONFIG_DESCRIPTION = "Default x86_64 Linux configuration for GCC 5.4 with debug information";
        CONFIG_NAME = "Linux64-Debug-GCC-5.4";
        ENABLE_DEBUG_SUPPORT = "1";
        PLATFORM = "Linux64";
        SIMGEN_COMMAND_LINE = "--num-comps-file 10";
        SIMGEN_WARNINGS_AS_ERRORS = "1";
    }
    config "Linux64-Release-GCC-5.4"
    {
        ADDITIONAL_COMPILER_SETTINGS = "-march=core2 -O3 -Wall -std=c++11";
        ADDITIONAL_LINKER_SETTINGS = "-Wl,--no-undefined";
        BUILD_DIR = "./Linux64-Release-GCC-5.4";
        COMPILER = "gcc-5.4";
        CONFIG_DESCRIPTION = "Default x86_64 Linux configuration for GCC 5.4, optimized for speed";
        CONFIG_NAME = "Linux64-Release-GCC-5.4";
        PLATFORM = "Linux64";
        PREPROCESSOR_DEFINES = "NDEBUG";
        SIMGEN_COMMAND_LINE = "--num-comps-file 50";
        SIMGEN_WARNINGS_AS_ERRORS = "1";
    }
    config "Win64-Debug-VC2013"
    {
        ADDITIONAL_COMPILER_SETTINGS = "/Od /RTCsu /Zi";
        ADDITIONAL_LINKER_SETTINGS = "/DEBUG";
        BUILD_DIR = "./Win64-Debug-VC2013";
        COMPILER = "VC2013";
        CONFIG_DESCRIPTION = "Default x86_64 Windows configuration for Visual Studio 2013 with debug information";
        CONFIG_NAME = "Win64-Debug-VC2013";
        ENABLE_DEBUG_SUPPORT = "1";
        PLATFORM = "Win64D";
        SIMGEN_COMMAND_LINE = "--num-comps-file 10";
        SIMGEN_WARNINGS_AS_ERRORS = "1";
    }
    config "Win64-Release-VC2013"
    {
        ADDITIONAL_COMPILER_SETTINGS = "/O2";
        BUILD_DIR = "./Win64-Release-VC2013";
        COMPILER = "VC2013";
        CONFIG_DESCRIPTION = "Default x86_64 Windows configuration for Visual Studio 2013, optimized for speed";
        CONFIG_NAME = "Win64-Release-VC2013";
        PLATFORM = "Win64";
        SIMGEN_COMMAND_LINE = "--num-comps-file 50";
        SIMGEN_WARNINGS_AS_ERRORS = "1";
    }
    config "Win64-Debug-VC2015"
    {
        ADDITIONAL_COMPILER_SETTINGS = "/Od /RTCsu /Zi";
        ADDITIONAL_LINKER_SETTINGS = "/DEBUG";
        BUILD_DIR = "./Win64-Debug-VC2015";
        COMPILER = "VC2015";
        CONFIG_DESCRIPTION = "Default x86_64 Windows configuration for Visual Studio 2015 with debug information";
        CONFIG_NAME = "Win64-Debug-VC2015";
        ENABLE_DEBUG_SUPPORT = "1";
        PLATFORM = "Win64D";
        SIMGEN_COMMAND_LINE = "--num-comps-file 10";
        SIMGEN_WARNINGS_AS_ERRORS = "1";
    }
    config "Win64-Release-VC2015"
    {
        ADDITIONAL_COMPILER_SETTINGS = "/O2";
        BUILD_DIR = "./Win64-Release-VC2015";
        COMPILER = "VC2015";
        CONFIG_DESCRIPTION = "Default x86_64 Windows configuration for Visual Studio 2015, optimized for speed";
        CONFIG_NAME = "Win64-Release-VC2015";
        PLATFORM = "Win64";
        SIMGEN_COMMAND_LINE = "--num-comps-file 50";
        SIMGEN_WARNINGS_AS_ERRORS = "1";
        }     component "PhoneSkin"
    {
        path = "../LISA/PhoneSkin.lisa";
    }
    component "PhoneVisualisation"
    {
        path = "../LISA/PhoneVisualisation.lisa";
    }
    files
    {
        path = "../LISA/phone-background.bmp";
        path = "../LISA/phone-buttons.bmp";
        path = "$(PVLIB_HOME)/etc/sglib.sgrepo";
    }
}
a  If you select both TARGET_MAXVIEW and TARGET_SYSTEMC_ISIM, SimGen only generates an ISIM executable, not a CADI library.
Non-ConfidentialPDF file icon PDF versionARM 100965_1101_00_en
Copyright © 2014–2017 ARM Limited or its affiliates. All rights reserved.