Why do I get a message "Options have been disabled due to restricted license" even though I have a valid license key?

The message “Options have been disabled” means that the optimization options supported by PRO/STD mode compilers are set under the project properties, but these are being disabled because there isn’t a valid PRO/STD mode license. This message occurs with the XC16 and XC32 compilers if the Optimization options -O2,-O3 or -Os are set under the build options, but there is no valid PRO/STD mode license.

Here are some of the reasons why this message is triggered (these reasons are applicable to all the XC Compilers, unless otherwise stated):

  • (XC8 only) Operating mode is not set to PRO or STD under build options
  • HPA does not cover the compiler version being used for the build
  • License files are missing in the license directory
  • License directory also contains older license files
  • xclm.conf does not have the correct path of the license directory
  • Restricted access to the license directory / license files or xclm.conf
  • The MPLAB® XC compiler may be configured to use a shared network license

Here are the solutions to this warning:

(XC8) Operating mode is not set to PRO or STD under build options.

If the operating mode of the compiler is not set to PRO or STD, this warning will be triggered. Check the operating mode under project properties.
If it is set to Free, change it to PRO or STD. Under MPLAB X IDE go to: File > Project Properties > XC8 Compiler > Option categories = Optimizations > Operating Mode = PRO or STD

HPA does not cover the compiler version being used for the build.

HPA (High Priority Access) is valid for 1 year from the date of first activation. Compilers released during this 1-year duration can be used in PRO or STD mode. Newer compiler versions released outside the 1-year duration of your HPA will build in Free mode.

Renew the compiler HPA to use the latest compiler in PRO or STD mode.

License files are missing in the license directory.

If there are no license files in the license directory, the compiler will build in Free mode.

Check to see if the license is in the license directory.
Path of license directory:
Windows 10/8/7: %SystemDrive%\ProgramData\Microchip\xclm\license
Mac: /Library/Application\ Support/microchip/xclm/license
Linux: /opt/microchip/xclm/license

If the license files are not under the license directory, and you have not registered your compiler, you can activate and download the license files from the following link:
http://www.microchip.com/rlmmigrationtool/GetXCLicense.aspx
Instructions to activate the license are on the same page.
If you have registered your compiler or purchased the compiler via www.microchipdirect.com, you can log onto your www.microchip.com\mysoftware account to download the license to your computer.

License directory also contains older license files.

Make sure only the latest licenses with a valid HPA are under the license directory for a particular compiler. Delete the older license files.

Path of license directory:
Windows 10/8/7: %SystemDrive%\ProgramData\Microchip\xclm\license
Mac: /Library/Application\ Support/microchip/xclm/license
Linux: /opt/microchip/xclm/license

xclm.conf does not have the correct path of the license directory.

xclm.conf is under the etc folder of the compiler installation directory and holds the path of the license directory. If the license directory path in the xclm.conf is incorrect this warning will be triggered.

If for some reason, the license directory path in xclm.conf is incorrect, reinstall the compiler, and the paths should be updated to point to the license directory.

Restricted access to the license directory / license files or xclm.conf.

Make sure that system user has read and write permission to access the license folder/files and xclm.conf file.

The MPLAB® XC compiler may be configured to use a shared network license

Under the MPLAB X IDE, select your project that is utilizing a MPLAB XC compiler. Under the MPLAB X IDE menus, select Tools > Licenses > Change Licensing Type to configure the MPLAB XC compiler to use the correct licensing type. Use the dialog to select the Workstation radio button for a workstation license, or the Network button for a shared network license. If using a shared network license, ensure the Server Address and Port Information is filled out.

If you still need help, open a ticket at http://www.microchip.com/support.

© 2017 Microchip Technology, Inc.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.