The main function is like this:
int main( void ){
prvSetupHardware(); vTraceInitTraceData();
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. */
); vTaskStartScheduler(); for( ;; );
}
And here is my hardware port configuration #elif (SELECTED_PORT == PORT_XILINX_MICROBLAZE)
#include “xtmrctr_l.h” #define HWTC_COUNT_DIRECTION DIRECTION_DECREMENTING
#define HWTC_COUNT XTmrCtr_GetTimerCounterReg( XPAR_TMRCTR_0_BASEADDR, 0 )
#define HWTC_PERIOD ( XPAR_MICROBLAZE_CORE_CLOCK_FREQ_HZ / configTICK_RATE_HZ )
#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,
Yang