We detect you are using an unsupported browser. For the best experience, please visit the site using Chrome, Firefox, Safari, or Edge. X

Overview

Compiler optimizations are a key part of our MPLAB XC compilers and with Compiler Advisor, selecting the best optimization for your design is just a few clicks away. Compiler Advisor is a free tool to determine which optimizations will best suit your specific project. Available in version 6.0 of MPLAB X IDE, Compiler Advisor will test multiple builds of your project using a variety of MPLAB XC Compiler optimizations and return the data usage and program size in a helpful visual chart. From the chart, you can look at the different optimizations used for each test build image and save the best configuration to apply that set of optimizations right into your program.

Benefits


With Compiler Advisor, you will be able to:

  • Compare code size and data usage for a project using different compiler optimization settings
  • Automatically implement the best-suited optimization configuration to your program 
  • Analyze the added benefits of PRO compiler optimizations, even when using a free compiler license

FAQs


Why should I use Compiler Advisor? Compiler Advisor shows you how using different optimizations and buying a compiler license can help reduce your code size.
I opened Compiler Advisor and installed my compiler license but MPLAB X IDE does not recognize the license. After installing your compiler license, you must restart MPLAB X IDE for it to recognize a change in the licensing.
Which compiler versions work with Compiler Advisor? Supported compiler versions are versions 2.30 and later of MPLAB XC8, versions 1.26 and later of MPLAB XC16 and versions 3.01 and later of MPLAB XC32.
Do I need a compiler license to run Compiler Advisor? You do not need a license to use Compiler Advisor. However, you will receive fewer suggested configurations when using the free version than if you were to purchase a license.
How long does it take Compiler Advisor to analyze your code to find the best optimizations? Analysis time depends on the size and complexity of the project code.
How do I see detailed information about each bar in the graph? To view a pop-up of detailed data, hover over a configuration bar on the graph.
How do I get information on the optimizations used for the different configurations? Just click on the link for any optimization to open the compiler documentation for that particular optimization.
How can I add a Compiler Advisor-suggested configuration to my project? Simply click on the configuration you want and click on the “Save Configuration to Project” dialog. You can rename the configuration and set it as the active configuration in this dialog before clicking “OK” to add it to your current project.

Documentation


Title
Compiler Advisor Users Guide Download

Using the Compiler Advisor

In this video, learn how Compiler Advisor checks for the best optimizations for your project, how to apply the best optimization settings for your project and how to view visual data representation of the different builds.