JTAGICE3 + AS5: no downloads or execution breaks

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

Using JTAGICE3 with AS5. Both have latest updates. My target is mega328p on an Arduino Uno. I'm able to develop and download programs from AS5 after adding an External Tool button that launches avrdude.exe. That works reliably.

When I try to use the JTAGICE3 I'm running into 2 main problems:

1. Code images are not being written to the target even tho the "Writing" status message at the bottom is error-free. The AS5 app log shows no obvious error msgs either but it's a bunch of low-level debug info so who knows. After J write attempts, the target always executes the last image I loaded with avrdude.

2. Breakpoints, single step, and any other command/conditions fail to stop execution other than a manual pause or stop command via the AS5 UI. Once stopped watch and other debug features that have to peek at the target's memory work fine.

So I figure what's common between both issues is a lack of JTAGICE3's ability to write to the target's memory (i.e. target code images are not being written, and sw breakpoint instructions are apparently not being written)

Atmel support so far has not provided a solution but I'm still corresponding with them (at 2 days between responses it slooow going). They suggested I verify using -O1 optimization and -g2 debug levels (which I am using). They also suggested I verify several fuse and lockbits (below) if debugWIRE wasn't working at all but as far as I can see they are fine. I'm able to get into and out of debugWIRE mode fine.

LB and BLB0 = NO_LOCK.
BLB1 = LPM_SPM_DISABLE
BODLEVEL=2V7
SPIEN, EESAVE, BOOTRST=checked. BOOTSZ=256W_3F00
Fuse Register EXTENDED=0xFD, HIGH=0xD6, LOW=0xFF

Any suggestions for narrowing this down? (assuming it isn't an outright AS5 and/or JTAGICE3 defect)

Chris

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

I think Dean is our S5/JTAGIII guru. At least HIS works.

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

Quote:

I think Dean is our S5/JTAGIII guru. At least HIS works.

You're joking right? I haven't been able to debug for a year - my MK3 is only good for debugging AVR32 apps built through AS5 (refuses to work with my external makefile built ones) and programming AVR8s since it won't debug those at all. Progress?

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

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

abcminiuser wrote:
I haven't been able to debug for a year...

So unless there is a fix for this, it sounds like I'll be returning the mk3. Over the years I've developed very little patience for using crappy products. I should have guessed after seeing how lean and disorganized the "user guide" was.

If you don't mind my asking, what debug/emulation tools do you use for 8-bit AVRs?

Chris

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

Quote:
If you don't mind my asking, what debug/emulation tools do you use for 8-bit AVRs?

Well, I USED to use my JTAG to OCD my code, but since I've returned from Atmel I've been making do with serial ports and cursing. My own fault there; I haven't re-installed AS4 since my JTAG-MKII is on loan and I haven't got the desk space for my AVR ONE! at the moment.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

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

I guess Atmel needs to come out with one more service pack for Studio 4 to add support for the latest devices which are only in S5 AND add support for jtagmk3.
On another scary note, I noticed that some of the supply outlets had run out of jtagmkIIs but had plenty of mkIII's in stock. Hope Atmel isn't discontinuing the mkII to promote the MK3. (at $100 cheaper I wish the mk3 worked correctly and on s4!)

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

Quote:

one more service pack for Studio 4

but will they? - that would be admitting what a turkey AS5 is ;-)

(BTW the Atmel store (at least) refers to the new device as JTAGICE3 rather than JTAGICEmkIII - I guess that is to prevent confusion when it comes to counting 'I's ?)

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

Wow, Atmel has really screwed up. As a new AVR developer using AS5 and preparing to return the it-doesn't-work-as-advertised JTAGICE3 unit, I'll have to decide which way to go now. I could stumble by without an emulator for awhile but that's a huge step backwards.

Does anyone have inside contacts at Atmel who know what kind of fixes are in the works? (before I decide to ditch them as a supplier)

Thanks,
Chris

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

hi microguy,
did u change the optimization level to none (-O0) and try that? Generally if the breakpoint doesn't work means it could be a problem of optimization.
Why can't u try 'start without debugging' to program the device?

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

u can post ur test code here.. if the breakpoint is placed inside the condition which is not at all satisfied, then u cant expect the execution to stop at the breakpoint..

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

micky2 wrote:
did u change the optimization level to none (-O0) and try that?

Atmel recommended -01 and -g2. They don't work. I have also tried no optimization and still no loading or debug breakpoints.
micky2 wrote:
Why can't u try 'start without debugging' to program the device?

I did, it makes no difference. The "Write" message @ the bottom looks good but the code is still not loaded. avrdude loads the same code fine.
micky2 wrote:
if the breakpoint is placed inside the condition which is not at all satisfied, then u cant expect the execution to stop at the breakpoint..

Obviously. Even a breakpoint at one of the first lines of code in main() fails to stop.

This is apparently a common problem so I'm not going to waste any more time on it. Will probably return the JTAGICE3 on Monday.

With as slow as it takes to get answers out of Atmel ("72 hours" per request), it feels like they are busy focusing on their highest volume customers and just don't have time to cultivate new ones.