readProgramCounter failed [SOLVED]

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

Hi,

I have tried write my the first program for Mega B1-Xplained board (xMega 128B1). Very simple program for LED blinking. When I try program chip - it is ok and program working.1 But when I tried debug program I have got message
"Failed to launch program
Error: The operation can not be performed with target MCU in its current state.
Debugger command readProgramCounter failed."

I have found any advices on AvrFreaks, but downgrade firmware on JtagICE or use Atmel Studio 4 - it is not for me.

I am using:
Atmel Studio 6
Atmel AVRATJtag ICE MK II
Win 8 - 64bit

Last Edited: Mon. Apr 29, 2013 - 02:43 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There have been some issue with the JTAGMk2 an AS6 from what I have read here. They may be fixed in a newer version of Studio.

When you do "Start debug and Break" have you turned off the programming window if it was still open?

Did you select the JTAG ice Mk2 as the debugging tool for your project and selected the correct debug mode? (PDI or JTAG)

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

- Yes, when I "Start debug and Break" - programming windows is closed
- Debugging tool JTAG MK2 is select - and mode PDI.
- Programming working.
- I can use SW Simulator, but HW JTAG debug is better.

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

Please try the new 6.1 release. I believe that there were some firmware fixes that may help on this issue

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

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

OK - thanks - Upgrade to 6.1 - problem with error message was solved.

- Now another small question. When I click on "Start debugging and break", start "Steps my program" and look on "Processor window". I see Cycle counter, Frequency and Stop watch not working - no values. Is it OK ? I think this data should be good for me.I need to know exactly time info.

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

Quote:

Cycle counter, Frequency and Stop watch not working

Those are only for the simulator aren't they?

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

Thanks to everybody,

Now - I can mark this post as [SOLVED]

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

Good to hear.

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)