Atmel ICE Debugwire

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

Another new guy needing debugging abilities for his arduino....

 

I am trying to use debugwire to debug on an Arduino mega with an Atmel ICE and Atmel studio 7.  All of the tutorials and information I could find said that to debug over the ICSP port I just need to program the device with the programmer in ISP mode then switch it to DebugWire mode.  When I go to do that, I do not get the option for anything apart from ISP or JTAG modes.  Is there somewhere else I need to change settings for the ICE?  I did find the advanced/standard mode button and put the IDE in advanced mode; but, it shows the same options.

This topic has a solution.
Last Edited: Tue. Oct 10, 2017 - 06:36 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The mega uses JTAG, not DEbugwire so thats why you do not see it as an option

 

JIm

If you want a career with a known path - become an undertaker. Dead people don't sue! - Kartman

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB user

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

The Arduino Mega2560 has got JTAGEN fuse disabled.
If you enable the JTAG, you lose those particular Analog pins.
.
Otherwise, you should find debugging straightforward,
.
The Uno uses debugWIRE. You must break the RESET-EN solder-bridge before first use. (cut the thin copper link on the virgin solder bridge)
.
David.

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

You are probably looking at the programming dialogue (hard to tell since you've cropped your screenshot).

 

If you want to do debugging you simply have the ICE connected and select "Start debugging and break". Atmel Studio will take care of programming the DWEN, which btw will also disable ISP programming. You can start and stop debugging repeatedly. Once you're done and want the ISP enabled again, then  choose "Disable debugWire and close".

 

I would advice to read not only tutorials  or instructables etc on the web (they might be wrong, confusing or simply outdated), but to actually read the official documentation/help on the subject. Look no further than Atmels Studios Help menu. If you want to read it on the web, go here: www.atmel.com/webdoc. Go to Software, Atmel Studio, and then the Debugging section.

 

EDIT: Everything I said applied to AVR with debugWire. I read the OP sloppily and didn't notice that this was about an AVR with JTAG rather than debugWire. (The advice on reading the help still applies. Just focus on generic documentation and JTAG specifics rather than debugWire). Sorry for any confusion.

"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]

Last Edited: Tue. Oct 10, 2017 - 06:13 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JohanEkdahl wrote:
If you want to do debugging you simply have the ICE connected and select "Start debugging and break". Atmel Studio will take care of programming the DWEN, which btw will also disable ISP programming.

Johan, he says in the OP:

gordonaustin wrote:
I am trying to use debugwire to debug on an Arduino mega with an Atmel ICE and Atmel studio 7.

 

I don't believe teh Mega supports debugwire...only JTAG

 

JIm

If you want a career with a known path - become an undertaker. Dead people don't sue! - Kartman

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB user

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

Thanks! So I need to follow HanSolo's tutorial on this page? http://www.avrfreaks.net/forum/a...

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

[EDIT]This is in reply to jims post above[/EDIT]

Yup. See my EDIT in the previous post. I saw "Arduino" and my brain short-circuited on mega328 (which, as you know, has debugWire) rather than the 2560 (which, as I know, has JTAG).

 

"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]

Last Edited: Tue. Oct 10, 2017 - 06:42 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you!