Close

Set Up Atmel Studio for ATtiny and Add jtag2updi Programmer

A project log for ATtiny 0 Series programming on the cheap

The newer range of ATtinys can be programmed with an Arduino and Atmel Studio 7. NOW ALSO VIA THE ARDUINO IDE!

simon-merrettSimon Merrett 05/15/2019 at 23:015 Comments

We're going to open Atmel Studio and add our device pack for ATtiny, then add our hardware programmer to the list of devices we can use to programme from within Atmel Studio (such as the Atmel ICE programmer). This should speed up our development iterations over using avrdude from the command line each time we want to upload code to the ATtiny.

Open up Atmel Studio and open Tools\Device Pack Manager: 

On Windows you may be asked if you want Device Pack Manager to make changes to your system. I clicked Yes.

If you have a green icon and an "Install" button next to ATtiny DFP 1.3.229 click it and follow the instructions so it installs and you end up looking like this:

You can now close the Device Pack Manager and go back to the main Atmel Studio screen. Now we're going to add our jtag2updi Arduino as a hardware programmer that uses avrdude from within Atmel Studio. Click Tools\External Tools 

And a window will pop up like this one, which you are going to copy the contents of into yours:

You should be all set to programme your ATtiny402 from Atmel Studio now! I have written this guide a couple of weeks after I first went through the process so if I have missed a step, please shout in the comments.

Discussions

Bélières wrote 10/23/2022 at 18:53 point

Hello. Now, Atmel studio is Microchip studio. I instralled the last version (7.0.2594.) I do not see any "Device pack manager" item in the tools menu... How to proceed ?

Two hours later : I re-installed µchip studio, and then I got the menu item. Going farther ...

  Are you sure? yes | no

Simon Merrett wrote 11/02/2022 at 23:02 point

Sorry, I've avoided microchip studio / mplab. Hope you got it working. 

  Are you sure? yes | no

Bélières wrote 11/03/2022 at 08:12 point

"Device pack  manager" appears only in "advanced mode" user interface profile. Everything is ok, I can now download code to Attiyny814 target and UPDI interface.

  Are you sure? yes | no

Rick Shory wrote 02/01/2021 at 04:38 point

This was extremely helpful. Just a few tweaks: 

In the "Arguments:" box, it worked for me *not* to put "avrdude" at the beginning. That's already taken care of in "Command:"

I had to include the -C <config-file> option. I was working from a previous setup in the Arduino IDE and the config file was in <user>\Documents\ArduinoData\packages\megaTinyCore\hardware\megaavr\2.2.6\avrdude.conf

I had to make the -U option:

flash:w:"$(ProjectDir)Debug\$(TargetName).hex":i

Note the quotes, because the generated path contained spaces.

Overall, though, extremely helpful!

  Are you sure? yes | no

Simon Merrett wrote 02/01/2021 at 07:44 point

Thanks for the additional details. I'm sure it will be helpful. 

  Are you sure? yes | no