Highlights from
Embedded Coder Support Package for Green Hills MULTI IDE (R2012b)

image thumbnail

Embedded Coder Support Package for Green Hills MULTI IDE (R2012b)

by

 

Embedded Coder integration for creating models that run directly in Green Hills MULTI IDE

getGHSCommonTC()
function toolChainConfiguration = getGHSCommonTC()
%GETGHSCOMMONTC Defines the common portions for GHS tool chain configurations

%   Copyright 2009-2010 The MathWorks, Inc.
%   $Revision: 1.1.6.1 $ $Date: 2012/04/02 21:43:19 $

toolChainConfiguration = [];

% Requirements
toolChainConfiguration.Decorator = 'linkfoundation.xmakefile.decorator.ghsDecorator';
% The PrivateData field is used by the decorator to verify that the
% configuration in use is operational.  It expects the following structure:
% PrivateData.RequiredDirectory = function_handle
% Where the field RequiredDirectory is one of the known directories and its
% value is a function handle that returns a Location object containing the
% path to the required directory
toolChainConfiguration.PrivateData.(linkfoundation.xmakefile.XMakefilePreferences.GHSMULTIInstallDir) = ...
    @linkfoundation.xmakefile.XMakefilePreferences.getGHSMULTIInstallLocation;
toolChainConfiguration.PrivateData.RequiredToolDirectories = {...
    linkfoundation.xmakefile.XMakefilePreferences.GHSMULTIInstallDir};
location = toolChainConfiguration.PrivateData.(linkfoundation.xmakefile.XMakefilePreferences.GHSMULTIInstallDir)();
toolChainConfiguration.InstallPath = location.Path;
% Make
toolChainConfiguration.MakePath = fullfile(matlabroot,'bin',linkfoundation.xmakefile.getArchitecture(),'gmake'); %#ok
toolChainConfiguration.MakeFlags = '-f "[|||MW_XMK_GENERATED_FILE_NAME[R]|||]" [|||MW_XMK_ACTIVE_BUILD_ACTION_REF|||]';
toolChainConfiguration.MakeInclude = '';
% Compiler
toolChainConfiguration.CompilerFlags = '-c';
toolChainConfiguration.SourceExtensions = '.c';
toolChainConfiguration.HeaderExtensions = '.h';
toolChainConfiguration.ObjectExtension = '.o';
% Linker
toolChainConfiguration.LibraryExtensions = '.lib,.a,.ld,.so';
toolChainConfiguration.TargetExtension = '';
toolChainConfiguration.LinkerFlags = '-o [|||MW_XMK_GENERATED_TARGET_REF|||]';
% Archiver
toolChainConfiguration.ArchiverFlags = '-archive -o [|||MW_XMK_GENERATED_TARGET_REF|||]';
toolChainConfiguration.ArchiveExtension = '.a';
% Prebuild
toolChainConfiguration.PrebuildEnable = false;
toolChainConfiguration.PrebuildToolPath = '';
toolChainConfiguration.PrebuildFlags = '';
% Postbuild
toolChainConfiguration.PostbuildEnable = false;
toolChainConfiguration.PostbuildToolPath = '';
toolChainConfiguration.PostbuildFlags = '';
% Execute
toolChainConfiguration.ExecuteDefault = false;
toolChainConfiguration.ExecuteToolPath = 'echo';
toolChainConfiguration.ExecuteFlags = 'To customize the execute command, clone this configuration';
% Other
toolChainConfiguration.DerivedPath = '[|||MW_XMK_SOURCE_PATH_REF|||]';
toolChainConfiguration.OutputPath = '[|||MW_XMK_SOURCE_PATH_REF|||]';

end

Contact us