Using vTaskGetRunTimeStats( char *pcWriteBuffer );

Hallo, I am trying to use the vTaskGetRunTimeStats to display the task execution time in a tabular form. First of all, should i call the function in the main function, like after the vTaskStartScheduler? Secondly, what then do I have to do to see the tabular format ? Because from https://www.freertos.org/rtos-run-time-stats.html , it looks like on the example picture one has to put in an ip addresss or so.

Using vTaskGetRunTimeStats( char *pcWriteBuffer );

I replied to this via email but the post didn’t show – apologies if it now shows up twice:
First of all, should i call the function in the main function, like after the vTaskStartScheduler?
No – nothing that appears vTaskStartScheduler() will ever be reached s(assuming vTaskStartScheduler() actually starts the scheduler – which will be the case unless you run out of heap when creating the idle and/or timer tasks) so it won’t execute if you put it there. It should be called from whichever task you want to print the stats.
Secondly, what then do I have to do to see the tabular format ? Because from https://www.freertos.org/rtos-run-time-stats.html , it looks like on the example picture one has to put in an ip addresss or so.
The page you link to shows how to use run-time stats in general, including how to set up the clocks. The API page for vTaskGetRunTimeStats() is here https://www.freertos.org/a00021.html#vTaskGetRunTimeStats and shows you pass in the address of the buffer into which you would like the stats to be written. That pages also shows the prerequisites of having configGENERATERUNTIMESTATS and configUSESTATSFORMATTINGFUNCTIONS defined.

Using vTaskGetRunTimeStats( char *pcWriteBuffer );

First of all, should i call the function in the main function, like after the vTaskStartScheduler?
No – nothing that appears vTaskStartScheduler() will ever be reached s(assuming vTaskStartScheduler() actually starts the scheduler – which will be the case unless you run out of heap when creating the idle and/or timer tasks) so it won’t execute if you put it there. It should be called from whichever task you want to print the stats.
Secondly, what then do I have to do to see the tabular format ? Because from https://www.freertos.org/rtos-run-time-stats.html , it looks like on the example picture one has to put in an ip addresss or so.
The page you link to shows how to use run-time stats in general, including how to set up the clocks. The API page for vTaskGetRunTimeStats() is here https://www.freertos.org/a00021.html#vTaskGetRunTimeStats and shows you pass in the address of the buffer into which you would like the stats to be written. That pages also shows the prerequisites of having configGENERATERUNTIMESTATS and configUSESTATSFORMATTINGFUNCTIONS defined.

Using vTaskGetRunTimeStats( char *pcWriteBuffer );

Richard… as it relates to this, have the stats show what CPU core is attach to what task would be good addition in multi core CPU… thanks ~~ _/) ~~~~ _/) ~~~~ _/) ~~~~ _/) ~~ Tom Lafleur On Sun, Apr 29, 2018 at 11:29 AM, Richard Barry rtel@users.sourceforge.net wrote:
I replied to this via email but the post didn’t show – apologies if it now shows up twice: First of all, should i call the function in the main function, like after the vTaskStartScheduler? No – nothing that appears vTaskStartScheduler() will ever be reached s(assuming vTaskStartScheduler() actually starts the scheduler – which will be the case unless you run out of heap when creating the idle and/or timer tasks) so it won’t execute if you put it there. It should be called from whichever task you want to print the stats. Secondly, what then do I have to do to see the tabular format ? Because from https://www.freertos.org/rtos-run-time-stats.html , it looks like on the example picture one has to put in an ip addresss or so. The page you link to shows how to use run-time stats in general, including how to set up the clocks. The API page for vTaskGetRunTimeStats() is here https://www.freertos.org/a00021.html#vTaskGetRunTimeStats and shows you pass in the address of the buffer into which you would like the stats to be written. That pages also shows the prerequisites of having configGENERATERUNTIMESTATS and configUSESTATSFORMATTINGFUNCTIONS

defined.

Using vTaskGetRunTimeStats( char *pcWriteBuffer );

https://sourceforge.net/p/freertos/discussion/382005/thread/8d6d3a1b/?limit=25#4716

Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/freertos/discussion/382005/ To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/