]> git.sur5r.net Git - freertos/blob - FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/Sample-CLI-commands.c
Final preparation for new release:
[freertos] / FreeRTOS-Plus / Demo / Common / FreeRTOS_Plus_CLI_Demos / Sample-CLI-commands.c
1 /*\r
2     FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.\r
3     All rights reserved\r
4 \r
5     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
6 \r
7     This file is part of the FreeRTOS distribution.\r
8 \r
9     FreeRTOS is free software; you can redistribute it and/or modify it under\r
10     the terms of the GNU General Public License (version 2) as published by the\r
11     Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
12 \r
13     ***************************************************************************\r
14     >>!   NOTE: The modification to the GPL is included to allow you to     !<<\r
15     >>!   distribute a combined work that includes FreeRTOS without being   !<<\r
16     >>!   obliged to provide the source code for proprietary components     !<<\r
17     >>!   outside of the FreeRTOS kernel.                                   !<<\r
18     ***************************************************************************\r
19 \r
20     FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
21     WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
22     FOR A PARTICULAR PURPOSE.  Full license text is available on the following\r
23     link: http://www.freertos.org/a00114.html\r
24 \r
25     ***************************************************************************\r
26      *                                                                       *\r
27      *    FreeRTOS provides completely free yet professionally developed,    *\r
28      *    robust, strictly quality controlled, supported, and cross          *\r
29      *    platform software that is more than just the market leader, it     *\r
30      *    is the industry's de facto standard.                               *\r
31      *                                                                       *\r
32      *    Help yourself get started quickly while simultaneously helping     *\r
33      *    to support the FreeRTOS project by purchasing a FreeRTOS           *\r
34      *    tutorial book, reference manual, or both:                          *\r
35      *    http://www.FreeRTOS.org/Documentation                              *\r
36      *                                                                       *\r
37     ***************************************************************************\r
38 \r
39     http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading\r
40     the FAQ page "My application does not run, what could be wrong?".  Have you\r
41     defined configASSERT()?\r
42 \r
43     http://www.FreeRTOS.org/support - In return for receiving this top quality\r
44     embedded software for free we request you assist our global community by\r
45     participating in the support forum.\r
46 \r
47     http://www.FreeRTOS.org/training - Investing in training allows your team to\r
48     be as productive as possible as early as possible.  Now you can receive\r
49     FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers\r
50     Ltd, and the world's leading authority on the world's leading RTOS.\r
51 \r
52     http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
53     including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
54     compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
55 \r
56     http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.\r
57     Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.\r
58 \r
59     http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High\r
60     Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
61     licenses offer ticketed support, indemnification and commercial middleware.\r
62 \r
63     http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
64     engineered and independently SIL3 certified version for use in safety and\r
65     mission critical applications that require provable dependability.\r
66 \r
67     1 tab == 4 spaces!\r
68 */\r
69 \r
70 \r
71  /******************************************************************************\r
72  *\r
73  * See the following URL for information on the commands defined in this file:\r
74  * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_UDP/Embedded_Ethernet_Examples/Ethernet_Related_CLI_Commands.shtml\r
75  *\r
76  ******************************************************************************/\r
77 \r
78 \r
79 /* FreeRTOS includes. */\r
80 #include "FreeRTOS.h"\r
81 #include "task.h"\r
82 \r
83 /* Standard includes. */\r
84 #include <stdint.h>\r
85 #include <stdio.h>\r
86 #include <stdlib.h>\r
87 #include <string.h>\r
88 \r
89 /* FreeRTOS+CLI includes. */\r
90 #include "FreeRTOS_CLI.h"\r
91 \r
92 #ifndef  configINCLUDE_TRACE_RELATED_CLI_COMMANDS\r
93         #define configINCLUDE_TRACE_RELATED_CLI_COMMANDS 0\r
94 #endif\r
95 \r
96 #ifndef configINCLUDE_QUERY_HEAP_COMMAND\r
97         #define configINCLUDE_QUERY_HEAP_COMMAND 0\r
98 #endif\r
99 \r
100 /*\r
101  * The function that registers the commands that are defined within this file.\r
102  */\r
103 void vRegisterSampleCLICommands( void );\r
104 \r
105 /*\r
106  * Implements the task-stats command.\r
107  */\r
108 static BaseType_t prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
109 \r
110 /*\r
111  * Implements the run-time-stats command.\r
112  */\r
113 #if( configGENERATE_RUN_TIME_STATS == 1 )\r
114         static BaseType_t prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
115 #endif /* configGENERATE_RUN_TIME_STATS */\r
116 \r
117 /*\r
118  * Implements the echo-three-parameters command.\r
119  */\r
120 static BaseType_t prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
121 \r
122 /*\r
123  * Implements the echo-parameters command.\r
124  */\r
125 static BaseType_t prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
126 \r
127 /*\r
128  * Implements the "query heap" command.\r
129  */\r
130 #if( configINCLUDE_QUERY_HEAP_COMMAND == 1 )\r
131         static BaseType_t prvQueryHeapCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
132 #endif\r
133 \r
134 /*\r
135  * Implements the "trace start" and "trace stop" commands;\r
136  */\r
137 #if( configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1 )\r
138         static BaseType_t prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
139 #endif\r
140 \r
141 /* Structure that defines the "task-stats" command line command.  This generates\r
142 a table that gives information on each task in the system. */\r
143 static const CLI_Command_Definition_t xTaskStats =\r
144 {\r
145         "task-stats", /* The command string to type. */\r
146         "\r\ntask-stats:\r\n Displays a table showing the state of each FreeRTOS task\r\n",\r
147         prvTaskStatsCommand, /* The function to run. */\r
148         0 /* No parameters are expected. */\r
149 };\r
150 \r
151 /* Structure that defines the "echo_3_parameters" command line command.  This\r
152 takes exactly three parameters that the command simply echos back one at a\r
153 time. */\r
154 static const CLI_Command_Definition_t xThreeParameterEcho =\r
155 {\r
156         "echo-3-parameters",\r
157         "\r\necho-3-parameters <param1> <param2> <param3>:\r\n Expects three parameters, echos each in turn\r\n",\r
158         prvThreeParameterEchoCommand, /* The function to run. */\r
159         3 /* Three parameters are expected, which can take any value. */\r
160 };\r
161 \r
162 /* Structure that defines the "echo_parameters" command line command.  This\r
163 takes a variable number of parameters that the command simply echos back one at\r
164 a time. */\r
165 static const CLI_Command_Definition_t xParameterEcho =\r
166 {\r
167         "echo-parameters",\r
168         "\r\necho-parameters <...>:\r\n Take variable number of parameters, echos each in turn\r\n",\r
169         prvParameterEchoCommand, /* The function to run. */\r
170         -1 /* The user can enter any number of commands. */\r
171 };\r
172 \r
173 #if( configGENERATE_RUN_TIME_STATS == 1 )\r
174         /* Structure that defines the "run-time-stats" command line command.   This\r
175         generates a table that shows how much run time each task has */\r
176         static const CLI_Command_Definition_t xRunTimeStats =\r
177         {\r
178                 "run-time-stats", /* The command string to type. */\r
179                 "\r\nrun-time-stats:\r\n Displays a table showing how much processing time each FreeRTOS task has used\r\n",\r
180                 prvRunTimeStatsCommand, /* The function to run. */\r
181                 0 /* No parameters are expected. */\r
182         };\r
183 #endif /* configGENERATE_RUN_TIME_STATS */\r
184 \r
185 #if( configINCLUDE_QUERY_HEAP_COMMAND == 1 )\r
186         /* Structure that defines the "query_heap" command line command. */\r
187         static const CLI_Command_Definition_t xQueryHeap =\r
188         {\r
189                 "query-heap",\r
190                 "\r\nquery-heap:\r\n Displays the free heap space, and minimum ever free heap space.\r\n",\r
191                 prvQueryHeapCommand, /* The function to run. */\r
192                 0 /* The user can enter any number of commands. */\r
193         };\r
194 #endif /* configQUERY_HEAP_COMMAND */\r
195 \r
196 #if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1\r
197         /* Structure that defines the "trace" command line command.  This takes a single\r
198         parameter, which can be either "start" or "stop". */\r
199         static const CLI_Command_Definition_t xStartStopTrace =\r
200         {\r
201                 "trace",\r
202                 "\r\ntrace [start | stop]:\r\n Starts or stops a trace recording for viewing in FreeRTOS+Trace\r\n",\r
203                 prvStartStopTraceCommand, /* The function to run. */\r
204                 1 /* One parameter is expected.  Valid values are "start" and "stop". */\r
205         };\r
206 #endif /* configINCLUDE_TRACE_RELATED_CLI_COMMANDS */\r
207 \r
208 /*-----------------------------------------------------------*/\r
209 \r
210 void vRegisterSampleCLICommands( void )\r
211 {\r
212         /* Register all the command line commands defined immediately above. */\r
213         FreeRTOS_CLIRegisterCommand( &xTaskStats );     \r
214         FreeRTOS_CLIRegisterCommand( &xThreeParameterEcho );\r
215         FreeRTOS_CLIRegisterCommand( &xParameterEcho );\r
216 \r
217         #if( configGENERATE_RUN_TIME_STATS == 1 )\r
218         {\r
219                 FreeRTOS_CLIRegisterCommand( &xRunTimeStats );\r
220         }\r
221         #endif\r
222         \r
223         #if( configINCLUDE_QUERY_HEAP_COMMAND == 1 )\r
224         {\r
225                 FreeRTOS_CLIRegisterCommand( &xQueryHeap );\r
226         }\r
227         #endif\r
228 \r
229         #if( configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1 )\r
230         {\r
231                 FreeRTOS_CLIRegisterCommand( &xStartStopTrace );\r
232         }\r
233         #endif\r
234 }\r
235 /*-----------------------------------------------------------*/\r
236 \r
237 static BaseType_t prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
238 {\r
239 const char *const pcHeader = "     State   Priority  Stack    #\r\n************************************************\r\n";\r
240 BaseType_t xSpacePadding;\r
241 \r
242         /* Remove compile time warnings about unused parameters, and check the\r
243         write buffer is not NULL.  NOTE - for simplicity, this example assumes the\r
244         write buffer length is adequate, so does not check for buffer overflows. */\r
245         ( void ) pcCommandString;\r
246         ( void ) xWriteBufferLen;\r
247         configASSERT( pcWriteBuffer );\r
248 \r
249         /* Generate a table of task stats. */\r
250         strcpy( pcWriteBuffer, "Task" );\r
251         pcWriteBuffer += strlen( pcWriteBuffer );\r
252 \r
253         /* Minus three for the null terminator and half the number of characters in\r
254         "Task" so the column lines up with the centre of the heading. */\r
255         configASSERT( configMAX_TASK_NAME_LEN > 3 );\r
256         for( xSpacePadding = strlen( "Task" ); xSpacePadding < ( configMAX_TASK_NAME_LEN - 3 ); xSpacePadding++ )\r
257         {\r
258                 /* Add a space to align columns after the task's name. */\r
259                 *pcWriteBuffer = ' ';\r
260                 pcWriteBuffer++;\r
261 \r
262                 /* Ensure always terminated. */\r
263                 *pcWriteBuffer = 0x00;\r
264         }\r
265         strcpy( pcWriteBuffer, pcHeader );\r
266         vTaskList( pcWriteBuffer + strlen( pcHeader ) );\r
267 \r
268         /* There is no more data to return after this single string, so return\r
269         pdFALSE. */\r
270         return pdFALSE;\r
271 }\r
272 /*-----------------------------------------------------------*/\r
273 \r
274 #if( configINCLUDE_QUERY_HEAP_COMMAND == 1 )\r
275 \r
276         static BaseType_t prvQueryHeapCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
277         {\r
278                 /* Remove compile time warnings about unused parameters, and check the\r
279                 write buffer is not NULL.  NOTE - for simplicity, this example assumes the\r
280                 write buffer length is adequate, so does not check for buffer overflows. */\r
281                 ( void ) pcCommandString;\r
282                 ( void ) xWriteBufferLen;\r
283                 configASSERT( pcWriteBuffer );\r
284 \r
285                 sprintf( pcWriteBuffer, "Current free heap %d bytes, minimum ever free heap %d bytes\r\n", ( int ) xPortGetFreeHeapSize(), ( int ) xPortGetMinimumEverFreeHeapSize() );\r
286 \r
287                 /* There is no more data to return after this single string, so return\r
288                 pdFALSE. */\r
289                 return pdFALSE;\r
290         }\r
291 \r
292 #endif /* configINCLUDE_QUERY_HEAP */\r
293 /*-----------------------------------------------------------*/\r
294 \r
295 #if( configGENERATE_RUN_TIME_STATS == 1 )\r
296         \r
297         static BaseType_t prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
298         {\r
299         const char * const pcHeader = "  Abs Time      % Time\r\n****************************************\r\n";\r
300         BaseType_t xSpacePadding;\r
301 \r
302                 /* Remove compile time warnings about unused parameters, and check the\r
303                 write buffer is not NULL.  NOTE - for simplicity, this example assumes the\r
304                 write buffer length is adequate, so does not check for buffer overflows. */\r
305                 ( void ) pcCommandString;\r
306                 ( void ) xWriteBufferLen;\r
307                 configASSERT( pcWriteBuffer );\r
308 \r
309                 /* Generate a table of task stats. */\r
310                 strcpy( pcWriteBuffer, "Task" );\r
311                 pcWriteBuffer += strlen( pcWriteBuffer );\r
312 \r
313                 /* Pad the string "task" with however many bytes necessary to make it the\r
314                 length of a task name.  Minus three for the null terminator and half the\r
315                 number of characters in "Task" so the column lines up with the centre of\r
316                 the heading. */\r
317                 for( xSpacePadding = strlen( "Task" ); xSpacePadding < ( configMAX_TASK_NAME_LEN - 3 ); xSpacePadding++ )\r
318                 {\r
319                         /* Add a space to align columns after the task's name. */\r
320                         *pcWriteBuffer = ' ';\r
321                         pcWriteBuffer++;\r
322 \r
323                         /* Ensure always terminated. */\r
324                         *pcWriteBuffer = 0x00;\r
325                 }\r
326 \r
327                 strcpy( pcWriteBuffer, pcHeader );\r
328                 vTaskGetRunTimeStats( pcWriteBuffer + strlen( pcHeader ) );\r
329 \r
330                 /* There is no more data to return after this single string, so return\r
331                 pdFALSE. */\r
332                 return pdFALSE;\r
333         }\r
334         \r
335 #endif /* configGENERATE_RUN_TIME_STATS */\r
336 /*-----------------------------------------------------------*/\r
337 \r
338 static BaseType_t prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
339 {\r
340 const char *pcParameter;\r
341 BaseType_t xParameterStringLength, xReturn;\r
342 static BaseType_t lParameterNumber = 0;\r
343 \r
344         /* Remove compile time warnings about unused parameters, and check the\r
345         write buffer is not NULL.  NOTE - for simplicity, this example assumes the\r
346         write buffer length is adequate, so does not check for buffer overflows. */\r
347         ( void ) pcCommandString;\r
348         ( void ) xWriteBufferLen;\r
349         configASSERT( pcWriteBuffer );\r
350 \r
351         if( lParameterNumber == 0 )\r
352         {\r
353                 /* The first time the function is called after the command has been\r
354                 entered just a header string is returned. */\r
355                 sprintf( pcWriteBuffer, "The three parameters were:\r\n" );\r
356 \r
357                 /* Next time the function is called the first parameter will be echoed\r
358                 back. */\r
359                 lParameterNumber = 1L;\r
360 \r
361                 /* There is more data to be returned as no parameters have been echoed\r
362                 back yet. */\r
363                 xReturn = pdPASS;\r
364         }\r
365         else\r
366         {\r
367                 /* Obtain the parameter string. */\r
368                 pcParameter = FreeRTOS_CLIGetParameter\r
369                                                 (\r
370                                                         pcCommandString,                /* The command string itself. */\r
371                                                         lParameterNumber,               /* Return the next parameter. */\r
372                                                         &xParameterStringLength /* Store the parameter string length. */\r
373                                                 );\r
374 \r
375                 /* Sanity check something was returned. */\r
376                 configASSERT( pcParameter );\r
377 \r
378                 /* Return the parameter string. */\r
379                 memset( pcWriteBuffer, 0x00, xWriteBufferLen );\r
380                 sprintf( pcWriteBuffer, "%d: ", ( int ) lParameterNumber );\r
381                 strncat( pcWriteBuffer, pcParameter, xParameterStringLength );\r
382                 strncat( pcWriteBuffer, "\r\n", strlen( "\r\n" ) );\r
383 \r
384                 /* If this is the last of the three parameters then there are no more\r
385                 strings to return after this one. */\r
386                 if( lParameterNumber == 3L )\r
387                 {\r
388                         /* If this is the last of the three parameters then there are no more\r
389                         strings to return after this one. */\r
390                         xReturn = pdFALSE;\r
391                         lParameterNumber = 0L;\r
392                 }\r
393                 else\r
394                 {\r
395                         /* There are more parameters to return after this one. */\r
396                         xReturn = pdTRUE;\r
397                         lParameterNumber++;\r
398                 }\r
399         }\r
400 \r
401         return xReturn;\r
402 }\r
403 /*-----------------------------------------------------------*/\r
404 \r
405 static BaseType_t prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
406 {\r
407 const char *pcParameter;\r
408 BaseType_t xParameterStringLength, xReturn;\r
409 static BaseType_t lParameterNumber = 0;\r
410 \r
411         /* Remove compile time warnings about unused parameters, and check the\r
412         write buffer is not NULL.  NOTE - for simplicity, this example assumes the\r
413         write buffer length is adequate, so does not check for buffer overflows. */\r
414         ( void ) pcCommandString;\r
415         ( void ) xWriteBufferLen;\r
416         configASSERT( pcWriteBuffer );\r
417 \r
418         if( lParameterNumber == 0 )\r
419         {\r
420                 /* The first time the function is called after the command has been\r
421                 entered just a header string is returned. */\r
422                 sprintf( pcWriteBuffer, "The parameters were:\r\n" );\r
423 \r
424                 /* Next time the function is called the first parameter will be echoed\r
425                 back. */\r
426                 lParameterNumber = 1L;\r
427 \r
428                 /* There is more data to be returned as no parameters have been echoed\r
429                 back yet. */\r
430                 xReturn = pdPASS;\r
431         }\r
432         else\r
433         {\r
434                 /* Obtain the parameter string. */\r
435                 pcParameter = FreeRTOS_CLIGetParameter\r
436                                                 (\r
437                                                         pcCommandString,                /* The command string itself. */\r
438                                                         lParameterNumber,               /* Return the next parameter. */\r
439                                                         &xParameterStringLength /* Store the parameter string length. */\r
440                                                 );\r
441 \r
442                 if( pcParameter != NULL )\r
443                 {\r
444                         /* Return the parameter string. */\r
445                         memset( pcWriteBuffer, 0x00, xWriteBufferLen );\r
446                         sprintf( pcWriteBuffer, "%d: ", ( int ) lParameterNumber );\r
447                         strncat( pcWriteBuffer, pcParameter, xParameterStringLength );\r
448                         strncat( pcWriteBuffer, "\r\n", strlen( "\r\n" ) );\r
449 \r
450                         /* There might be more parameters to return after this one. */\r
451                         xReturn = pdTRUE;\r
452                         lParameterNumber++;\r
453                 }\r
454                 else\r
455                 {\r
456                         /* No more parameters were found.  Make sure the write buffer does\r
457                         not contain a valid string. */\r
458                         pcWriteBuffer[ 0 ] = 0x00;\r
459 \r
460                         /* No more data to return. */\r
461                         xReturn = pdFALSE;\r
462 \r
463                         /* Start over the next time this command is executed. */\r
464                         lParameterNumber = 0;\r
465                 }\r
466         }\r
467 \r
468         return xReturn;\r
469 }\r
470 /*-----------------------------------------------------------*/\r
471 \r
472 #if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1\r
473 \r
474         static BaseType_t prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
475         {\r
476         const char *pcParameter;\r
477         BaseType_t lParameterStringLength;\r
478 \r
479                 /* Remove compile time warnings about unused parameters, and check the\r
480                 write buffer is not NULL.  NOTE - for simplicity, this example assumes the\r
481                 write buffer length is adequate, so does not check for buffer overflows. */\r
482                 ( void ) pcCommandString;\r
483                 ( void ) xWriteBufferLen;\r
484                 configASSERT( pcWriteBuffer );\r
485 \r
486                 /* Obtain the parameter string. */\r
487                 pcParameter = FreeRTOS_CLIGetParameter\r
488                                                 (\r
489                                                         pcCommandString,                /* The command string itself. */\r
490                                                         1,                                              /* Return the first parameter. */\r
491                                                         &lParameterStringLength /* Store the parameter string length. */\r
492                                                 );\r
493 \r
494                 /* Sanity check something was returned. */\r
495                 configASSERT( pcParameter );\r
496 \r
497                 /* There are only two valid parameter values. */\r
498                 if( strncmp( pcParameter, "start", strlen( "start" ) ) == 0 )\r
499                 {\r
500                         /* Start or restart the trace. */\r
501                         vTraceStop();\r
502                         vTraceClear();\r
503                         vTraceStart();\r
504 \r
505                         sprintf( pcWriteBuffer, "Trace recording (re)started.\r\n" );\r
506                 }\r
507                 else if( strncmp( pcParameter, "stop", strlen( "stop" ) ) == 0 )\r
508                 {\r
509                         /* End the trace, if one is running. */\r
510                         vTraceStop();\r
511                         sprintf( pcWriteBuffer, "Stopping trace recording.\r\n" );\r
512                 }\r
513                 else\r
514                 {\r
515                         sprintf( pcWriteBuffer, "Valid parameters are 'start' and 'stop'.\r\n" );\r
516                 }\r
517 \r
518                 /* There is no more data to return after this single string, so return\r
519                 pdFALSE. */\r
520                 return pdFALSE;\r
521         }\r
522 \r
523 #endif /* configINCLUDE_TRACE_RELATED_CLI_COMMANDS */\r