Avr Dragon and Bootloader

Hi outthere,

While reading a post "How to burn a booloader on a non common ISP programmer" I got a tip and took a look into the avrdude.conf.
arduino-0018\hardware\tools\avr\etc\avrdude.conf

And there it is:

#
# PROGRAMMER DEFINITIONS
#

programmer
  id    = "avrisp";
  desc  = "Atmel AVR ISP";
  type  = stk500;
;
...
# AVR Dragon in ISP mode
programmer
  id    = "dragon_isp";
  desc  = "Atmel AVR Dragon in ISP mode";
  baudrate = 115200;
  type  = dragon_isp;
;

I also found out that under "\arduino-0018\hardware\programmers.txt" you can add new Programmers for a bootloader.

newProgrammer.name=newProgrammer
newProgrammer.protocol=...?

So... Is it possible to use the dragon directly from the arduino interface?
Which protokoll does the dragon use?
Any ideas or comments on it?

The original posting.
Well, its in german, concerning version 0014 and another programmer.

Greeting Mig

Ps.: Hope this fits in the software section.

Which [protocol] does the dragon use?
... comments on it?

On my Linux system I use avrdude to program ATmega328p chips (and others) with an AVR Dragon from a command line.

For example, if an ATmega328p file is an Intel hex file named xxx.hex:

    avrdude -v -c dragon_isp -P usb -p m328p flash:w:xxx.hex:i

Note: The arduino bootloader for the '328p is
arduino-0018/hardware/arduino/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex

Anyhow...I'm guessing that the programmer protocol in programmers.txt would be dragon_isp (since that's how avrdude connects to AVR Dragon).

[/Begin Disclaimer]
I have not tried putting the Dragon information into the programmers.txt file to be able to use this from the Arduino IDE, and don't intend to. Therefore, I have to say YMMV (Your Mileage May Vary).
[/End Disclaimer]

AVR Dragon also supports the parallel mode, but for this I have a jig that makes connections to the Dragon on-board sockets, and I plug the chip to be programmed into the Dragon. It is strongly recommended that you do not (that's not) try to use the parallel mode in-circuit. The avrdude programmer protocol for this is dragon_pp so the command line is

    avrdude -v -c dragon_pp -P usb -p m328p flash:w:xxx.hex:i

Regards,

Dave

Thx for the hint, avrdude can be used the same way in windows using the windows console. Well, windows user tend to dislike consoles so I stick to avr studio.
I will not try the parrallel programming in-circuit thats what the devellopement part of the dragon is for.

But for curiositys sake I played around a bit further.

Added to "\arduino-0018\hardware\programmers.txt"

dragon_isp.name=Dragon ISP
dragon_isp.communication=serial // otherwise it asumes parrallel communication(lpt1)
dragon_isp.protocol=dragon_isp

avrdude: jtagmkII_recv_frame(): timeout
avrdude: jtagmkII_getsync(): sign-on command: status -1

JtagmkII?? that makes no sense to me :-/

Nevermind, I will focus on the microcontrollers again, get something usefull done ;D.

Maybe I will figure out something on the way.

so I stick to avr studio

And AVRStudio works with the Dragon in isr mode, right?

My guess for programmers.txt was obviously insufficient; maybe even (gasp) wrong. Oh, well...

If you are really interested in doing it from Arduino, you should be able to find, somewhere in the Arduino source files, what information they get from programmers.txt and how they use it to create the avrdude command. I haven't looked, and probably won't.

Regards,

Dave

I'm also interested in this,

look at Messages that apears in AVR Studio when connect the AVR Dragon:

Loaded plugin Proteus VSM Viewer
Loaded plugin STK500
Loaded plugin AVR GCC
Loaded partfile: C:\Arquivos de programas\Atmel\AVR Tools\PartDescriptionFiles\ATmega328P.xml
Loaded partfile: C:\Arquivos de programas\Atmel\AVR Tools\PartDescriptionFiles\ATmega328P.xml

Maybe the protocol should be STK500?

I'm on watching this topic :slight_smile: