FreeRTOS + tracer problem

omytea wrote on Monday, May 20, 2013:


I am trying to use tracer software from Percepio. I did some test but it seems like the recorder data did not record any context switch information. My working environment is a xilinx sp605 evaluation board. I am running FreeRTOS on a microblaze core.

The main function is like this:

int main( void )

    if (! uiTraceStart() ){  vTraceConsoleMessage(“Could not start recorder!”);    }

    traceLabel consoleLabel;
    consoleLabel = xTraceOpenLabel(“Messages”);
    vTraceUserEvent(xTraceOpenLabel(“Demo starting…”));
    vTraceUserEvent(xTraceOpenLabel(“vTraceUserEvent creates basic User Events.”));
    vTracePrintF(consoleLabel, “vTracePrintF creates advanced user events, like printf”);
    vTracePrintF(consoleLabel, “A double: %lf (should be 1.0)”, (double)1.0);

    xQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( unsigned long ) );
   vTraceSetQueueName(xQueue, “xQueue”);
    configASSERT( xQueue );

xTaskCreate( prvQueueReceiveTask, ( signed char * ) “Rx”, configMINIMAL_STACK_SIZE, NULL, mainQUEUE_RECEIVE_TASK_PRIORITY, NULL );
xTaskCreate( prvQueueSendTask, ( signed char * ) “TX”, configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL );

xLEDTimer = xTimerCreate( ( const signed char * ) “LEDTimer”, /* A text name, purely to help debugging. */
( 5000 / portTICK_RATE_MS ), /* The timer period, in this case 5000ms (5s). */
pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */
( void * ) 0, /* The ID is not used, so can be set to anything. */
vLEDTimerCallback /* The callback function that switches the LED off. */


for( ;; );

And here is my hardware port configuration

    #include “xtmrctr_l.h”

    #define HWTC_COUNT XTmrCtr_GetTimerCounterReg( XPAR_TMRCTR_0_BASEADDR, 0 )
    #define HWTC_DIVISOR 16

    #define IRQ_PRIORITY_ORDER 0  // lower IRQ priority values are more significant

When the tracer software open the memory dump binary file, it only shows user events happening in the main function but did not record anything after two task is created.

Looking forward for any suggestion. Thanks

Best regards,

rtel wrote on Monday, May 20, 2013:

I’m not in a position to be able to test this right now, but suggest you get in touch with Percepio support. There is a support email address listed on their website.