How do I probe for a JTAGICE in AVRStudio 4

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

I'm using AVR Studio 4.14 and I have a Olimex AVR-JTAG-USB which is supposedly compatible with ATJTAGICE. I can't, however, find a way to get AVR Studo 4 to probe for it or program with it.

Can someone give me a hint?

Thank you for your response.

Building my dreams!

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

Not sure what you mean by "probe for it". It should simply be a case of going to the debug menu and using "select platform and device" and set the platform to "JTAG ICE" (and possibly set the PORT drop list) and pick the AVR you plan to debug. Now when you "start debugging" the program should find the JTAG+AVR and download the code into the AVR then stop execution at the entry point.

Cliff

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

I use an ETT JTAGICE clone. It connects as COM6 via a USB port.

I normally specify the COM6 to Studio rather than letting Studio search for it. However the "Auto" search does actually find it after a little while. You alter the Studio search via Tools->Options menu

Either specify the COM# or alter the range of COM ports that Studio will attempt to communicate with.

If I use avrdude, I have to specify the correct COM#.

David.

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

clawson wrote:
Not sure what you mean by "probe for it". It should simply be a case of going to the debug menu and using "select platform and device" and set the platform to "JTAG ICE" (and possibly set the PORT drop list) and pick the AVR you plan to debug. Now when you "start debugging" the program should find the JTAG+AVR and download the code into the AVR then stop execution at the entry point.

Cliff

I performed exactly the steps you described but the 'Start Debugging' menu item remains disabled, so I guess it's not detecting it properly. It doesn't give an error either, though.

Since the JTAG devics is simply a 'dumb' serial port I assume it needs to be connected to a working JTAG port for it to be detected by AVR Studio. Correct?

Building my dreams!

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

Do you have something loaded into Studio that is debuggable? I imagine the lack of "start debugging" is because of this - there is no communication with the JTAG until you "start debugging" so it being greyed is not because it has failed to "probe" the JTAG. What might happen (assuming "start debugging" wasn't greyed) is that if you select it then it might then pop up and say "JTAG could not be found" or similar.

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

I find that connecting to the JTAGICE as programmer first is a sensible procedure. You get a status report in the programmer window.

Occasionally the JTAGICE is not detected, but more commonly the JTAGICE is there but it cannot find the Mega128 or whatever.

Cycling the power to the AVR generally restores communication.

I presume that the JTAGICE is connected via a real RS232 or a functional USB->RS232 cable. Windoze is quite capable of losing virtual serial ports. Go to Hardware manager, disable then re-enable the COM port.

David.

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

clawson wrote:
Do you have something loaded into Studio that is debuggable? I imagine the lack of "start debugging" is because of this - there is no communication with the JTAG until you "start debugging" so it being greyed is not because it has failed to "probe" the JTAG. What might happen (assuming "start debugging" wasn't greyed) is that if you select it then it might then pop up and say "JTAG could not be found" or similar.

You were right. I needed to build my project :)

It works. Thanks for the tip.

Building my dreams!

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

I wonder if anybody can help me here.
I think I may have some similar issues.
I was originally using BASCOM to program but needed to use an ICE on the ATMega128. I used a USB Programmer to enable JTD and OCD (AVR ISP on the way now). I was lead to believe the hex file generated from BASCOM could be used in the ICE but not to the extent I wanted. So I bought an avri jtag ice mk ii essentially an atmel clone.

When I try to connect in Studio 4.16 via the programmer; selecting Platform = JTAG mkii and port = USB I get a connection failed.

Can anybody shine any light on this for me.
Thanks
Graham

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

Sorry but are you trying to use the JTAGICEmkII to PROGRAM or DEBUG the AVR?

If to debug then load a file into Studio that contains symbolic debug info (though even a .hex file will do) and on the Debug menu set platform/device to "JTAGICEmkII" and "ATmega128".

When you "Start debugging" the hex/binary of the program should be programmed into the AVR and then the debugger will halt execution either at location 0x0000 (if an Asm program and probably BASIC too) or the main() entry point (if C).

Cliff

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

graham1956! wrote:

I was originally using BASCOM to program but needed to use an ICE on the ATMega128. I used a USB Programmer to enable JTD and OCD (AVR ISP on the way now).

You only need to enable the JTAGEN fuse.
Quote:
I was lead to believe the hex file generated from BASCOM could be used in the ICE but not to the extent I wanted. So I bought an avri jtag ice mk ii essentially an atmel clone.

When I try to connect in Studio 4.16 via the programmer; selecting Platform = JTAG mkii and port = USB I get a connection failed.

The genuine Atmel JTAGICE-mkII will connect via USB (or RS232 if you like). I am not aware of any working mkII clone, regardless of what Chinese website might imply.

The Mega128 will work fine with the original JTAGICE and any clones. So you should select JTAGICE and it will connect via a "pseudo" COM port, even though it has a USB connector.

I suspect you actually have a JTAGICE clone.

David.

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

David,

The one exception to that is if you paid $149 for the clone - in that case it may be the one and only clone of mkII - but it's kind of ironic that you can get a real one for that price.

Cliff

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

Hi Folks,

Firstly thanks all for the input. It turned out that the avri clone of the ATMEL JTAG ICE Mark II doesn't support 4.16 AVR Studio firmware despite the AVRI web site. I did persist with them and eventually loaded 4.15 firmware into the device and all seems to be working. I'll keep you all posted on my 'path of discovery' but for an ICE costing $116 it may well be worth the a punt.

Graham

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

Quote:

I'll keep you all posted on my 'path of discovery' but for an ICE costing $116 it may well be worth the a punt.

How many people would take that gamble to save $33 when they can buy a fully warranted, reliable, working Atmel JTAGICEmkII for $149?

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

Hi CLawson

I think you will find the real ATMEL device is closer to $300 plus p&p. ART least the ones I saw advertised. Obviously if it was $33 then your right but it's closer to $200 hence my call.

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

I think you'll find that Arrow have a 50% off offer on the JTAGICEmkII reducing it from it's normal $299 to $149

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

I agree that a full price mkII plus postage plus duties make the price of your clone attractive.

Even the special offer can be expensive.

On the other hand the genuine article will perform perfectly.

Just how well does your clone work with debugWire or regular Mega JTAG?

Do you have a link for your clone?

David.

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

graham1956! wrote:
Hi CLawson

I think you will find the real ATMEL device is closer to $300 plus p&p. ART least the ones I saw advertised. Obviously if it was $33 then your right but it's closer to $200 hence my call.

Got one a couple weeks ago from ARROW. Total price delivered to my doorstep here in the US came to $168.00 USD. That included shipping and tax. It's the non-RoHS compliant model so tree huggers may want to ante up the extra $50 or so to keep their Karma in synchronicity with Gaia.

Greg Knox

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

Hi David,
Yes I have a link
www.stkshop.com.
I can confirm the product works very well so far providing both a programmer and a debugger function.
As you may guess pretty faithful to the ATMEL literature.
Integrates well with AVR Studio 4.16 and also WIN AVR C.
Despite initial concerns the vendor is very responsive and helpful.
So no problems so far.
Rgds
Graham