Compiler Advisor in MPLAB X IDE User's Guide Notice to Development Tools Customers Important: All documentation becomes dated, and Development Tools manuals are no exception. Our tools and documentation are constantly evolving to meet customer needs, so some actual dialogs and/or tool descriptions may differ from those in this document. Please refer to our website (www.microchip.com/) to obtain the latest version of the PDF document.
Table of Contents Notice to Development Tools Customers....................................................................................................... 1 1. Compiler Advisor.....................................................................................................................................3 1.1 1.2 1.3 1.4 Perform Project Analysis.............................................................................................................. 4 Understand Analysis Results in Chart......
Compiler Advisor 1. Compiler Advisor Note: This content is also in the "MPLAB X IDE User’s Guide" (DS-50002027). Compiler Advisor displays a graphical comparison of sets, with carefully selected available compiler optimizations using project code. Figure 1-1. Compiler Advisor Example This MPLAB X IDE plug-in can be useful in: • • • • Providing information on available compiler optimizations for each compiler type (XC8, XC16, XC32).
Compiler Advisor 1.1 Perform Project Analysis To use the Compiler Advisor to analyze your project for different combinations of optimizations, follow the procedures in the following sections. 1.1.1 Select Project for Analysis In MPLAB X IDE, open a project and in the Projects window either click on the project name to make it active or right click on the project name and select “Set as Main Project.” The project code, configuration, compiler and device will be used for the analysis.
Compiler Advisor When the analysis is complete, a graph will appear showing program and data memory used for each of the different configurations (see figures below). For a compiler in Free mode, the last column will show a PRO compiler comparison. To buy a PRO license, click the “Buy License” link to go to the MPLAB XC Compiler webpage to select the type of PRO license to buy. The analysis information is saved in the project folder. For details on the chart, see 1.2 Understand Analysis Results in Chart.
Compiler Advisor Figure 1-5. PRO License Example 1.2 Understand Analysis Results in Chart The chart generated after analysis has several features explained in the following sections. Use these features to determine if another configuration is right for your application. 1. 2. 3. 4. 5. 6. 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.
Compiler Advisor Figure 1-6. Annotated Chart Features 1.2.1 Find Build Failures When a build fails due to certain optimization selections, you can click on Build Failed to go to where the error(s) are in the Output window. Figure 1-7. Build Failed Link 1.2.2 View Configuration Optimizations Click the link of an optimization (e.g., -Os) used in a configuration to get more information. The link will take you to a description of the optimization in the compiler online documentation.
Compiler Advisor Figure 1-8. Click to See Optimization Description 1.2.3 View Configuration Data To see the percentage and bytes of program and data memory used for each build configuration, mouseover a program memory bar for MCUs (see figure) and a data memory point for MPUs. Figure 1-9. MCU Mouseover for Tooltip 1.2.4 Use Context Menu Functions Right click on the chart to pop up the context menu with items listed in the table below. Table 1-1.
Compiler Advisor ...........continued 1.2.5 Menu Item Description Auto Range Automatically adjust the range of the selected axes for the data in the chart. View Initial Configuration To view the initial project configuration used, click on “Properties” to open the Project Properties window. 1.2.6 Save Configuration to Project Click on the “Save Config” link under a configuration (e.g., Config E) that you want to add to your project.
Compiler Advisor Figure 1-12. Configuration Saved to Project Note: Because the configuration has been added to the project, the Compiler Advisor will notice a change to the project properties and change Analyze to Reload. 1.3 Understand MPU Charts The procedure to perform project analysis and the features of the resulting analysis chart are similar to those mentioned previously for MCU devices.
Compiler Advisor Figure 1-13. MPU Chart from Analysis 1.4 Analyze Another Project If you decide to analyze another project, select that project by making it active or main (see 1.1.1 Select Project for Analysis). Then reopen the Compiler Advisor (see 1.1.2 Open Compiler Advisor). A dialog will ask if you want to change from the existing project to the new project (see figure below). If you select Yes, then the Compiler Advisor window will be updated with the details of selected project.
The Microchip Website Microchip provides online support via our website at www.microchip.com/. This website is used to make files and information easily available to customers.
Product Identification System To order or obtain information, e.g., on pricing or delivery, refer to the factory or the listed sales office. [X](1) PART NO.
terms. Information regarding device applications 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. Contact your local Microchip sales office for additional support or, obtain additional support at www.microchip.com/en-us/support/ design-help/client-support-services. THIS INFORMATION IS PROVIDED BY MICROCHIP "AS IS".
AMBA, Arm, Arm7, Arm7TDMI, Arm9, Arm11, Artisan, big.LITTLE, Cordio, CoreLink, CoreSight, Cortex, DesignStart, DynamIQ, Jazelle, Keil, Mali, Mbed, Mbed Enabled, NEON, POP, RealView, SecurCore, Socrates, Thumb, TrustZone, ULINK, ULINK2, ULINK-ME, ULINK-PLUS, ULINKpro, µVision, Versatile are trademarks or registered trademarks of Arm Limited (or its subsidiaries) in the US and/or elsewhere. Quality Management System For information regarding Microchip’s Quality Management Systems, please visit www.microchip.
Worldwide Sales and Service AMERICAS ASIA/PACIFIC ASIA/PACIFIC EUROPE Corporate Office 2355 West Chandler Blvd. Chandler, AZ 85224-6199 Tel: 480-792-7200 Fax: 480-792-7277 Technical Support: www.microchip.com/support Web Address: www.microchip.