problem with debugging

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

AVR Studio was unable to start your debug session.
Please verify that the debugger is correctly attached to the target and that target power has been switched on. Also verify that the correct device and interface settings have been specified in the project.

Timestamp:    2019-06-13 16:09:29.900
Severity:        ERROR
ComponentId:    20000
StatusCode:    0

Failed to set-up tool (no context id returned).
 

This message appeared when I clicked the debug button 

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

Greetings and Welcome to AVR Freaks!

 

Several questions:

 

1) What are you using as a debugger?

 

2) Is the debugger connected to a board you are trying to debug?

 

3) Does that board have its own power? The debugger DOES NOT supply power.

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

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

thank you for your reply 

i am beginner so i did not understand your questions well. i use atmega16 and i will put some photos and i hope they will answer your questions.

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

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

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

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

The Mega16 does not appear to have any power on it.   This "debugger" might not supply power to the Mega16.  Plus the Mega16 should have the ground and AVcc pins (on the right side of the Mega16) connected to gnd and Vcc.

 

  If the Mega16 is not running from the internal RC clock, then it needs a crystal or external clock signal.  It could use a 0.1 uF power by-pass capacitor between Vcc and ground.

 

  What kind of "debugger" is this?  Are you sure that it is a debugger? Maybe it is a USBasp device programmer.   It appears to have Vcc, gnd, reset, MOSI, MISO, and SCK like a USBasp.  Most newer AVRs have "debug wire" through the reset pin and the DebugWire interface.  However, the Mega16 MAY not be one of those ICs.

 

Are you a student or a technician in a company?

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

i am sorry i was confused. i am a beginner and i am learning on my own so i was confused between debug and build the code. the one in the picture is a USB like you said.

but i have another problem here. i used the USB to burn the code on the atmega. the code is supposed to turn on a led but it did not work, and i think my connections are right. i will post a photo and i hope you can tell me what is wrong 

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

that is the code 

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

and that is the connection 

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


Hold on just a minute. The pinout of a mega16 is:

and you have:

 

So as far as I can see that is connecting to pins 6 onwards - that is MOSI, MISO, SCK, RESET, Vcc

 

As I suspected when I look at:

 

 

That is not a debugger. That is an ISP programmer and you have it connected to the ISP programming pins. I can't make out the marking as the picture is too fuzzy but I suspect it's just a fairly standard USBAsp?

 

Bottom line: you need to buy a different kind of interface to be able to connect your PC to your mega 16 for debugging. When you get such a "JTAG debugger" you will connect it to pins 24..27 (and power/reset).

 

This is the kind of interface you need:

 

https://www.ebay.co.uk/itm/New-AVR-JTAG-USB-Emulator-Debugger-Download-AVR-JTAG-ICE-Programmer-Atmega/272586180130?hash=item3f77670622:g:Jc0AAOSwGstanRI2

 

Now it could be that what is in your fuzzy pictures is such an interface? (but I don't think so). If that is the case then you have it wired up to the wrong pins on the mega16.

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

yeah i was confused. that is just a USB and i said that later in replies. thanks for your reply.

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

Well about $5..$10 should buy you a USB based JTAGICE clone. It's lucky for you that the mega16 is so old that it's one of about 10 AVR that were supported by JTAGICE so these very cheap debuggers from ebay should work for it OK.

 

And alternative *might* be the $15 "Snap" from Microchip - that should be able to JTAG debug a mega16. But some folks have been having "teething troubles" with that new debugger so it might be a while before Microchip finally get it working right with either AS7 or MPLABX.

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

There are SO many things wrong in your pictures it's hard to know where to start!

First a M16 has TWO sets of power pins,  VCC/GND, AND, AVCC/GND, both sets MUST be connected to a power source, AND both sets need a 100nf cap across the pair.

Second an LED NEEDS a series resistor to limit the current, without it, you will either burn out the LED quickly or burn out the output put driver of the port pin or BOTH!

Let me also suggest as you progress, that you not change any system fuses until you verify the change by posting here first, or you risk bricking your AVR.

Take a look at this tutorial (pdf), you may find it helpful:  http://ebook.pldworld.com/_eBook...

good luck and have fun!

 

Jim

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
get $5 free gold/silver https://www.onegold.com/join/713...