Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for vTaskList and vTaskGetRunTimeStats #1350

Closed
trlafleur opened this issue Apr 24, 2018 · 23 comments
Closed

Support for vTaskList and vTaskGetRunTimeStats #1350

trlafleur opened this issue Apr 24, 2018 · 23 comments
Labels
Status: Stale Issue is stale stage (outdated/stuck)

Comments

@trlafleur
Copy link

Will these FreeRTOS function be exposed in a future release of the Arduino code build?

vTaskList
vTaskGetRunTimeStats

@lbernstone
Copy link
Contributor

You could compile the libraries with the needed options yourself:
http://esp-idf.readthedocs.io/en/latest/api-reference/system/freertos.html#_CPPv29vTaskListPc
#1142

@wiseda51
Copy link

I've built the blink example with esp-idf and the appropriate options in sdkconfig (via make menuconfig/Component config/FreeRTOS) and the FreeRTOS options are built. But not entirely clear to me how to merge my build into the arduino-esp32 directories. Do I need to take the entire batch of archives from my project build and just overlay the archives in ../arduino-esp32/tools/sdk/lib? I tried just overlaying the libfreertos.a and get a couple of undefined symbols (_thread_local_start and _thread_local_end); not clear which archive they are in. Are there any other changes or considerations needed?

@lbernstone
Copy link
Contributor

Follow the directions in issue 1142. You must have your esp-idf repo synched to the same point that arduino-esp32 was last built at (currently f586f5e) or you may have mismatched symbols/functions. It should then just be a matter of copying the libfreertos.a archive to the lib directory. I haven't ever done this for libfreertos.a, but have replaced libesp32 and liblwip.a before.

@trlafleur
Copy link
Author

It would be nice if it just worked without having to rebuild it all when a new release is out...

@lbernstone
Copy link
Contributor

arduino-esp32 is set up for simplicity. If you are micromanaging your tasks, you should probably be using esp-idf or arduino as a component. Please close the issue if this is now working for you.

@wiseda51
Copy link

I finally got this working, there was one little trick that took a while for me to figure out, the arduino-esp32/tools/sdk/include/config/sdkconfig.h needs to be updated with the appropriate defines in the Blink/build/include/sdkconfig.h which is generated by make menuconfig. I did a diff on the files between my esp-idf Blink example build and the arduino-esp32 version and merged the appropriate debug settings:
#define CONFIG_FREERTOS_USE_TRACE_FACILITY 1
#define CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS 1
#define CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS 1
#define CONFIG_FREERTOS_RUN_TIME_STATS_USING_ESP_TIMER 1
Only the Blink/build/freertos/libfreertos.a needed to be copied to arduino-esp32/tools/sdk/lib.
vTaskList and vTaskRunTimeStats work now.

@trlafleur
Copy link
Author

trlafleur commented Apr 27, 2018

As noted in last comment, it can be made to work. It appears that in the "ESP-IDF Release v3.0, release notes" we see that Runtime stats are available in the base code. --> "FreeRTOS Runtime statistics support (configurable via menuconfig)"....

So the work is done, we just need to have a way to enable in the Arduino port with out a re-compile or modification of the base code...

@themindfactory
Copy link

maybe someone can post the libfreertos.a I am unable to create it...

@themindfactory
Copy link

Would be awesome for these to be added, more and more people spawning tasks and this info would be nice to have access to.

@stale
Copy link

stale bot commented Aug 1, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: Stale Issue is stale stage (outdated/stuck) label Aug 1, 2019
@trlafleur
Copy link
Author

is it possible to get these function exposed so one can use them under the Arduino platform...

Thanks

@stale stale bot removed the Status: Stale Issue is stale stage (outdated/stuck) label Aug 8, 2019
@lbernstone
Copy link
Contributor

Will it make more sense to you if I just say no?

@trlafleur
Copy link
Author

trlafleur commented Aug 9, 2019 via email

@atanisoft
Copy link
Collaborator

@trlafleur while it is a useful tool for some it isn't highly useful for the majority of Arduino users. I'd suggest shift to Arduino as an IDF component instead.

@trlafleur
Copy link
Author

trlafleur commented Aug 9, 2019 via email

@lbernstone
Copy link
Contributor

Profiling features require memory and cpu cycles. Most people are not willing to pay that penalty, essentially having the device in a debug mode all the time. What I can offer, is that @atanisoft has made it significantly easier to compile your own libraries (or compile from scratch every time), by making a simplified method to compile arduino as an esp-idf component in platform.io. Watch that page in the next couple months for instructions on how to do this.

@trlafleur
Copy link
Author

trlafleur commented Aug 9, 2019 via email

@trlafleur
Copy link
Author

as a minimum would consider just adding vTaskList to the Arduino release, minimal code increase...
and it's no more complicated to use as any other FreeRTOS function.

@stale
Copy link

stale bot commented Dec 2, 2019

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: Stale Issue is stale stage (outdated/stuck) label Dec 2, 2019
@davepl
Copy link

davepl commented Dec 12, 2019

Expose it!

@stale
Copy link

stale bot commented Dec 12, 2019

[STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it openin the future.

@stale stale bot removed the Status: Stale Issue is stale stage (outdated/stuck) label Dec 12, 2019
@stale
Copy link

stale bot commented Feb 10, 2020

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: Stale Issue is stale stage (outdated/stuck) label Feb 10, 2020
@stale
Copy link

stale bot commented Feb 24, 2020

[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions.

@stale stale bot closed this as completed Feb 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Stale Issue is stale stage (outdated/stuck)
Projects
None yet
Development

No branches or pull requests

6 participants