
{"id":1753,"date":"2021-07-30T10:22:26","date_gmt":"2021-07-30T09:22:26","guid":{"rendered":"https:\/\/www.kanda.com\/blog\/?p=1753"},"modified":"2021-07-30T11:13:55","modified_gmt":"2021-07-30T10:13:55","slug":"move-from-atmel-studio-to-mplab-x","status":"publish","type":"post","link":"https:\/\/www.kanda.com\/blog\/microcontrollers\/move-from-atmel-studio-to-mplab-x\/","title":{"rendered":"Move from Atmel Studio to MPLAB X IDE"},"content":{"rendered":"\n<p>Microchip took over Atmel some years ago and are slowly eliminating the Atmel brand. One of the major legacies from Atmel  is their Atmel Studio development environment but its days may be numbered. <\/p>\n\n\n\n<!--more-->\n\n\n\n<p>There is no need to panic but it is inevitable that one day Atmel Studio will disappear and MPLAB X will replace it. Microchip have already produced a Microchip Studio version, which is just a rebranded Atmel Studio but are also busy adding AVR support to MPLAB X. <\/p>\n\n\n\n<p>It has reached the point where you can import Studio projects into MPLAB X very easily and use either Atmel or Microchip tools for programming and debugging.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Import Studio Project in to MPLAB X<\/h2>\n\n\n\n<p>You first need to create a New Project<strong> (File -&gt; New Project)<\/strong>. In the New Project Dialog that opens, select Category as <strong>Microchip Embedded<\/strong> and Projects as <strong>Import Atmel Studio Project<\/strong>. Click Next button.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-1.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"737\" height=\"507\" src=\"https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-1.jpg\" alt=\"\" class=\"wp-image-1754\" srcset=\"https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-1.jpg 737w, https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-1-300x206.jpg 300w\" sizes=\"auto, (max-width: 737px) 100vw, 737px\" \/><\/a><figcaption>Choose Project Type<\/figcaption><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Select Your Atmel Studio Project<\/h2>\n\n\n\n<p>Select your Atmel Studio project &#8211; this only works with C projects (.cproj), see note below for Assembler projects (.asmproj).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-3.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"737\" height=\"507\" src=\"https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-3.jpg\" alt=\"\" class=\"wp-image-1756\" srcset=\"https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-3.jpg 737w, https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-3-300x206.jpg 300w\" sizes=\"auto, (max-width: 737px) 100vw, 737px\" \/><\/a><figcaption>Find Atmel Studio Project<\/figcaption><\/figure>\n\n\n\n<p>MPLAB X will create a sub-folder in your Atmel Studio project folder to store the completed MPLAB X project. It will be called Project Name.X, in this example LCD_C.X<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Select Device and Tool<\/h2>\n\n\n\n<p>Click Next button and on next screen, select Device Family as 8-bit AVR MCU and then your AVR device, in this example ATmega128A to match the device in your Atmel Studio project.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-2.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"737\" height=\"507\" src=\"https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-2.jpg\" alt=\"\" class=\"wp-image-1755\" srcset=\"https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-2.jpg 737w, https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-2-300x206.jpg 300w\" sizes=\"auto, (max-width: 737px) 100vw, 737px\" \/><\/a><figcaption>Select AVR family, AVR device and tool.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Available Tools<\/h2>\n\n\n\n<p>Only a few more recent tools will work with AVR in MPLAB X, which may be a reason to not change IDE for the moment, if you have an older tool. <\/p>\n\n\n\n<p><strong>Tools that work<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Atmel-ICE<\/li><li>PICKit 4<\/li><\/ul>\n\n\n\n<p><strong>Tools that don&#8217;t work<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>AVR Dragon, AVRISP-MKII, JTAGICE-MKII<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>PICKit 2, PICKit 3, MPLAB SNAP<\/li><\/ul>\n\n\n\n<p>Select the tool you have available or use Simulator for debugging.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Select Tool Chain<\/h2>\n\n\n\n<p>On the next screen you set the tool chain. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-5.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"785\" height=\"507\" src=\"https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-5.jpg\" alt=\"\" class=\"wp-image-1757\" srcset=\"https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-5.jpg 785w, https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-5-300x194.jpg 300w, https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-5-768x496.jpg 768w\" sizes=\"auto, (max-width: 785px) 100vw, 785px\" \/><\/a><figcaption>Select C Compiler<\/figcaption><\/figure>\n\n\n\n<p>In most cases, you will want to select an AVR C compiler, either GCC or WinAVR. A simple project will compile with XC8 as it now supports AVR devices but there are syntax differences that will usually require changes before it will compile.<\/p>\n\n\n\n<p>If you have time, you may want to try XC8 and work through the compile errors as it is a very good compiler and represents the future. Here is a guide to using XC8 compiler with AVR:<\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" href=\"\/files\/MPLAB_XC8_C_Compiler_User_Guide_for_AVR.pdf\" target=\"_blank\">XC8 AVR Guide<\/a> &#8211; opens in new tab.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Device Support Packs<\/h2>\n\n\n\n<p>If you select XC8 C compiler it will use its built in device library but if you select AVR GCC or WinAVR, you will get this message.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-6.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"785\" height=\"507\" src=\"https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-6.jpg\" alt=\"\" class=\"wp-image-1758\" srcset=\"https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-6.jpg 785w, https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-6-300x194.jpg 300w, https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-6-768x496.jpg 768w\" sizes=\"auto, (max-width: 785px) 100vw, 785px\" \/><\/a><figcaption>Device Support Pack Needed<\/figcaption><\/figure>\n\n\n\n<p>MPLAB X needs the AVR DFP Device support pack to compile your project using WinAVR or AVR GCC compilers, in this case ATmega_DFP. There are different packs for ATmega, ATtiny, Automotive and different ATxmega series.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-9.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"502\" height=\"234\" src=\"https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-9.jpg\" alt=\"\" class=\"wp-image-1769\" srcset=\"https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-9.jpg 502w, https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-9-300x140.jpg 300w\" sizes=\"auto, (max-width: 502px) 100vw, 502px\" \/><\/a><\/figure>\n\n\n\n<p>The link shown on screen to Atmel.com does not work so you will need Atmel Studio installed.<\/p>\n\n\n\n<p>These device support packs will be in a folder called packs in Studio 7 folder under Atmel folder in Program Files. Browse through <strong>Program Files (x86) &#8211; Atmel &#8211; Studio &#8211; 7.0 &#8211; Packs &#8211; Atmel<\/strong>. <\/p>\n\n\n\n<p>Select the correct folder and click on <strong>.pdsc file <\/strong>to select it as Device Support Path.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Give Project a Name<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-7.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"785\" height=\"510\" src=\"https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-7.jpg\" alt=\"\" class=\"wp-image-1759\" srcset=\"https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-7.jpg 785w, https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-7-300x195.jpg 300w, https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-7-768x499.jpg 768w\" sizes=\"auto, (max-width: 785px) 100vw, 785px\" \/><\/a><figcaption>Project Name Screen<\/figcaption><\/figure>\n\n\n\n<p>MPLAB X will have loaded your Atmel Studio project and folder, just click next to keep these the same. MPLAB X will create a .X sub-folder with all the new MPLAB X project in it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<p>The last screen of New Project Wizard is a summary of everything. Click Finish to create your new MPLAB X project.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-8.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"785\" height=\"560\" src=\"https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-8.jpg\" alt=\"\" class=\"wp-image-1760\" srcset=\"https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-8.jpg 785w, https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-8-300x214.jpg 300w, https:\/\/www.kanda.com\/blog\/wp-content\/uploads\/mplabx-8-768x548.jpg 768w\" sizes=\"auto, (max-width: 785px) 100vw, 785px\" \/><\/a><figcaption>Summary Screen<\/figcaption><\/figure>\n\n\n\n<p>Your new project is ready to compile and debug in MPLAB X.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Assembler Projects<\/h2>\n\n\n\n<p>MPLAB X will not recognise Atmel Studio ASMPROG as a valid project type so will not convert it automatically. Instead, you will need to create a New Standalone Project, select AVR family and your AVR device then select AVRASM2 as the toolchain.<\/p>\n\n\n\n<p>Finish creating the new project and add your existing .asm files to source code section of the project.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Related Products<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li><a rel=\"noreferrer noopener\" href=\"\/products\/Microchip\/PICKIT4.html\" target=\"_blank\">PICKit 4 Debugger and Programmer<\/a><\/li><li><a rel=\"noreferrer noopener\" href=\"\/products\/Atmel\/ATATMEL-ICE.html\" target=\"_blank\">AVR ICE Debugger and Programmer<\/a><\/li><li><a rel=\"noreferrer noopener\" href=\"\/products\/Kanda\/STK200-X-ICE.html\" target=\"_blank\">AVR Training Ki<\/a><a href=\"\/products\/Kanda\/STK200-X-ICE.html\" target=\"_blank\" rel=\"noreferrer noopener\">t<\/a><a rel=\"noreferrer noopener\" href=\"\/products\/Kanda\/STK200-X-ICE.html\" target=\"_blank\"> with AVR ICE<\/a><\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Related Posts<\/h2>\n\n\n\n<p><a href=\"https:\/\/www.kanda.com\/blog\/microcontrollers\/atmel-studio-now-microchip-studio\/\">Microchip Studio vs Atmel Studio<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Microchip took over Atmel some years ago and are slowly eliminating the Atmel brand. One of the major legacies from Atmel is their Atmel Studio development environment but its days may be numbered.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,3],"tags":[18],"class_list":["post-1753","post","type-post","status-publish","format-standard","placeholder-for-hentry","category-avr-microcontrollers","category-microcontrollers","tag-avrtrainer"],"_links":{"self":[{"href":"https:\/\/www.kanda.com\/blog\/wp-json\/wp\/v2\/posts\/1753","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kanda.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kanda.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kanda.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kanda.com\/blog\/wp-json\/wp\/v2\/comments?post=1753"}],"version-history":[{"count":15,"href":"https:\/\/www.kanda.com\/blog\/wp-json\/wp\/v2\/posts\/1753\/revisions"}],"predecessor-version":[{"id":1780,"href":"https:\/\/www.kanda.com\/blog\/wp-json\/wp\/v2\/posts\/1753\/revisions\/1780"}],"wp:attachment":[{"href":"https:\/\/www.kanda.com\/blog\/wp-json\/wp\/v2\/media?parent=1753"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kanda.com\/blog\/wp-json\/wp\/v2\/categories?post=1753"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kanda.com\/blog\/wp-json\/wp\/v2\/tags?post=1753"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}