Tool/software: Code Composer Studio
Dear TI Support Team,
I am using CCS v7.0.0 and v6.2.0 as well. I will try to send printf like STM messages and I am using the ctools library. If I record the STM messages via "Custom System Trace" wizard then the "Trace Viewer" runs in an endless loop during the decoding of custom STM messages. The tracing of CP Tracer messages (e.g. Memory Throughput Analysis) instead works. Do you have ony idea wath is going wrong?
My code is somthing like that:
STMHandle* g_pSTMhdl = NULL;
/******************************************************************************
* Initialize STM for printf like usage.
*/
void stmPrintfOpen()
{
STMBufObj* stm_buf = NULL;
STMConfigObj stm_config;
if (g_pSTMhdl != NULL)
return;
// Initialize STM Configuration
stm_config.xmit_printf_mode = eSend_optimized; // send const string address only
stm_config.optimize_strings = true;
stm_config.STM_XportBaseAddr = STM_XPORT_BASE_ADDR;
stm_config.STM_CntlBaseAddr = STM_CONFIG_BASE_ADDR;
stm_config.STM_ChannelResolution = STM_CHAN_RESOLUTION;
stm_config.pCallBack = NULL;
g_pSTMhdl = STMXport_open(stm_buf, &stm_config);
}
/******************************************************************************
* Close STM for printf like usage.
*/
void stmPrintfClose()
{
if (g_pSTMhdl != NULL)
{
STMXport_flush(g_pSTMhdl);
STMXport_close(g_pSTMhdl);
}
g_pSTMhdl = NULL;
}
/******************************************************************************
* Example to printf like output to STM
*/
void stmPrintfTest()
{
int32_t stm_ch = 0;
int ii, jj;
stmPrintfOpen();
/***
* Example of STM based printf
*/
STMXport_printf(g_pSTMhdl, stm_ch, "%s", "C66xx STM demo - BEG LOOP" );
for (ii=0, jj=0; ii<8800; ii++)
{
if ((ii%250) == 0)
{
STMXport_putShort(g_pSTMhdl, stm_ch, (short)jj );
jj++;
}
}
STMXport_printf(g_pSTMhdl, stm_ch, "%s", "C66xx STM demo - END LOOP" );
STMXport_flush(g_pSTMhdl);
stmPrintfClose();
}
Thanks for your help.
Kind regards
Sven

