ITM tracing for SAMV71Q21B
I read the section "Trace Capabilities" from the "CrossWorks for ARM Reference Manual" which suggests several steps to get the ITM tracing working on my processor.
I've also been reading the "SAM-E70-S70-V70-V71-Family-Data-Sheet" which has a section "16.7.7.1 How to Configure the ITM" This suggests that this chip should be able to support ITM tracing on the SWO pin, and I presume this can be done with the Cross connect Classic with the SWD adapter.
So I set the Trace Interface Type to SWO, and adjusted the Trace Clock Speed to my CPU clock frequency, and tried debugging. This has produced the error: "SWO tracing not supported" I assume this is because there is no Trace Initialize Script assigned in my project settings.
I've also dug into the chip support package and can't find an example of how this script should be set up.
So I suppose what I am suggesting as a new feature is either documentation on how to create a Trace Initialize Script, or what would suit me just as well would be an implementation of this script for the SAMV71Q21B processor.
-
SWO tracing is not supported by the CrossConnect Classic.
It is however supported by the CrossConnect Neo and SEGGER J-Link debug interfaces.
Using the current CrossWorks for ARM 5.0.2 release, I've just done the following to enable SWO tracing using these debug interfaces:
1. Modified the EnableTrace() function in the SAM_V_Target.js target script to be:
function EnableTrace(traceInterfaceType)
{
var PMC_SCER_ADDR = 0x400E0600;
var PMC_PCK3_ADDR = 0x400E064C;
var PMC_WPMR_ADDR = 0x400E06E4;
// Disable PMC write protection
TargetInterface.pokeWord(PMC_WPMR_ADDR, 0x504D4300);
// Set ETM clock (PCK3) to 10MHz (MCK / 15)
TargetInterface.pokeWord(PMC_PCK3_ADDR, 0xE4);
// Enable ETM clock (PCK3)
TargetInterface.pokeWord(PMC_SCER_ADDR, 1 << 11);
}2. Set the Debug > Target Trace > Trace Clock Speed project property to 10000000Hz
3. Set the Debug > Target Trace > Trace Interface Type project property to SWO
Please sign in to leave a comment.
Comments
1 comment