Arduino Template Express – Installation

The Arduino ecosystem consist of an IDE, development boards, development libraries and a vibrant and engaging community involved in the support and expansion of all of the components that make the ecosystem.  I acknowledge the pedagogical benefits of the Arduino IDE but if you are already used to Atmel Studio, the Arduino IDE feels like developing with training wheels.  The Arduino Template Express (ATE) enables Atmel Studio to create sketches using Arduino libraries and development boards.  AVR developers can take the best of the Arduino and continue using Atmel Studio and all the benefits it provides.  This post will walk you through the installation of ATE.

Arduino Template Express Configuration

In order to install ATE you must have already installed Atmel Studio 6.1 and Arduino 1.0.4 or higher.  Both of these programs must be installed and running successfully.  Download ATE from the Arduino Template Express site at CodePlex.  Before running setup make sure you close all instances of Atmel Studio that may be running, run atesetup.exe and agree to let the program run with administrative rights.  The following screens will guide you to the setup process.  As of the writing of this post version 1.0.2 (Beta 3) is available for download.

ate-screen1

Press Next to get to the next screen

ate-screen2

Press “I Agree” to accept the license and move to the next screen.

ate-screen3

The atesetup.exe program will install pre-compiled Arduino libraries, project templates and a wizard to drive the initial configuration of sketches.  Click Next to continue.

ate-screen4

This screen let’s you select the directories where Atmel Studio accepts new templates and the location where you want to store the application.  It is advisable to install it in your documents\Arduino Template Express folder.  The installer will try to pre-populate the directories for you.  Click Next to continue

ate-screen5

The following screen will attempt selects the location of AVRDUDE and its configuration file also the path for atprogram.exe distributed with Atmel Studio.  Note that as of Atmel Studio 6.1 the path of atprogram.exe has changes and now it is under the atbackend directory.  The installer will try to find these programs for you, but if does not, you will need to provide their paths before continuing.  Press Next to continue.

ate-screen6

The Board Selection screen allows you to select up to 8 boards you already own.  Do not worry, if you have more than 8 boards.  After the installation is completed you can add as many boards as you want to the boards.xml file.  In my case I have 3 development boards, an Uno, Mega2560 and Leonardo.  Note the Leonardo board requires two different ports, one for data and the other for programming.  Once you have defined all your boards, press Next to continue.

ate-screen7

The External Tool configuration configures the option to deploy sketches from within Atmel Studio. The option is configured in the Tools menu and it is recommended that you configure the Deploy option as part of one of the tool bars in order to enable one click deployment.  Your screen may be a little different depending on the number of external tools you may have already installed in Atmel Studio.  Click Next to continue.

ate-screen8

The About to Install screen gives you a list of what is going to be installed.  Click Install to continue and after a little while the end of the installation screen will show giving you the option to launch the readme file or go to the web site to get additional information.  I suggest you take a quick look at the readme file.

ate-screen9

That’s all.  Hit close and the installation is completed.  If you forget where is the program installed, open a command window and type set | find “ATE_HOME” to find the path where the ATE was installed.  Next post I will walk you through the generation of a sketch that blinks the on board LED and uses the serial port.

Print Friendly

43 thoughts on “Arduino Template Express – Installation

  1. I am trying to use ATE with Arduino duemilanove 328p. For
    that I have changed in boards.xml 168 to 328p but it is not enough
    because it doesn’t work. Could you help me? Best regards.

  2. Your board is actually a hybrid. It has the dumilanove infrastructure but uses the 328P. You should use the Uno board because the core libraries for the dumilanove are compiled against the 168 chip. So use Uno board and make sure you use the com port used by your dumilanove board. If it does not work, indicate in your reply what is it that is failing, compilation, deployment or other. Include error message.

  3. hello
    but i want to ask you if i have atmel studio 6.0 only what can i do to use UN library
    thankes

  4. for example servo library
    because when i import the aurdion library \
    i have two error i can’t solve it.

  5. Ali, Atmel changed the project format from version 6 to version 6.1 so that makes it very dificult to support version 6.0. If you want to use the included compiled libbraries outside of the ATE experience it is possible, but requires you set up a AS 6.0 C++ project by hand and add the core library, additional libraries you want and then you can use it. You will also need to figure out how to deploy the code. It can be done but it is a bit of tedious work. Once you do it once you can create your own project template and the next one will be easier. If this does not make a lot of sense, let me know and i will ping you directly to discuss it.

  6. At first i open GCC C++ Executable project then choose atmega328p after that i can’t find core or addit..library but when i include the servo library from arduion library the atmel studio show this error”Error 1 Servo.h: No such file or directory”

    and I want to ask you if there is another place i can get the library .
    thanks

  7. and when i include in arduion and write simple project show Error” 1 undefined reference to `Servo::Servo()’ :”

  8. Returning to my problem related to duemilanove, it is not possible to deploy to 128 and 328p receiving following output from deploy
    Deploy script
    Executing local-deploy99.bat
    ———————————————————-
    Deploying “TrmsTcv328p” – Build 3
    The system cannot find the path specified.
    CANNOT Find output file “”C:\Users\Ferninacio\Documents\Atmel Studio\6.1\ArduinoProjects2009\TrmsTcv328p\TrmsTcv328p\scripts\output.txt”” – Aborting script

    “F:\Arduino\hardware\tools\avr\bin\avrdude.exe” -C”F:\Arduino\hardware\tools\avr\etc\avrdude.conf” -v -pATmega328p -carduino -PCOM3 -Uflash:w:”C:\Users\Ferninacio\Documents\Atmel Studio\6.1\ArduinoProjects2009\TrmsTcv328p\TrmsTcv328p\Debug\TrmsTcv328p.hex”:i
    avrdude.exe: Version 5.11, compiled on Sep 2 2011 at 19:38:36
    Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
    Copyright (c) 2007-2009 Joerg Wunsch
    System wide configuration file is “F:\Arduino\hardware\tools\avr\etc\avrdude.conf”
    Using Port : COM3
    Using Programmer : arduino
    avrdude.exe: stk500_getsync(): not in sync: resp=0x00
    avrdude.exe done. Thank you.
    Deployment Failed

  9. Fernando, the first error indicates the hex file cannot be found. Verify that when you compile the code the hex file is created. Try it both in release and debug mode. Also double check your board is in the proper COM port.

  10. In file deploy.bat:
    ….
    SET LIB_PATH=C:\Users\Omar\Documents\Atmel Studio\Libs\
    set HEADER_PATH=C:\Users\Omar\Documents\Atmel Studio\Headers\
    ….
    I’m not sure that I have a user Omar -)

  11. Hi Omar !
    Very nice work. ATE have work one time but 3 week later same problem than Fernando Iniaco ?? Why ? a microsoft update ??
    I have test in Release and Debug mode always same.
    I have update .net and windows to top version… I use Atmel studio 6.1 2730 SP2.
    I have uninstall and reinstall ATE… nothing to do…
    Thank’s a lot.

  12. Hum ! Excuse me forgot to set you the problem.

    Deploying “ArduinoSketch3″ – Build 3
    Le chemin d’accŠs sp‚cifi‚ est introuvable.
    CANNOT Find output file “”C:\Users\nico\Documents\Atmel Studio\6.1\ArduinoSketch3\ArduinoSketch3\scripts\output.txt”” – Aborting script

    “C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avrdude.exe” -C”C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf” -v -pATmega328P -carduino -PCOM6 -Uflash:w:”C:\Users\nico\Documents\Atmel Studio\6.1\ArduinoSketch3\ArduinoSketch3\Release\ArduinoSketch3.hex”:i

    avrdude.exe: Version 5.11, compiled on Sep 2 2011 at 19:38:36
    Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
    Copyright (c) 2007-2009 Joerg Wunsch

    System wide configuration file is “C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf”

    Using Port : COM6
    Using Programmer : arduino
    avrdude.exe: stk500_getsync(): not in sync: resp=0x00

    avrdude.exe done. Thank you.

    Deployment Failed

  13. This is a left over from a previous version – I will clean up in the next release – Thanks.

  14. Once you compile the program, and try to deploy it, can you tell me exactly what error are you getting during compilation or deployment.

  15. Hi !
    The error are the “output.txt” d’ont find by the batch file.
    I have verified the file is here…

    the error:
    CANNOT Find output file “”C:\Users\nico\Documents\Atmel Studio\6.1\ArduinoSketch3\ArduinoSketch3\scripts\output.txt”” – Aborting script

    And finally the deployment that failed…
    avrdude.exe: stk500_getsync(): not in sync: resp=0×00
    avrdude.exe done. Thank you.
    Deployment Failed

    I have verified the COM port this is the good one programming work with arduino
    dev app! and with visualmicro plugin for atmelvisualstudio with same port.

  16. Hi, can i use it with my atmega2560v on 8Mhz clock? Because in your “Libraries and Boards” there is an “x”…

  17. Hi

    Very nice work

    I am working with the NANO board (bought from EBAY) and I get the following error when deploying:

    avrdude.exe: stk500_getsync(): not in sync: resp=0x48

    I also have UNO bopard which works fine.

    I use XLODAER for loading to the NANO and it works so I guess it is a conf file issue.

    Can you help to solve this issue?

  18. HI, Nice Idea the Tool.
    I am having trouble which I believe is the arguments for deploy.
    $(SolutionDir) $(ProjectDir) $(ProjectFileName) $(ProjectDir)
    –the errors–
    Deploy script
    The system cannot find the path specified.
    –where are these defined for the current project,… how do they get referenced?
    Dan

  19. Great work, Omar. Very useful tool.

    I am having the same problem as eco. ATE works with Uno, but not Nano.

    Has anyone solved this?

  20. Hello OMAR.
    I write you from Russia.
    Badly I am on friendly terms with English. If you write the answer that describe more simply.
    I downloaded the Arduino template express program from your site. I underwent all procedure as you described everything on the page passed without mistakes. I was happy. Further I started Atmel studio 6.1 and I followed your instructions. When pressing the Start Debugging button after a while when compilation of the program comes to an end outputs messages –
    “Debugging tool isn’t set. Please set correct tool, interface, and clock for the current target”
    Then opens to me an additional window with a simulator. Well type wants to tell that the payment which is connected to com6 is absent. I don’t know why so occurs.

  21. Omar thanks for all the work you have posted. I cannot get the Atmel Studio 6.1 to successfully launch the AVRDude USB to Serial Port uploader.
    I am able to successfully program the Arduino Micro using the Arduino IDE.
    I set up Atmel Studio 6.1 to include the Arduino libraries steps outlined here. The files say they compile fine, no errors and all the output files appear to be generated in the project folder.
    http://www.engblaze.com/tutorial-using-atmel-studio-6-with-arduino-projects/
    I also tried the new install process you listed above. Still not able to upload.
    When the AVRDude.exe performs the Serial port to USB transfer, it’s not Syncing, so it says…
    The LED on the Arduino flashes a few times, but I get this error from the AVRDude output window.

    avrdude.exe: Version 5.11, compiled on Sep 2 2011 at 19:38:36
    Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
    Copyright (c) 2007-2009 Joerg Wunsch

    System wide configuration file is “C:\avrdude.conf”

    Using Port : \\.\COM8
    Using Programmer : arduino
    Overriding Baud Rate : 57600
    avrdude.exe: stk500_getsync(): not in sync: resp=0×00

    avrdude.exe done. Thank you.

    Is there any guidance or files I could send you to see what is happening or not happening with the AVRDude.exe ?

    I have a working connection between Arduino IDE laptop software and the Arduino mini boot loader on Micro board, the problem is only between Studio invoking AVRDude and establishing communication with the Arduino Micro mini boot loader.

    Thanks, Chris

  22. Please explain where I can edit this path in Studio to correct this missing file error and abort of deploy ?
    output.txt

    Deploy script
    Executing local-deploy99.bat
    ———————————————————-
    Deploying “ArdSketchFisher” – Build 1
    The system cannot find the path specified.
    CANNOT Find output file “”C:\Users\C\Documents\Atmel Studio\6.1\ArdSketchFisher\ArdSketchFisher\scripts\output.txt”” – Aborting script

    “C:\Arduino\hardware\tools\avr\bin\avrdude.exe” -C”C:\Arduino\hardware\tools\avr\etc\avrdude.conf” -v -patmega32u4 -cavr109 -PCOM9 -Uflash:w:”C:\Users\C\Documents\Atmel Studio\6.1\ArdSketchFisher\ArdSketchFisher\Debug\ArdSketchFisher.hex”:i

    avrdude.exe: Version 5.11, compiled on Sep 2 2011 at 19:38:36
    Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
    Copyright (c) 2007-2009 Joerg Wunsch

    System wide configuration file is “C:\Arduino\hardware\tools\avr\etc\avrdude.conf”

    Using Port : COM9
    Using Programmer : avr109
    AVR Part : ATmega32U4
    Chip Erase delay : 9000 us
    PAGEL : PD7
    BS2 : PA0
    RESET disposition : dedicated
    RETRY pulse : SCK
    serial program mode : yes
    parallel program mode : yes
    Timeout : 200
    StabDelay : 100
    CmdexeDelay : 25
    SyncLoops : 32
    ByteDelay : 0
    PollIndex : 3
    PollValue : 0x53
    Memory Detail :

    Block Poll Page Polled
    Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
    ———– —- —– —– —- —— —— —- —— —– —– ———
    eeprom 65 10 8 0 no 1024 8 0 9000 9000 0x00 0x00
    flash 65 6 128 0 yes 32768 128 256 4500 4500 0x00 0x00
    lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
    hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
    efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
    lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
    calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
    signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00

    Programmer Type : butterfly
    Description : Atmel AppNote AVR109 Boot Loader

    Connecting to programmer: .
    Found programmer: Id = “Åÿ(“; type = 
    Software Version = E.avrdude.exe: error: buffered memory access not supported. Maybe it isn’t
    a butterfly/AVR109 but a AVR910 device?
    Deployment Failed
    ECHO is off.

  23. Hi All
    The boards.xml file has zero size after installation. Please let me any example and I’ll maintain it myself.

    Thanks in advance,
    Oleg

  24. Hello Omar,
    Could you tell me where I am going off track ?
    I have Arduino Micro board and I have copied the Arduino Blink sketch example into Studio 6.1. I re-installed the Studio 6.1, Visual Micro for Arduino and the ATE you wrote for set up. This is not a project for work, I am getting back into electronics for developing robotics and programming experiments for my two kids to learn. So any help you provide is helping me personally. Thank you, Chris
    Deploy script
    Executing local-deploy99.bat
    ———————————————————-
    Deploying “P1BLINKAM2″ – Build 5
    The system cannot find the path specified.
    CANNOT Find output file “”C:\Users\C\Documents\Atmel Studio\6.1\P1BLINKAM2\P1BLINKAM2\scripts\output.txt”” – Aborting script

    “C:\Arduino\hardware\tools\avr\bin\avrdude.exe” -C”C:\Arduino\hardware\tools\avr\etc\avrdude.conf” -v -patmega32u4 -cavr109 -PCOM9 -Uflash:w:”C:\Users\C\Documents\Atmel Studio\6.1\P1BLINKAM2\P1BLINKAM2\Debug\P1BLINKAM2.hex”:i

    avrdude.exe: Version 5.11, compiled on Sep 2 2011 at 19:38:36
    Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
    Copyright (c) 2007-2009 Joerg Wunsch

    System wide configuration file is “C:\Arduino\hardware\tools\avr\etc\avrdude.conf”

    Using Port : COM9
    Using Programmer : avr109
    AVR Part : ATmega32U4
    Chip Erase delay : 9000 us
    PAGEL : PD7
    BS2 : PA0
    RESET disposition : dedicated
    RETRY pulse : SCK
    serial program mode : yes
    parallel program mode : yes
    Timeout : 200
    StabDelay : 100
    CmdexeDelay : 25
    SyncLoops : 32
    ByteDelay : 0
    PollIndex : 3
    PollValue : 0x53
    Memory Detail :

    Block Poll Page Polled
    Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
    ———– —- —– —– —- —— —— —- —— —– —– ———
    eeprom 65 10 8 0 no 1024 8 0 9000 9000 0x00 0x00
    flash 65 6 128 0 yes 32768 128 256 4500 4500 0x00 0x00
    lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
    hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
    efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
    lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
    calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
    signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00

    Programmer Type : butterfly
    Description : Atmel AppNote AVR109 Boot Loader

    Connecting to programmer: .
    Found programmer: Id = “wÿ(“; type = Ó
    Software Version = E.avrdude.exe: error: buffered memory access not supported. Maybe it isn’t
    a butterfly/AVR109 but a AVR910 device?
    Deployment Failed
    ECHO is off.

  25. seems the path is incorrect. “”C:\Users\C\Documents\Atmel Studio\6.1\P1BLINKAM2\P1BLINKAM2\scripts\output.txt””

  26. the simulator that comes with atmel studio is not configured by default. you need to select it to be able to step through your code. Make sure you can do this in a simple c/c++ project using the templates atmel provides.

  27. Hi Omar,
    I have installed the templates. I created a sketch and then built it. I got no errors. I am using the Duemilanove board. I then hit the deploy button and got the following error.
    Deploy script
    The system cannot find the path specified.

    I am using atml studio 6.1 on a windows 7 ultimate 64bit computer.

  28. I had a problem to upload sketches to my duemilanove with a atmega328p ( stk500_getsync(): not in sync: resp=0x00).
    The problem seems to be the baud rate for the serial interface in the boards.xml file.
    To change ComPortSpeed to 57600 seems not to work as aspected.
    So I changed the value of to -b57600 (like the avrdude command in the arduino ide uses too) and it works like a charm!
    Hope this helps some people with the same problem :)

    PS:
    I did not used “Uno” as device for my 2009 but changed “Processor” in the boards.xml to “ATmega328p” in the “Duemilanove” section of the file.

  29. Sorry, the comment-box seems not to like xml tags :-)
    The xml-tag for the “-b57600″ parameter is “MiscParams” !

  30. Hey Omar!

    First of all thanks for this fine and well-explained piece of work! everything works fine on my machine (AS 6.1 + Uno) – but there is one Q i got and hopefully i wont plant a wood of facepalms asking this one:

    i am trying to program the ATMega328P on my Uno in C – until now i was completely not able to deploy the hex-file (means: i created a new GCC C Executable Project -wrote a simple program and then built the whole thing) on my arduino – i tried it using the device-programming in AtmelStudio and i also tried it using burn-o-mat – nothing worked – well now i found out that creating an arduino-sketch-project (in atmel studio with ATE) with the same name and copying the subfolders that can be found in the project’s dir into the GCC C project dir it works copying the hex-file mentioned above onto the uno – well as you can see this is really not a very ellegant way to solve my problem but somehow it seems to work – but is there an easier way to do all this without all of this copy-and-paste-desaster??

    thanks and greetings

    Erik

  31. I am successfully using Atmel Studio for basic projects with external tools setup for programming via the Arduino Bootloader thanks to your great scripts and instructions. Next I would like to include in Atmel Studio project an additional Arduino library not part of the core libraries. I tried simply copying the .h and .cpp file local to the project and including the header file but this did not work.

    Any help would be much appreciated!

  32. Hi, just an update on my above comment. I think the problem is not inclusion of my header files, but instead my LibArduinoCore library has a yellow triangle over it. I think the header files are included ok, but when they attempt to use the core library, it all goes wrong. My updated question is, does the above sounds reasonable, and if so, how can I solve the yellow triangle issue within Atmel Studion.

    Thanks for your time!

  33. ok finally i found a solution: copied the command argument from arduino’s output window to atmel studio’s tools->external tools->arguments-field, changed the location of the hex-file in the argument to $(ProjectDir)Debug\$(ItemFileName).hex:i, typed the location of the avrdude.exe into the command line and it works – now i am able to upload my assembler code onto the arduino

  34. You need to open the project property and add the libray to the linker. You also need to add the directory where the header files are located to the c++ compiler include directory in the same project property. Let me know if this is not clear and I will ping you directly.

  35. You can ignore the yellow triangle. The reason for the triangle is the library is referenced through an environment variable which the ide cannot decode, but the compiler handles OK. The core lib does not include ALL arduino libraries – just the core. Each library is compiled independently and needs to be added explicitly.

  36. Pingback: ATMEL | Pearltrees

  37. First of all: Thanks a lot for this work!
    hopefully it will help me programming the Arduino Mega 2560 ;-)

    I installed AtmelStudio 6.1 and the Arduino Template Express.
    As I try to follow above instructions to deploy the example I get this message after DEPLOY (avrdude.exe):
    —————————————————————————-
    avrdude.exe: Device signature = 0x1e9801
    avrdude.exe: safemode: lfuse reads as FF
    avrdude.exe: safemode: hfuse reads as D0
    avrdude.exe: safemode: efuse reads as FF
    avrdude.exe: NOTE: FLASH memory has been specified, an erase cycle will be performed
    To disable this feature, specify the -D option.
    avrdude.exe: erasing chip
    avrdude.exe: stk500v2_command(): command failed

    avrdude.exe done. Thank you.
    —————————————————————————-
    As I find by Google the option “-D” has to be set.
    Unfortuinately I can not fine the place to do so.
    Second issue for youre notification only:
    the ATE setup does not work with ATstudio 6.2 ;-)

    Many thanx in advance…

  38. Once 6.2 is released I will look into changing things around to make it work. Look at the ATE\deploy.bat and at the ATE\boards.xml files to provide additional parameters to averdude. If the parameters are project dependent, look at the Scripts\targetboards.xml. In your case you are must likely using the Mega2560BootLoader (default for Mega2560). In the ATE\Boards.xml file around line 478 there is a tag, just add the -D option there and it should be added to the command line for you.

  39. Hi
    Thanks for all the great work. I want to run the Due in studio 6.1 using arduino libraries.

    The due seems to only be suooprted in 1.5.6 r2. Did Arduino change a lot from 1.0.4 to 1.5.6 R2? Will your scripts still work with 1.5.6 and the Due?

    I was going to try it , but thought I would ask first..

    Thanks
    dave

  40. If I use the arduino ‘delay’ function my application gets hung up there..
    if I use the atmel studio _delay_ms , it works fine.

    My application includes “Arduino.h” and the compiler symbol flag is set correctly (F_CPU=16000000L), with the optimization set for size (-O2)

    Do I need to include Wiring.cpp? What could cause the arduino version of delay to hang?

Leave a Reply

Your email address will not be published. Required fields are marked *


− one = 7

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>