ATMEL ICE as debugger in Studio 7....?

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

Hello again.

Just wondering if anyone has had this problem?

 

I have shelled out a hundred quid on one of these Atmel ICE programmers/debugger tools.

It works as it should as a programmer, but for some reason Studio 7 won't let me use it as a debugger.

 

Under the Programming menu, it gives me two interface options: - ISP and JTAG, but all of the research I have done shows that I have to select "DebugWire", which doesn't come up as an option in Studio 7,

 

The chip is an AtMega 1284, (external clock crystal),

As I said, programming is fine, and the blinking LED test cct, works correctly, but I wanted debugging functionality,

 

Appreciate any help offered, thanks in advance.

This topic has a solution.
Last Edited: Mon. Oct 2, 2017 - 11:57 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Correction - its a 1284P, not sure if that would make any difference...

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

jezhoyland wrote:
its a 1284P

For which the datasheet says, "JTAG"

 

EDIT

 

http://www.atmel.com/images/doc8059.pdf

 

 

Last Edited: Mon. Oct 2, 2017 - 11:29 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jezhoyland wrote:
but all of the research I have done shows that I have to select "DebugWire",
Then it was bad research. The 1284(P) uses ISP for serial programming. HVPP for high voltage (recovery) programming and JTAG for programming/debugging. JTAG uses a different set of pins to ISP (which is unlike small AVRs that share debugWire on a subset of the same pins used for ISP). So you need to add a second connector to the 1284 and connecting it up for JTAG then plug the ICE into that.

 

PS although it "costs 4 pins" I would tend to ignore ISP for a 40 pin AVR all together and just connect a 10 pin header to the JTAG pins as the JTAG not only offers debug but can do everything ISP would have done anyway.

Last Edited: Mon. Oct 2, 2017 - 11:33 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jezhoyland wrote:
all of the research I have done shows that I have to select "DebugWire" ... The chip is an AtMega 1284

Really??!

 

surprise

 

The datasheet clearly says, "JTAG": http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42718-ATmega1284_Datasheet.pdf - top of page 2

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

BTW I google around a bit trying to find a schematic showing the 1284 connections for JTAG. I actually came across this:

 

https://www.olimex.com/Products/AVR/Proto/AVR-P40-8535-8MHz/resources/AVR-P40-8535-sch.gif

That's for any 40 pin AVR (not just 1284), ignore most of the diagram  but clearly, to the right of the AVR, it shows how the ISP (they call ICSP) and JTAG header connections differ.

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

You Sir, are a genius.

 

That's both enlightening and annoying, as the required pins sit right in the middle of PORT C, which I wanted to use as the 8-bit data bus to the LCD...

Looks like I'll have to use another option.

 

Thanks for the help.

 

Must admit, wasn't aware one could only use JTAG or DebugWire, not both.

 

SOLVED....

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

jezhoyland wrote:
wasn't aware one could only use JTAG or DebugWire, not both.

You can only use whatever the chip implements!

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

clawson wrote:
although it "costs 4 pins" I would tend to ignore ISP for a 40 pin AVR all together and just connect a 10 pin header to the JTAG pins as the JTAG not only offers debug but can do everything ISP would have done anyway.

Likewise.

 

If you don't have enough pins for the debug connection, then you just don't have enough pins!

 

 

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

jezhoyland wrote:
Must admit, wasn't aware one could only use JTAG or DebugWire, not both.
Atmel keep reinventing different types of debug interface (to invalidate 3rd party debugger designs? Too cynical?) so there's also things like PDI and the recent one who's name I cannot even remember. But on the whole (with the notable exception of Xmega that have two: JTAG and PDI) all the AVRs just have one OCD (On Chip Debug) system. Devices with 28 pins or less generally have the (1 wire) debugWire operating on just the _reset pin while 40+ pin devices have the (easier to use in my opinion) 4 pin JTAG interface (if they have OCD at all).