4.18.4. Project file contents

The project file is generated from the specified configuration options and describes the options used for each platform and the files that are required to build the model. File and directory names can be either absolute or relative to the project or repository file. You can use environment variables in filenames.

Caution

Files and directories are processed in the order they are encountered in the project file. See File processing order for details.

An individual file can have both file and directory actions associated with it. See Directories in path statements.

Japanese or Korean characters must not be used in project filename paths, as they can lead to failure to find the specified libraries.

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

Host platform

Specifies the operating system as either:

  • "Linux"

  • "Win32" for a release version of the build

  • "Win32D" for a debug version of the build.

Compiler

Specifies the compiler to use as either:

  • "VC2005" for Microsoft VC++ 2005 SP1

  • "VC2008" for Microsoft VC++ 2008 SP1

  • "gcc" for gcc version found in search path (Linux)

  • "gcc-3.4" for gcc version 3.4.3 (Linux)

  • "gcc-4.1" for gcc version 4.1.2 (Linux)

Additional compiler options might be added in future product versions.

Note

For Linux, the chosen compiler version only effects the files identified by the project file and repositories as described in File/Path Properties dialog. It does not select the gcc version used to build the model. The Simulator Generator always uses the gcc found in the search path instead. To enable the Simulator Generator to automatically select the libraries that match the current gcc compiler, use the compiler option gcc.

Note

For Microsoft VC++2005 and VC++2008, you must have Service Pack 1 (SP1) installed.

Action

Specifies the action to take for the specified file or directory as one or more of:

  • "lisa" to process the file as a LISA file. This action cannot be applied to directories.

  • "compile" to process the file as a C++ file

    If a directory is specified, all *.c, *.cpp, and *.cxx files in the directory are compiled.

  • "ignore" to exclude the file or directory from the build and deploy process, such as a disabled file or project notes.

  • "link" to link the file with existing files.

    If a directory is specified, on Windows all *.lib and *.obj files in the directory are added to the linker input. On Linux, all *.a and *.o files are added.

  • "deploy" to produce a deployable file.

    If a directory is specified, the entire directory and its subdirectories are recursively copied to the destination.

    Note

    "deploy" is the only action that acts recursively on subdirectories.

  • "incpath" to include the directory in the list of include search paths specified by the -I option for the compiler. This is the default action for a directory.

  • "libpath" to include the directory in the list of library search paths specified by the -L option for the compiler.

    Note

    "libpath" is the default action for directories.

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

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

path = my_file.lib, platform="WIN32"|"Win32D", compiler="VC2008", action="link"|"deploy";

The compiler options cannot be ORed together, but they can be omitted to indicate that more than one compiler is permitted:

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

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

path = ../lib/release_2005/my_lib.lib, platform = "win32", compiler="VC2005";
path = ../lib/my_lib.lib, platform = "win32", compiler="VC2008";
path = ../src/my_windows_code.cpp, platform = "win32"; // both compilers can be used

Directories in path statements

Project files can contain directories in the path statement. Directories are differentiated from normal files by including the trailing / character. Platform and compiler filters might apply.

If an action is specified for a file that indicates an action associated with a directory, the directory path is formed by removing the filename from the full path.

The path specification:

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

causes MyFile.lisa to be used as the LISA source and the parent directory for MyFile.lisa to be added to both the include and library search paths.

If, for example, MyFile.lisa is in the directory C:/ARM/MyProjects/Project_1/, that directory path is added to the include and library search paths.

Example project file

Example 4.1 lists a typical project file and shows how the different configuration sections are used.

Example 4.1. Typical project file

sgproject "VP_DualCore.sgproj"{
TOP_LEVEL_COMPONENT = "DualCoreSystem";ACTIVE_CONFIG_LINUX  = "Linux-Release-GCC-3.4";ACTIVE_CONFIG_WINDOWS  = "Win32-Release-VC2005";config "Linux-Debug-GCC-3.4"{	ADDITIONAL_COMPILER_SETTINGS = "-march=pentiumpro -mtune=pentium4 -g -Wall";	ADDITIONAL_LINKER_SETTINGS = "-L $(PVLIB_HOME)/lib/Linux_GCC-3.4 -lpthread";	BUILD_DIR = "./Linux-Debug-GCC-3.4";	COMPILER = "gcc-3.4";	CONFIG_DESCRIPTION = "Default Linux configuration for gcc 3.4 with debug info support";	CONFIG_NAME = "Linux-Debug-GCC-3.4";	ENABLE_DEBUG_SUPPORT = "1";	PLATFORM = "Linux";	SIMGEN_COMMAND_LINE = "--num-comps-file 10";}config "Linux-Release-GCC-3.4"{	ADDITIONAL_COMPILER_SETTINGS = "-march=pentiumpro -mtune=pentium4 -O3 -fomit-frame-pointer -Wall";	ADDITIONAL_LINKER_SETTINGS = "-L $(PVLIB_HOME)/lib/Linux_GCC-3.4 -lpthread";		BUILD_DIR = "./Linux-Release-GCC-3.4";	COMPILER = "gcc-3.4";	CONFIG_DESCRIPTION = "Default Linux configuration for gcc 3.4, optimized for speed";	CONFIG_NAME = "Linux-Release-GCC-3.4";	PLATFORM = "Linux";	PREPROCESSOR_DEFINES = "NDEBUG";	SIMGEN_COMMAND_LINE = "--num-comps-file 50";}config "Linux-Debug-GCC-4.1"{	ADDITIONAL_COMPILER_SETTINGS = "-march=pentiumpro -mtune=pentium4 -g -Wall";	ADDITIONAL_LINKER_SETTINGS = "-L $(PVLIB_HOME)/lib/Linux_GCC-4.1 -lpthread";	BUILD_DIR = "./Linux-Debug-GCC-4.1";	COMPILER = "gcc-4.1";	CONFIG_DESCRIPTION = "Default Linux configuration for gcc 4.1 with debug info support";	CONFIG_NAME = "Linux-Debug-GCC-4.1";	ENABLE_DEBUG_SUPPORT = "1";	PLATFORM = "Linux";	SIMGEN_COMMAND_LINE = "--num-comps-file 10";}config "Linux-Release-GCC-4.1"{	ADDITIONAL_COMPILER_SETTINGS = "-march=pentiumpro -mtune=pentium4 -O3 -fomit-frame-pointer -Wall";	ADDITIONAL_LINKER_SETTINGS = "-L $(PVLIB_HOME)/lib/Linux_GCC-4.1 -lpthread";	BUILD_DIR = "./Linux-Release-GCC-4.1";	COMPILER = "gcc-4.1";	CONFIG_DESCRIPTION = "Default Linux configuration for gcc 4.1, optimized for speed";	CONFIG_NAME = "Linux-Release-GCC-4.1";	PLATFORM = "Linux";	PREPROCESSOR_DEFINES = "NDEBUG";	SIMGEN_COMMAND_LINE = "--num-comps-file 50";}config "Win32-Debug-VC2005"{	ADDITIONAL_COMPILER_SETTINGS = "/Od /RTCsu /Zi";	ADDITIONAL_LINKER_SETTINGS = "/DEBUG";	BUILD_DIR = "./Win32-Debug-VC2005";	COMPILER = "VC2005";	CONFIG_DESCRIPTION = "Win32 Debug. Linked to DEBUG runtime library";	CONFIG_NAME = "Win32-Debug-VC2005";	ENABLE_DEBUG_SUPPORT = "1";	PLATFORM = "Win32D";	PREPROCESSOR_DEFINES = "_WINDOWS";	SIMGEN_COMMAND_LINE = "--num-comps-file 10";}config "Win32-Debug-VC2008"{	ADDITIONAL_COMPILER_SETTINGS = "/Od /RTCsu /Zi";	ADDITIONAL_LINKER_SETTINGS = "/DEBUG";	BUILD_DIR = "./Win32-Debug-VC2008";	COMPILER = "VC2008";	CONFIG_DESCRIPTION = "Win32 Debug. Linked to DEBUG runtime library";	CONFIG_NAME = "Win32-Debug-VC2008";	ENABLE_DEBUG_SUPPORT = "1";	PLATFORM = "Win32D";	PREPROCESSOR_DEFINES = "_WINDOWS";	SIMGEN_COMMAND_LINE = "--num-comps-file 10";}config "Win32-Release-VC2005"{	ADDITIONAL_COMPILER_SETTINGS = "/O2 /Ob1";	BUILD_DIR = "./Win32-Release-VC2005";	COMPILER = "VC2005";	CONFIG_DESCRIPTION = "Win32 Release. Linked to RELEASE runtime library";	CONFIG_NAME = "Win32-Release-VC2005";	PLATFORM = "Win32";	PREPROCESSOR_DEFINES = "_WINDOWS;NDEBUG";	SIMGEN_COMMAND_LINE = "--num-comps-file 50";}config "Win32-Release-VC2008"{	ADDITIONAL_COMPILER_SETTINGS = "/O2 /Ob1";	BUILD_DIR = "./Win32-Release-VC2008";	COMPILER = "VC2008";	CONFIG_DESCRIPTION = "Win32 Release. Linked to RELEASE runtime library";	CONFIG_NAME = "Win32-Release-VC2008";	PLATFORM = "Win32";	PREPROCESSOR_DEFINES = "_WINDOWS;NDEBUG";	SIMGEN_COMMAND_LINE = "--num-comps-file 50";}files{	path = "../LISA/DCVisualisation.lisa";	path = "../LISA/DualCoreSystem.lisa";	path = "$(PVLIB_HOME)/etc/sglib.sgrepo";	path = "../../Common/LISA/common.sgrepo";}}

Copyright © 2007-2010 ARM Limited. All rights reserved.ARM DUI 0370K
Non-ConfidentialID110210