Does anybody have a macro file that configures the trace pins or the TIVA uCs? FWIW I am using the TM4C129DNCPDT. Debugger is JTAGJet-Trace (Signum).
At the moment I am setting the pins in my application with the function bellow (first thing called by main()).
#define TRACE_PINS (GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | \
GPIO_PIN_3 | GPIO_PIN_4)
void
TraceSet(void)
{
MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF);
//
//First open the lock and select the bits we want to modify in the GPIO commit register.
//
HWREG(GPIO_PORTF_BASE + GPIO_O_LOCK) = GPIO_LOCK_KEY;
HWREG(GPIO_PORTF_BASE + GPIO_O_CR) = 0x1;
// Set pins
MAP_GPIOPinConfigure (GPIO_PF0_TRD2);
MAP_GPIOPinConfigure (GPIO_PF1_TRD1);
MAP_GPIOPinConfigure (GPIO_PF2_TRD0);
MAP_GPIOPinConfigure (GPIO_PF3_TRCLK);
MAP_GPIOPinConfigure (GPIO_PF4_TRD3);
MAP_GPIODirModeSet(GPIO_PORTF_BASE, TRACE_PINS, GPIO_DIR_MODE_HW);
MAP_GPIOPadConfigSet(GPIO_PORTF_BASE, TRACE_PINS, GPIO_STRENGTH_2MA,
GPIO_PIN_TYPE_STD);
}
Trace clock and data lines show activity. However I am getting some weird behaviour from C-Spy (a lot of garbage along with some data that makes sense. Perhaps C-Spy expects the trace lines to be functional when the debugging session starts. IAR documentation says one should create a macro file to do so. They mention some examples (ETM_init*.mac) for some processors but none for TI's.
I would like to try the configuration with a macro file instead of in the application so I would appreciate if somebody that crafted such a macro file could share it. I may try to craft it myself based on one of the examples I found but I had rather skip what may be a time consuming endeavor if I can.
Thank you in advance for any help.