The problems with the AVR Dragon on Linux

Go To Last Post
23 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm using eclipse with the AVR Eclipse plugin installed and i've installed: gcc-avr avr-libc binutils-avr avrdude eclipse eclipse-cdt

I try to upload the code to an ATMEGA1284P-PU on my breadboard and I get this error:

 

Launching /usr/bin/avrdude -pm1284p -cdragon_isp -Uflash:w:testing.hex:a 
Output:

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.15s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.15s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.15s

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.

avrdude done.  Thank you.

avrdude finished

 

This topic has a solution.
Last Edited: Fri. Nov 10, 2017 - 06:42 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A few (of several?) AVR Dragon issues :

  • power
  • target cable length

 


Atmel Studio

I've connected my tool through an USB hub, and now I get error messages and inconsistent results while programming and debugging.

http://www.atmel.com/webdoc/GUID-ECD8A826-B1DA-44FC-BE0B-5A53418A47BD/index.html?GUID-2AA8AD76-3118-454D-9198-E377F88DE62D

...

Note:

Note that the AVR Dragon should be connected through a powered USB hub. This is because the power supply on the Dragon can be to weak if the motherboard does not provided enough power. If the Dragon times out or freezes, then the hub might be of to low quality.

http://www.atmel.com/webdoc/avrdragon/avrdragon.troubleshooting.html

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Im using the SPI/ISP port on the AVR Dragon and Im using jumper leads that go from the AVR Dragon to the breadboard. Power is being suppled from a 5V plugpack. It worked fine with the ATAVRISP MKII programmer. 

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A common reason for  invalid signature is an ISP clock that is running too fast. It must be no higher than 1/4 the MCU clock and preferably a bit lower than this. For example, if the MCU is one of the ones that typically runs at 1MHz internal default, then the ISP clock should be no higher than 250KHz and much preferably 125KHz. If it is running with an 8MHz clock, then 1MHz ISP clock is a good choice.

 

It is also important to remember that an external crystal is NOT used until the fuse has changed. Thus, even if you have an external 8MHz crystal and the MCU, out of the box, uses 1MHz internal RC oscillator, you must set the ISP to 125KHz because that is set by the MCU clock that is actually  running when you try to program it. As far as I know, the new fuse setting is not active until the MCU  goes through a reset cycle.

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

Last Edited: Sun. Mar 12, 2017 - 08:56 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Are you talking about the "Override Default Baudrate (-b)" 

The target is set at 1 MHz

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

-b baudrate (for RS232)

-B bitclock (ISP clock)

 


http://download.savannah.gnu.org/releases/avrdude/avrdude-doc-6.3.pdf

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No, talking about the ISP clock rate. Baud rate is the data rate between your computer and the Dragon, as far as I know. One of the command line switches sets the ISP clock rate.

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

http://savannah.spinellicreations.com/avrdude/avrdude-doc-6.3.pdf

(page 29)

4 Configuration File

...

4.1 AVRDUDE Defaults

...

default_bitclock = "default-bitclock";

Assign the default bitclock value. Can be overridden using the ‘-B’ option.

...

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have another problem now :'( I don't know whats happened :'(

Launching /usr/bin/avrdude -pm1284p -cdragon_isp -Uflash:w:testing.hex:a 
Output:
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_getsync(): timeout/error communicating with programmer (status -1)
avrdude: failed to sync with the AVR Dragon in ISP mode

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

I FIXED IT :) I rewired the circuit and added "-B10" as an argument to AVRDude

http://luniks.net/avr-debug.php 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

But what does the "-B10" argument do and what does it mean, is there any other variants or different configurations.     

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

User manual:

 

http://www.nongnu.org/avrdude/us...

 

It says:

-B bitclock

Specify the bit clock period for the JTAG interface or the ISP clock (JTAG ICE only). The value is a floating-point number in microseconds. The default value of the JTAG ICE results in about 1 microsecond bit clock period, suitable for target MCUs running at 4 MHz clock and above. Unlike certain parameters in the STK500, the JTAG ICE resets all its parameters to default values when the programming software signs off from the ICE, so for MCUs running at lower clock speeds, this parameter must be specified on the command-line. It can also be set in the configuration file by using the ’default_bitclock’ keyword.

Last Edited: Mon. Mar 13, 2017 - 09:25 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AVR Debugging on Linux (with debugWire)

http://luniks.net/avr-debug.php

1. Debugger

At the time of writing (beg. of 2016), the old and discontinued JTAGICEmkII seems to be the best supported option on Linux, so I got myself a used one of those. The current Atmel-ICE Basic doesn't seem to work at all with AVaRICE because it uses a completely different protocol. Alternatives to the JTAGICEmkII are the AVR Dragon and possibly JTAGICEmkII clones like the ones from Kee Electronics and Waveshare. While both claim to be fully compatible on Windows, there is no statement on Linux compatibility.

...

9. Start AVaRICE

The following command should do:

avarice -2 -w -Patmega328p -j usb :4242

Successfully started, AVaRICE should give the following output:

AVaRICE version 2.13svn20141210, Mar  6 2016 17:51:25

...

...

Eclipse

1. Debugging in Eclipse

 

P.S.

EDBG (Atmel-ICE) entered AVaRICE on 2016-02-29 then mEDBG in 2016-03; current is r372 on 2016-04-18.

 


https://packages.debian.org/search?keywords=AVaRICE&searchon=names&suite=all&section=all

https://sourceforge.net/p/avarice/code/commit_browser

...

[r358] Merge the jwunsch_edbg branch back to trunk.

Authored by: joerg_wunsch 2016-02-29 ...

...

via

http://avarice.sourceforge.net/

 

Edit : Title and snippets with URL, P.S.

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Mon. Mar 13, 2017 - 03:28 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So "-B10" means 10 microseconds or 100khz?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey all, 

 

Sorry for bugging yall, but I'm trying to get an avr dragon to run on linux, but it doesnt seem to be recognized (as a node i.e. /dev/ttyUSB). Could you please do me a favor and see what you get when you run this command:

 

usb-devices

 

 

This is what I get:

 

T:  Bus=01 Lev=04 Prnt=115 Port=02 Cnt=01 Dev#=118 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=ff(vend.) Sub=00 Prot=00 MxPS=16 #Cfgs=  1
P:  Vendor=03eb ProdID=2107 Rev=01.00
S:  Manufacturer=ATMEL
S:  Product=AVRDRAGON
S:  SerialNumber=XXXXXXXXX
C:  #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)

 

 

Thanks

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

lol that would be me, but i think i just found a fix so i'll update it there for anyone else.

 

Best,

Senor

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I know.  That's why I said it was a duplicate.  More accurately, this is a hijack.  Both are frowned upon.  Stick to your own thread.  Don't hijack this one, which has nothing to do with your problem.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

Last Edited: Thu. Nov 9, 2017 - 04:45 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Joey,

 

You really think it has nothing to do with The problems with the AVR Dragon on Linux? 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

senor_garbaggio wrote:
You really think it has nothing to do with The problems with the AVR Dragon on Linux? 

Don't only look at the subject line of a thread. That is much to imprecise to deem if you "have the same problem". Read the entire first post and see if the problem described fits your situation.

 

It's almost always better to start a new thread, instead of tacking your post onto an existing one. Especially so when the thread is old or oldish.

 

Regardless of that this is certainly a cross-post, which is also frowned upon.

"He used to carry his guitar in a gunny sack, or sit beneath the tree by the railroad track. Oh the engineers would see him sitting in the shade, Strumming with the rhythm that the drivers made. People passing by, they would stop and say, "Oh, my, what that little country boy could play!" [Chuck Berry]

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No point continuing this here.

Topic locked