Pages: [1]   Go Down
Author Topic: JTAG Debugging  (Read 7654 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 2
Posts: 125
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am very excited to finally see the Due in the wild. I am eagerly looking for its soulmate, the JTAG debugger. What are our options for debugging 96kb of code? Can we use low-cost debuggers like the LPC-LINKs or are Atmel's programmers like the JTAGICE II our only choice?
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8530
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The LPC-LINK is great, the 10-pin header on the Due looks like it has the same pinout, I doubt the LPC debugger would work but something similar would be nice.

Arduino really has to enter the world of real debuggers now, Serial.print()ing is for the birds.

_____
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 627
Posts: 34229
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Arduino really has to enter the world of real debuggers now, Serial.print()ing is for the birds.
Well stood me in good stead for over 40 years, but then if you don't understand what you are doing then JTAG might be the answer.  smiley
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8530
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Well stood me in good stead for over 40 years,
Likewise (well more like 30 years), but lately I've been using the LPC Xpressos and having a real debugger has been fantastic. I still use their equivalent of Serial.print() but being able to stop and view array contents, control registers etc is great.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Forum Administrator
Offline Offline
God Member
*****
Karma: 52
Posts: 646
I find plain exciting
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

there is a JTAG connector (unpopulated) and an SWD connector.

Anything that does SWD and supports the SAM3X will work.
I tested (albeit not fully) the http://www.blacksphere.co.nz/main/blackmagic the author added support for the SAM3X
as soon as we have finished testing we'll report back.

or you can solder a JTAG connector on the PCB and use the atmel dongle

m
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8530
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Massimo, sounds good.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

0
Offline Offline
Full Member
***
Karma: 2
Posts: 125
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If I understand correctly, to use the JTAGICE II or up, you have to use it through Atmel Studio and there are no cheap clones available. What application would we use with our own JTAG debugger to debug with the Arduino IDE? And you need all source code in order to debug, correct?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

For other ARM devices there is the possibility to use a OpenOCD compatible jtag adapter, and then use a gdb client to step the code.
I'm not sure what jtag device would work on this Atmel device thou.
Logged

Offline Offline
Full Member
***
Karma: 9
Posts: 116
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I am interested in an ftdi ft2232H based dongle using openocd. These ftdi chips have an hw usb to jtag/swd converter, I expect this approach to be very simple and robust.

It is however not clear to me how stable openocd's swd support is. But there is always the alternative of using the due's full jtag connector.

I consider this one http://dangerousprototypes.com/docs/Bus_Blaster. If someone has experience with this dongle or succeeds to use it (or another ftdi based dongle)  with the due I'd be happy to know about it.
Logged

Germany
Offline Offline
Full Member
***
Karma: 10
Posts: 230
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Did someone tested this one?

https://github.com/balau/JTAGduino
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 26
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

there is a JTAG connector (unpopulated) and an SWD connector.

Anything that does SWD and supports the SAM3X will work.
I tested (albeit not fully) the http://www.blacksphere.co.nz/main/blackmagic the author added support for the SAM3X
as soon as we have finished testing we'll report back.

or you can solder a JTAG connector on the PCB and use the atmel dongle

m


Hi Massimo,
Have you had a chance to get the BMPM working with the Due yet?

Thanks,
Greg
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 57
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a question for Massimo (or anyone who knows the answer I guess)
-just got my Arduino Due today, and I'm wondering if anyone can suggest some good HW and SW that will allow me to debug with JTAG?
for example, would the Black Magic probe and OpenOCD work with the Due?
Logged

Venezuela
Offline Offline
God Member
*****
Karma: 17
Posts: 522
Ground, ground, always ground
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello eriknyquist,

I got one SAM-ICE JTAG directly from Atmel for debugging Due (after Atmel tech. support recommendation).

http://store.atmel.com/PartDetail.aspx?q=p:10500253#tc:description

 I haven't used recently but I debugged a couple of sample projects in my Due with Atmel Studio 6 IDE, and it worked OK. I also ran the diagnostics tools J-Flash ARM v4.56d and J-Link ARM v4.56, and also ran OK. I even made debugging tests on my SAM3X-EK and no problem. The only problem is that SAMICE is very expensive (~$100) and you will need the cable ARM-JTAG-20-10 (~$7) for the 0.05" connector.

http://microcontrollershop.com/product_info.php?products_id=4650

If you are lucky, you can buy one cheaper on Ebay. If you are a developer, it worth the price.

I think is good for you to know that SAM3X8E (Due) doesn't have instruction trace capability (I mean, it doesn't handle the debugging instruction trace module: Embedded Trace Macrocell (ETM) available in its Cortex-M3 core, but it does fully support all other ARM CoreSight features through Serial Wire Viewer.

There is a second option: J-Link by Segger. It costs a bit less (~$63).

http://www.newark.com/jsp/search/productdetail.jsp?SKU=65T6120&CMP=KNC-GPLA&mckv=|pcrid|20115695421|plid|

Regarding Massimo's solution, I don't know but it seems to be less expensive. Good luck!
Logged

Pages: [1]   Go Up
Jump to: