Question about JTAG for SAMA5D4 Xplained

Moderator: nferre

mbutko
Posts: 4
Joined: Wed Dec 30, 2015 9:07 am

Question about JTAG for SAMA5D4 Xplained

Wed Dec 30, 2015 8:12 pm

Hi everyone!
I bought SAMA5D4 Xplained and SAM-ICE JTAG debugger. I have tried to start work with JTAG via Linux, but JLINKGDBserver could not connect to device. I am beginner in this. I found this solution but I am not sure that it is correct.

http://atmel.force.com/support/articles ... -interface

"Send the '#' character. You will see then the prompt '>' character sent by the device (indicating that the Standard SAM-BA Monitor is running)"

Is it the same for SAMA5D4 Xplained?

According to this http://www.datasheetspdf.com/mobile/830 ... 31.pdf?p=8

"If any other character is received, the secure ROM code starts the standard SAM-BA monitor, locks access to the ROM
memory, and enables the JTAG."

Does it not disable access to TrustZone?

Best regards.
tsvoipio
Posts: 56
Joined: Wed Aug 19, 2015 9:44 pm

Re: Question about JTAG for SAMA5D4 Xplained

Wed Dec 30, 2015 11:01 pm

At least in the SAM4 Xplained kit the JTAG interface kit is a JLink, but the protocol is different from the standard units. I stopped analyzing at differing USB endpoints.

In my case, it made the kit unusable.

--

-TV
mbutko
Posts: 4
Joined: Wed Dec 30, 2015 9:07 am

Re: Question about JTAG for SAMA5D4 Xplained

Thu Dec 31, 2015 6:09 pm

As i know, JTAG on SAMA5D4 is supported only by Atmel Studio, but Atmel Studio is only for Windows. I was planning debugging of Linux kernel by JTAG, but Eclipse support only SAM-ICE. I have tried doing according to this reference linux4sam/bin/view/Linux4SAM/AT91BootstrapDebugEclipse but without success.
Could you explain about 'unusable'? Does it mean that after sending '#' character , SAMA5D4 stops responding to any requests?
blue_z
Location: USA
Posts: 2093
Joined: Thu Apr 19, 2007 10:15 pm

Re: Question about JTAG for SAMA5D4 Xplained

Thu Dec 31, 2015 10:27 pm

mbutko wrote:I bought SAMA5D4 Xplained and SAM-ICE JTAG debugger. I have tried to start work with JTAG via Linux, but JLINKGDBserver could not connect to device. I am beginner in this. I found this solution but I am not sure that it is correct.

http://atmel.force.com/support/articles ... -interface
If you want to use JTAG, then that's not the solution. As the article title clearly states, that's for running the SAM-BA application program on the host PC.

Regards
tsvoipio
Posts: 56
Joined: Wed Aug 19, 2015 9:44 pm

Re: Question about JTAG for SAMA5D4 Xplained

Fri Jan 01, 2016 3:51 pm

mbutko wrote:
Could you explain about 'unusable'? Does it mean that after sending '#' character , SAMA5D4 stops responding to any requests?
By 'unusable' I mean that the kit flew to trash, and I had to make an own card with an AT91SAM4SD32, and run it with the GNU ARM toolset and OpenOCD. I used an Amontec JTAGKey USB-to-JTAG dongle, but the other dongles supported by OpenOCD should do.

It seems to me that Atmel has purposedly changed the JTAG control USB protocol to lock out other toolsets.
It is a pity, the Atmel toolset and libraries are monstrous, I've been far better off using own code only.

The # character has nothing to do with JTAG. It is to control the ROM code running the Atmel monitor program.

--

-TV
mbutko
Posts: 4
Joined: Wed Dec 30, 2015 9:07 am

Re: Question about JTAG for SAMA5D4 Xplained

Sun Jan 10, 2016 6:18 pm

Thanks for everyone. JTAG is working. I sent '#' as was in description. But I am not sure that it helped, because this reference linux4sam/bin/view/Linux4SAM/AT91BootstrapDebugEclipse is outdated and because of this I couldn't launch JTAG. Issues were with JLinkGDBserver, because it was necessary to use correct device name. I thought that a device name is defined by JTAG.
tsvoipio
Posts: 56
Joined: Wed Aug 19, 2015 9:44 pm

Re: Question about JTAG for SAMA5D4 Xplained

Sun Jan 10, 2016 6:29 pm

It seems that you're still mixing JTAG and SAM-BA monitor on chip.

The hash (#) is the command character for SAM-BA. There is a Linux program for commanding SAM-BA, see <http://www.atmel.com/images/atmel-42328 ... an8995.pdf>.

To use GDB, you need a JTAG handler which knows the GDB remote protocol, e.g. OpenOCD. The problem here is the JLink protocol bastardized by Atmel on the demo boards, so that OpenOCD does not have a functioning driver for it.

--

-TV
mbutko
Posts: 4
Joined: Wed Dec 30, 2015 9:07 am

Re: Question about JTAG for SAMA5D4 Xplained

Mon Jan 11, 2016 8:12 pm

No I just began to debug AT91bootstrap. The problem was that i could not to launch JTAG and I was afraid that my SAM-ICE was broke. I worked with JTAG 8 ago and it was with AVR microcontrollers. To enable JTAG in AVR is needed to set some FUSE bits. I suspected that with SAMA5D4 is something similar.
I can debug now with JTAG, but SAM-BA can not find JTAG. I read that SAM-BA for Linux do not work with JTAG.
As i know EDGB is supported by OpenOCD, but i do not try yet. I only began to investigate this board and ARM.
BobDyer
Posts: 1
Joined: Fri Jan 22, 2016 6:15 pm

Re: Question about JTAG for SAMA5D4 Xplained

Fri Jan 22, 2016 6:46 pm

JTAG on SAMA5D4 is supported only by Atmel Studio, but Atmel Studio is only for Windows.
I was planning debugging of Linux kernel by JTAG, but Eclipse support only SAM-ICE.
Could you explain about 'unusable'? Does it mean that after sending '#' character , SAMA5D4 stops responding to any requests?

printed circuit board assembly
Last edited by BobDyer on Thu Feb 04, 2016 7:07 pm, edited 1 time in total.
tsvoipio
Posts: 56
Joined: Wed Aug 19, 2015 9:44 pm

Re: Question about JTAG for SAMA5D4 Xplained

Fri Jan 22, 2016 7:49 pm

BobDyer, if you're asking me, here's the old response:

By 'unusable' I mean that the kit flew to trash, and I had to make an own card with an AT91SAM4SD32, and run it with the GNU ARM toolset and OpenOCD. I used an Amontec JTAGKey USB-to-JTAG dongle, but the other dongles supported by OpenOCD should do.

It seems to me that Atmel has purposedly changed the JTAG control USB protocol to lock out other toolsets.
It is a pity, the Atmel toolset and libraries are monstrous, I've been far better off using own code only.

The # character has nothing to do with JTAG. It is to control the ROM code running the Atmel monitor program.

--

-TV

Return to “SAMA5-based”

Who is online

Users browsing this forum: No registered users and 4 guests