The simply blinky demo is implemented and described in main_blinky.c. The more \r
comprehensive test and demo application is implemented and described in \r
main_full.c. */\r
-#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 0\r
+#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 1\r
\r
/*\r
* main_blinky() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.\r
\r
/*-----------------------------------------------------------*/\r
\r
-\r
int main( void )\r
{\r
/* Initialise the trace recorder and create the label used to post user\r
events to the trace recording on each tick interrupt. */\r
vTraceInitTraceData();\r
- printf( "Trace started. Hit a key to dump trace file to disk. Note stdin does not work when using the Eclipse console with MingW.\r\n" );\r
- fflush( stdout );\r
-\r
xTickTraceUserEvent = xTraceOpenLabel( "tick" );\r
\r
/* Start the trace recording - the recording is written to a file if\r
configASSERT() is called. */\r
+ printf( "\r\nTrace started. Hit a key to dump trace file to disk (does not work from Eclipse console).\r\n" );\r
+ fflush( stdout );\r
uiTraceStart();\r
\r
/* The mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is described at the top\r
memory allocated by the kernel to any task that has since been deleted. */\r
\r
/* The trace can be stopped with any key press. */\r
- if( kbhit() != pdFALSE )\r
+ if( _kbhit() != pdFALSE )\r
{\r
if( xTraceRunning == pdTRUE )\r
{\r
\r
void vAssertCalled( unsigned long ulLine, const char * const pcFileName )\r
{\r
+static portBASE_TYPE xPrinted = pdFALSE;\r
+\r
/* Parameters are not used. */\r
( void ) ulLine;\r
( void ) pcFileName;\r
__asm volatile( "int $3" );\r
\r
/* Stop the trace recording. */\r
- if( xTraceRunning == pdTRUE )\r
+ if( xPrinted == pdFALSE )\r
{\r
+ xPrinted = pdTRUE;\r
+ if( xTraceRunning == pdTRUE )\r
+ {\r
vTraceStop();\r
prvSaveTraceFile();\r
+ }\r
}\r
\r
taskENABLE_INTERRUPTS();\r
fwrite( RecorderDataPtr, sizeof( RecorderDataType ), 1, pxOutputFile );\r
fclose( pxOutputFile );\r
printf( "\r\nTrace output saved to Trace.dump\r\n" );\r
- fflush( stdout );\r
}\r
else\r
{\r
printf( "\r\nFailed to create trace dump file\r\n" );\r
- fflush( stdout );\r
}\r
}\r