because I want to use Atmel-Studio6 instead of the Arduino IDE (way to much restrictions for me ;-) I have built a little tool - a batch job which erases and flashes the Due automatically. So no more pushbutton work has to be done. Also the the functionality of Bossac is now embedded in the ATmel IDE toolbar. Maybe someone can use this tool, too.

Howto:1.Create a batch-fileCreate a batch-file, name it Arduino_Due.batC&P these lines:

Please read and follow the instructions in the batch file when using it. Unfortunately I haven't found a correct syntax for relative variables like $(ProjectDir)Debug\$(ItemFileName).bin or so. So the full path name must be hard coded instead. If you find out how to set a relative target name usable in a batch file then please let me know.

2. Make a Directory c:\bossa. Copy the command line tool "bossac.exe" (not the file with the same name used by the windows version, this won't work) and the new batch file "Arduino_Due.bat" in the directory.

Atmel Studio has created a new item now, bossac can be used from the "Tools" menu. If you want to have a funky little button in the toolbar also (yes!!) then do step 4 additionally.

4. Make a new button for Atmel StudioFind the "build toolbar" in the toolbar (the buttons the code is crunched with).On the left edge right-click the arrow for the "build toolbar options". The pull-down menu appear. Select "Customize..." In the pop-up window select the tab "commands".Click the radio button for "Toolbar". Select "Build" from the corresponding drop-down menu.Click "Add Command...".In the left box, select "Tools" in the categories menu. The right box now is filled with selectable commands. Find "External Command 1" and click it.

Now a new button in the build toolbar has been created and Bossac is ready to use. If you want to change the position inside the toolbar then re-open the command tab and use the up/down buttons for positioning. Be sure the appropriate item is selected.

Now you can add a "post build command" in the "Build Event" (Debug and Release)"$(DevEnvDir)\BossacArduinoDue.bat" "C:\Program Files (x86)\arduino-1.5.2\hardware\tools\bossac.exe" "$(OutputDirectory)\$(OutputFileName).bin"