5.1 How does Arm® licensed managed software tools find a license file?

Arm® licensed managed software tools find the license file using the Arm-specific environment variable ARMLMD_LICENSE_FILE and the generic FlexNet environment variable LM_LICENSE_FILE.

When the Arm software tools search for a license, the contents of ARMLMD_LICENSE_FILE variable are searched before the contents of LM_LICENSE_FILE variable. The locations are searched until a valid license is found.

You can set the ARMLMD_LICENSE_FILE environment variable so that it contains one or more:

  • File names.
  • Directory names.

    Note:

    • When specifying directory paths, you must not include the final / or \ character.
    • All files with a .lic extension present in the directory are used.
  • License server addresses in the port@server format.

Separate the entries by using ; for Windows-based systems or : for UNIX-based systems.

Note:

Using long license search paths can adversely affect performance, even if only the first entry is used.

Arm® license search algorithm

The following example shows an overview of the algorithm that is used by Arm licensed managed software tools when searching for a license file:

Note:

When running tools on Windows from the DS-5 suite or the DS-5 Command Prompt, %APPDATA%\ARM\DS-5\licenses is prepended to the ARMLMD_LICENSE_FILE environment variable.
Search algorithm
license_search_path = []

def ExtractFromEnvVar(variable_name)
{
    if (EnvVarIsSet(variable_name))
    {
        license_search_path.append(EnvVarRead(variable_name))
    }
}

def ExtractFromSystem(variable_name)
{
    if (Platform() == "Windows")
    {
        registry_key = "HKEY_CURRENT_USER\Software\Flexlm License Manager"

        if (variable_name in Registry(registry_key))
        {
            license_search_path.append(Registry(registry_key)[variable_name])
        }
    }
    else
    {
        if (variable_name in File("~/.flexlmrc"))
        {
            // This file is a simple key=value format, separated by newlines.
            // The first variable_name key will be used, all others are ignored.
            // Case is ignored when matching variable_name. Quoting of value is
            // not supported. Spaces in value are permitted and do not need to be
            // escaped.
            license_search_path.append(File("~/.flexlmrc")[variable_name])
        }
    }
}



ExtractFromEnvVar("ARMLMD_LICENSE_FILE")
ExtractFromSystem("ARMLMD_LICENSE_FILE")

ExtractFromEnvVar("LM_LICENSE_FILE")
ExtractFromSystem("LM_LICENSE_FILE")


if (Platform() == "Windows")
{
    license_search_path.append("C:\Program Files\ARM\licenses\license.dat")
}
else
{
    license_search_path.append("/opt/arm/licenses/license.dat")
}

// FindFeature searches the given path in order (left to right)
feature = FindFeature(license_search_path)
if (feature not found)
{
    print error
}
else
{
    return feature
}
Non-ConfidentialPDF file icon PDF version100952_0529_00_en
Copyright © 2011–2018 Arm Limited or its affiliates. All rights reserved.