Atmel Studio 7.0 ITM debug & SAM E5x with Atmel ICE?

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

Hi!

 

Is anyone successfully worked with ITM debug send data to Atmel ICE or at least to an J-Link. Atmel ICE is adverticed that supports SWV debug but no any documentation how to use it.

 

I tried with J-link LITE cortex m from https://community.atmel.com/foru...

 

but no success. ITM_SendChar checks if ITM is enabled

 

if (((ITM->TCR & ITM_TCR_ITMENA_Msk) != 0UL) &&      /* ITM enabled */
      ((ITM->TER & 1UL               ) != 0UL)   )     /* ITM Port #0 enabled */

 

and I don't know how to enable it.

 

tried to open the standalone SWO segger application but then Atmel studio stalls and I have to disconnect J-Link and kill atmel studio from task manager...

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

The Atmel-ICE SWV implementation was provided by a plugin to Studio from Percepio AB. The plugin is not available currently (but feel free to send them a mail and ask smiley ).

 

Since Atmel-ICE implements CMSIS-DAP, the SWO data is streamed in a custom vendor command (the implementation was made before CMSIS-DAP introduced SWO support). J-Link can of course be used using it's own SWV viewer (and I wouldn't expect it to hang at all...)

:: Morten

 

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

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

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

Hi meolsen,

 

Thank you for your message on my thread concerining ITM SWV support on Atmel ICE.

 

Although the j-link swo hanging was because atmel studio utilizes the j-link usb and i don't know where to see the swo output, j-link control panel doesnt have any swv/swo viewer button so i tried to open the swo standalone segger app but it needs full usb access and I can't use it in conjuction with atmel studio.

 

meolsen wrote:

The Atmel-ICE SWV implementation was provided by a plugin to Studio from Percepio AB. The plugin is not available currently (but feel free to send them a mail and ask smiley ).

 

Since Atmel-ICE implements CMSIS-DAP, the SWO data is streamed in a custom vendor command (the implementation was made before CMSIS-DAP introduced SWO support). J-Link can of course be used using it's own SWV viewer (and I wouldn't expect it to hang at all...)

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

Has there been any further advances on this front?

I have an Atmel JTAGICE3 and a J-Link being used with a ATSAME54P20A chip.  The pins SWO, SWDIO, SWCLK and RESET on the chip are connected to the appropriate pins of the JTAG devices as far as I can tell.  But can't seem to get anything to work at the moment.  I googled around and searched the forums, but this is the only relevant posting I could find so far.  I would love to be wrong.

 

Have also emailed Percepio AB, have not heard back yet.

 

Thanks in advance!

 

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

Hi,

 

According to feedback from SEGGER, there is an issue with clock settings (SAME7x as well SAME5x).

 

wiki.segger.com/ATSAME70

 

For most devices, the SWO clock is derived from the current MCU clock. This is also the case for the ATSAME70 series devices. However on these devices, the SWO clock source is disabled after reset and multiple sources and dividers can be selected.

Note: J-Link handles the current setting of this register automatically when calculating the SWO speed to be used. J-Link software version V6.32a or later is required.

The following settings are used:

  • SWO clock source is MCK
  • SWO clock divider is set to 14+1 assuming MCK is 150 MHz after reset and is not changed by application.

 

ATSAME54P20A SWO hangs

 

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

Thanks for the response, turns out it was the Octopus cables that came with the Atmel JTAGICE3 I was using with the Segger J-Link device.  The darned things are pinned out backwards!  I compared it to the ARM standard pinout for the Cortex-Mx  SWD connectors with the keyed pinout/shroud.  It is definitely backwards.

 

Once I reversed the pinout things started working.  J-Link does still get hung up on occasion, but I can live with that.

Thanks again for the response.