Programming Arduino Due with Atmel Studio 6.1 and ASF

Sometimes Arduino Sketches concept is just not enough:

  1. You want to make a full scale use of ASF (Atmel Software Framework)
  2. You are willing to work with regular Static libraries and create a modular code
  3. You are willing to make a full use of Atmel Studio features

This tutorial is based on the following discussion explaining how to reuse Arduino Bootloader to download code to the board without use of external programmers.


  • You need Arduino environment 1.5.* installed
  • Connect your Arduino Due to Programming USB port

Creating a project

  1. File -> New -> Project -> C/C++ -> Arduino-Board -> Arduino Due/X – ATSAM2X8E
  2. F7 -> Make sure it is built correctly and you have *.bin file in your Debug/Release directory

Adding programmer support

  1. Create Batch file DueProgrammer.bat at some location with the following content:

    * change <PATH TO ARDUINO ENV> to your arduino environment installation path
  2. In Atmel Studio go to Tools -> External Tools
  3. Fill the following values:
    • Title: “Arduino Due Programmer”
    • Command: Select the file DueProgrammer.bat you created
    • Arguments: “COM6 $(TargetDir)$(TargetName).bin” (where COM6 is your Arduino programming port
    • Initial directory: $(TargetDir)
    • Mark “Use Output window” (all other checkboxes are unmarked)
  4. Click OK

For UDOO board users only

read more