www.gusucode.com > ArmCompilerSupportPackage > AC6_setup.m

    function AC6_setup()
% AC6 Toolchain directory path
toolPath = getpref('ArmCompiler','AC6_Path');

% Transform path with spaces
toolPath = RTW.transformPaths(toolPath, 'pathType','alternate');
% Form compatible path to gmake
if ispc
    toolPath = strrep(toolPath, '\', '/');
end

if isempty(toolPath) || ~isequal(exist(strrep(toolPath,'"',''), 'dir'),7) % must take out double quotes to have exist function work properly. Still need them for command line make file however.
    error('Preference AC6_Path not set or not a valid path. Please set the using the following command and set your <path> equal to the path to your bin directory for Arm Compiler 6:  addpref(''ArmCompiler'',''AC6_Path'',fullfile(''C:\'',''"Program Files"'',''"DS-6 v5.28.0"'',''sw'',''ARMCompiler6.9'',''bin'')) ')
else
    % set env for build script
    setenv('PATH_TO_AC6_BIN_DIR',toolPath);
    disp(['AC6_Path = ', toolPath]);
end
end