DIY JTAG for ATmega2560

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

I considering for a while to buy proper JTAG in order to use it for some 8-bits AVRs (in this case ATmega2560), however the price and trouble to order it do not approve it usefulness (occasional usage for debug purposes). The second issue is that I use Linux only and using Atmel Studio is out of question.

 

The first question is related to possibility to DIY  some simple and proper JTAG for the purpose.

The second is about proper free software on Linux. Reading somewhere that JTAG protocol for Atmel MCUs is closed is not very promising.

 

Thank in advance.

This topic has a solution.
Last Edited: Fri. Dec 22, 2017 - 12:10 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

I have always found using the proper tool to do a job is much easier and gets the job done quicker.

You can use a jack knife (linux) to drive a nail (AVR), but a hammer (Windows) is the tool for the job.

YMMV

 

Of course, some people enjoy making jack knifes into hammers, and that is ok too! smiley

 

Jim

 

Mission: Improving the readiness of hams world wide : flinthillsradioinc.com

Interests: Ham Radio, Solar power, futures & currency trading - whats yours?

 

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

BTW, this is hobby for me, not a job. 

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

Don’t use AVRs then. Maybe try the SAM series that are supported with openocd and are cheaper and faster. Entry level would be the SAMD21 that also has Arduino support and a variety of other tools under the three major operating systems.

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

I'm using 8-bit AVRs long time (7 years) and have many of them in prototypes and several still not used. And they are quite proper for the prototype purposes...

 

True, ARMs are much better than any AVR... I have considered for a while some NPX with default bootloader or some without internal programming memory, however, for now, I have no intention to move up as I have no time to read extensively ARM documentation - I would prefer to continue with AVR for a bit more.

 

Anyway, the topic requirement seems to be not possible or at least not cheap.

Thank you to both.

Last Edited: Thu. Dec 21, 2017 - 02:36 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Totally agree with Kartman. I see three options for debugging "on the cheap"
.
1 follow that advice and use Cortex, not AVR. You can setup a complete debug system for a few $
.
2 consider AVR Xplained boards, all have an AVR on a board, some have a debugger (for that AVR) built in and the cheapest is about $10
.
3 go with one of the "original" AVR with JTAG (mega16, 32,64,128 etc). They can be debugged with a clone of the original JTAGICE that you can get on ebay for $5..$10

Last Edited: Thu. Dec 21, 2017 - 02:57 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

mcp601 wrote:
I have no time to read extensively ARM documentation

But you do have time to mess about with trying to make your own JTAG adaptor ?!

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

mcp601 wrote:
BTW, this is hobby for me, not a job.

Even so, for any hobby you will have to make some outlay for "tools & materials"

 

https://www.avrfreaks.net/comment...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

PS regarding option 3. If this is about "DIY" then you can build it not buy it. I seem to remember the design is based around a mega16 itself.

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

awneil wrote:

But you do have time to mess about with trying to make your own JTAG adaptor ?!

 

I see no point for such cynical comment.

Few hours in homemade PCB against few months in reading ARM documentations?

 

if proper DIY JTAG is possible to create, for me, choice is strait forward and more than obvious... 

 

Thank you clawson, for JTAGICE clone suggestion, I will certainly look for it.

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

mcp601 wrote:
The first question is related to possibility to DIY  some simple and proper JTAG for the purpose.
It's possible with an instance in

LuRa

HappyJTAG2

http://www.lura.sk/?&LP=111EN&MP=4&ML=3&PO=%27%27

for mega2651 (etc), Windows, and AVR Studio 4.

 

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

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

Hmmm...

 

If old AVR Studio can run on Linux through wine, suggested clones could be solution.

Even I'm not particularly happy to install wine, it is certainly worth to try.

 

Thank you to all.

 

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

You can use Eclipse+avr-gdb+avarice, no need for Studio+wine

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

Thank you.