IAR C/C++ Compiler™ for AVR MCUs in MPLAB® X IDE

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.
ToolsOptionsEmbedded_IAR.png

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.

NewProject_IARCompiler.png

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.

IARAVR_CompilerOptions.png

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".

IARAVR_UG_Help.png
© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
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.