As of MPLAB® X IDE v5.35, the IAR C/C++ Compiler™ for AVR MCUs may be used in an MPLAB X IDE project.
Installing the Compiler
To install the IAR C/C++ Compiler for AVR MCUs, you must install IAR Embedded Workbench® for AVR. Once installed, you will need a license. You can register for an evaluation license and choose either a full-feature product for 30 days or a code-size limited product for an unlimited amount of time.
For documentation support about the workbench and compiler, open IAR Embedded Workbench and view the support information available on its desktop or under the Help menu.
Adding the Compiler Toolchain to MPLAB X IDE
If the workbench was installed at the default location, for example, C:\Program Files (x86)\IAR Systems, MPLAB X IDE will detect it automatically and it will appear in the Build Tools list under Options > Tools > Embedded.
However, if it was installed in a different location, you will need to manually add it to the list.
- Go to Options > Tools > Embedded > Build Tools.
- Click the Add button.
- Browse to the folder at the default location under Embedded Workbench 8.0\avr\bin and click OK.
Creating a New Project Using the Compiler
Click on the New Project icon and follow the wizard screens until you are asked to select the compiler. Find it under "IAR for AVR".
Click Next to name the project and then click Finish.
Setting Up the Compiler
Set up compiler options are in Project Properties. Open this window by clicking on the project name in the Projects window and selecting Properties.
For more information on the toolchain tools and setup options, open the Help menu in IAR Embedded Workbench and view the "C/C++ Compiler User Guide".