DebugWire already hacked?

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

Hello :-)

I work at job with AVR and I like them, but I hate to use them for my personal and Open Hardware projects, because I think is expensive the DebugWire tools (nor is my philosophy to use closed source hardware).

I like the cheap AVR ones, like the ATtiny25, the new ATtiny ATtiny43U and ATtiny10.

Does anyone already hacked the DebugWire protocol?

Currently I am using ARM7 because they are more powerful, and relative cheap, the same Free Software GCC compiler as AVR and they have JTAG which is very well known with Open Hardware dongles.

JPCasainho,
www.Casainho.net
.Portugal

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

Do you really think the AVR Dragon is expensive? Given usual consulting
fees, it's probably worth one hour of my time. I don't think you'll hack
the protocol within one hour...

Jörg Wunsch

Please don't send me PMs, use email if you want to approach me personally.

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

dl8dtl wrote:
Do you really think the AVR Dragon is expensive? Given usual consulting
fees, it's probably worth one hour of my time. I don't think you'll hack
the protocol within one hour...

Yes, it is expensive!! because it is not Open Hardware and Firmware, if it burns we can't repair it. At my work, we already did burn 6 AVRISPMK2, and we can't repair them not learn why they did burn, as we don't have the full schematic nor PCB layout, nor firmware.

Compare the price of AVR Dragon and a JTAG dongle, then I think AVR Dragon (and DebugWire) are expensive :-(

As example, here is one very cheap Open Hardware and Firmware JTAG dongle made with the AT90USB162:

http://code.google.com/p/opendou...

If we had the DebugWire hacked we could make a much more cheap device than that AVR Dragon, using some cheap ARM7, ARM Cortex, or AVR USB. Plus all the advantages of being Open Hardware and Firmware.

JPCasainho,
www.Casainho.net
.Portugal

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

> If we had the DebugWire hacked we could make a much more
> cheap device than that AVR Dragon.

I really question that statement, until someon proves it true -- at least the
word "much" there. Of course, it depends on the value of your time.

Jörg Wunsch

Please don't send me PMs, use email if you want to approach me personally.

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

Surely the Dragon is a loss-leader sold at least at cost if not below it? I don't believe anyone could build a clone as cheap or even cheaper.

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

dl8dtl wrote:
> If we had the DebugWire hacked we could make a much more
> cheap device than that AVR Dragon.

I really question that statement, until someon proves it true -- at least the
word "much" there. Of course, it depends on the value of your time.


Yes, my time and on Open Source projects there is normally not much money involved.

Also cheap for me means making a device using of in house devices and tools. For example, we can quick design a board and assembly it using internal components - and having the know how on that hardware and firmware would be also important, mainly when repairing.

Also that JTAG dongle I did mention, can be used for a few other tasks, like USB<->RS232, USB<->SPI and USB<->I2S, which is great for our activities.

JPCasainho,
www.Casainho.net
.Portugal

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

casainho wrote:

Quote:
At my work, we already did burn 6 AVRISPMK2 ...
Sorry to hear about this unfortunate loss. What type of projects are you working on ? I ask, because there MUST be a reason why you burn these up.

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

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

clawson wrote:
Surely the Dragon is a loss-leader sold at least at cost if not below it? I don't believe anyone could build a clone as cheap or even cheaper.

I didn't mean to build an exactly clone, it don't have to have voltage translators and protections, for example.

If we have boards in house and MCU ARM7 with USB (for $4), we can surely make a very cheap device and even reuse that hardware for other tasks.

JPCasainho,
www.Casainho.net
.Portugal

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

Plons wrote:
casainho wrote:
Quote:
At my work, we already did burn 6 AVRISPMK2 ...
Sorry to hear about this unfortunate loss. What type of projects are you working on ? I ask, because there MUST be a reason why you burn these up.

DC-DC circuits. But as I said, we couldn't repair them nor even learn why the problem.

We have many components in house, maybe we could just repair them in 5 minutes if we know the schematic and board layout.

I ended up by re-using at least the plastic case of them to make our Open Hardware AVR programmer, here is 2 pictures (at end of page):

http://code.google.com/p/avropen...

JPCasainho,
www.Casainho.net
.Portugal

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

DC-DC converters can be hard for ANY ISP-programmer. Groundcurrents (in groundloops) are the most nasty ones. I suggest you create an opto-isolated ISP-programmer to get rid of the groundloop. There are application notes on that subject.

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

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

Quote:
I like the cheap AVR ones, like (...) ATtiny10.

Well, at least for that device, you're not going to get any benefit from debugWire anyway, because according to current documentation, it doesn't support any form of in-circuit debugging.

However, its TPI programming system, as with all of Atmel's AVR programming algorithms, is openly documented.

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

I've expounded on the "problems" with ATAVRISP2 before. We have them deployed in a variety of environments, as our volumes are modest and "non technical" people use them routinely for ISP of new boards--board houses, OEMs, tame customers. Over a dozen deployed and not a "burnt up" one yet.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

Quote:
Do you really think the AVR Dragon is expensive? Given usual consulting
fees, it's probably worth one hour of my time.

Knowing your competence, you sell yourself too cheaply, Jörg. (No, no smilie there. At least as long as we are talking about the "cheaper-than-$50" AVR Dragon).

Given a broken AVR Dragon, and assuming that it would take at least one hour to let it go through a repair cycle, I could not defend spening work time to do the repair instead of just spending the $50 getting a new one. (I'm not sure, but I suspect that spending 30 minutes would be near the border-line).

For a "private" Dragon, owned by me personally for hobby activities, then that would be a different matter. The money in my wallet has a whole different value than the money I might get clearance to spend at work. Work money are before a lot of taxes. Private money is after all tax loads. (This is a rough estimate, and would depend somewhat of the "tax load" in a specific country, but for a specific amount spent out of my own wallet the comparable amount of "work money" would be the double. At least.)

Example: Using the hourly fee that Jörg implies, $50, that would be what my employer charges when he sells my services as a consultant. After cutting off overhead costs (paying for the organization that is needed to sell my services, wages to my boss, and his boss (and...), administration in general etc) and then paying my wages and costs associated with that (social security and the like), and after the income tax has hit my gross income I'd guess that maybe $20 actually gets into my pocket. With those figures I'd need to do the repair in less than one hour if I must defend that spent hour to my boss, but if my private hobby Dragon breaks I can spend between two and three hours repairing it before it does not pay off anymore.

Add to that that it is hard to defend having a couple of Dragons waiting on the shelf in case of burning the ones I'm working with at home, I have much less problem with defending that at work. A broken hobby Dragon makes the dog happy as he gets long walks until I can get a new one home. A broken Dragon at work would mean that I am wasting work time, which not only is expensive but also risks the delivery time to our customer.

Quote:
At my work, we already did burn 6 AVRISPMK2, and we can't repair them not learn why they did burn

Now there's something to work on. I agree that having the full specs (circuit and firmware) for the ISP MKII would make it easier, I just can't agree that determining the cuase of these failures is definitively impossible because of the lack of open-ness. Although I am a software guy primarily, I tend to agree with Plons that ground loops/current is a primary thing to look into.

Las comment: For Dragons there is a thread here somewhere that describes common types of failures, and tips on how to repair them. I don't have the link handy right now but a search with the correct keywords should turn it up. AFAIR the common cause is running the Dragon with a too weak power supply (eg directly from a USB port on a PC, the part that fails is a voltage regulator, and there is a procedure describing how to locate it and exchange it.You know when you've found the correct thread. It is quite long. :cool:

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"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

Johan's last comment: here is the link:
http://www.aplomb.nl/TechStuff/Dragon/Dragon.html

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

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

> Knowing your competence, you sell yourself too cheaply, Jörg.

OK, that's been just a rough estimation, with somewhat of a mixture
between private and commercial use in mind. At work, I wouldn't
want to use a Dragon at all -- with its lack of protection circuitry
and an isolating case, it's too much risk to be broken. Privately,
I'd probably spend up to a couple of hours to fix it.

Jörg Wunsch

Please don't send me PMs, use email if you want to approach me personally.

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

And a few threads threads here at 'freaks:
https://www.avrfreaks.net/index.p...
https://www.avrfreaks.net/index.p...
https://www.avrfreaks.net/index.p...
If you follow links in them, and do a few searches with search term inspired by what you read in these, you will probably find more.

After a quck browse of some of the threads, the general usage advice are

- Always attach the Dragon to a USB hub with its own power-supply (rather than a USB hub that takes it's power from the PC it is connected to). Never atttach the Dragon directly to a PC USB connector. (That last advice also give some protection from the danger of your AVR setup sending bad ohmp!(tm) to your PC).

- Never touch anything on the Dragon while it is powered or attached to the AVR setup.

As you will see in the threads I link to, the p/s of the Dragon is not the most rigidly designed one, and the most frequent way for a Dragon to fail seems to be a voltage regulator giving up when not enough current is supplied to the Dragon, or when parts of the on-board power supply is disturbed ever so gently (eg by being touched).

Consider building a "lair" for your Dragon, like Nard did.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"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

Kind of back on topic but off topic a little.

Why is DebugWire proprietary in the first place? I in no way mean that it can or should be hacked so I'm not interested in helping the OP, but I'm wondering why Atmel, with its many open source code tools, has chosen to keep DebugWire under wraps? What is the IP in this thing that's worth worrying about pirates over? Is there perhaps some way to read secure files off the chip that is an undocumented feature of DebugWire that they fear folks will discover? Keeping it secret makes me kind of nervous about such possible hacks.

Smiley

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

> Why is DebugWire proprietary in the first place?

If you look closer, all their debugging protocols are kept proprietary.
This also applies to JTAG debugging, and just appears to be their policy
(whether it makes sense or not).

I don't think debugWIRE could potentially expose anything from inside the
chip. If you compare its features against the JTAG features, you'll quickly
notice that it's essentially not much more than kind of a monitor program,
running a fixed firmware. As such, it can only access those resources that
are accessible by the CPU itself, e.g. it cannot handle fuses (unlike JTAG,
which can handle it, but it can only do so while being in programming mode).

Jörg Wunsch

Please don't send me PMs, use email if you want to approach me personally.