# Simple tracing code utility for RTOS task and kernel objects

**URL:** <https://forums.freertos.org/t/simple-tracing-code-utility-for-rtos-task-and-kernel-objects/15313>\
**Category:** Kernel\
**Created:** [June 23, 2022, 4:13pm UTC](https://forums.freertos.org/t/simple-tracing-code-utility-for-rtos-task-and-kernel-objects/15313 "2022-06-23T16:13:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pra18](https://avatars.discourse-cdn.com/v4/letter/p/7bcc69/32.png) [@pra18](https://forums.freertos.org/u/pra18)\
**Post date:** [June 23, 2022, 4:13pm UTC](https://forums.freertos.org/t/simple-tracing-code-utility-for-rtos-task-and-kernel-objects/15313/1 "2022-06-23T16:13:23Z")

</div>

Hi

After a port of freeRTOS , looking now for a simple RTOs tracing/log utility code which will provide RTOS tracing information on task and other kernel objects.  
to run it along with the ported freertos code. Presently we only know about enabling in config.h the macros like #define configUSE\_TRACE\_FACILITY to 1 and #define configGENERATE\_RUN\_TIME\_STATS 1

any example will be of much help ,

Thanks  
Pra

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [June 23, 2022, 4:51pm UTC](https://forums.freertos.org/t/simple-tracing-code-utility-for-rtos-task-and-kernel-objects/15313/2 "2022-06-23T16:51:06Z")

</div>

This page may be out of date but you can go to the Percepio website directly: [FreeRTOS+Trace from Percepio is a sophisticated diagnostic tool for FreeRTOS](https://www.freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_Trace/FreeRTOS_Plus_Trace.html)

---

<div class="post-metadata">

**Author:** ![pra18](https://avatars.discourse-cdn.com/v4/letter/p/7bcc69/32.png) [@pra18](https://forums.freertos.org/u/pra18)\
**Post date:** [June 24, 2022, 5:32am UTC](https://forums.freertos.org/t/simple-tracing-code-utility-for-rtos-task-and-kernel-objects/15313/3 "2022-06-24T05:32:48Z")

</div>

Thank you for the information,

As its a separate tool working in sync with freeRTOS, looking for something that co exist as a .c/.h file ( I understand it will be not a part of freertos kernel code) within a demo application that exercises major kernel objects and tasks via some sprintf s

Is there any tracing sample code in the demo applications of any native microcontroller so we can consider and quickly adapt it.

Thanks,  
Pra

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [June 24, 2022, 6:00am UTC](https://forums.freertos.org/t/simple-tracing-code-utility-for-rtos-task-and-kernel-objects/15313/4 "2022-06-24T06:00:56Z")

</div>

> [@pra18](#):
>
> within a demo application that exercises major kernel objects and tasks via some sprintf s

What do you want to achieve? Do you want to get timing and other detailed information in a GUI like Tracelyzer shows or do you want to just exercise FreeRTOS objects to test your port?

---

<div class="post-metadata">

**Author:** ![pra18](https://avatars.discourse-cdn.com/v4/letter/p/7bcc69/32.png) [@pra18](https://forums.freertos.org/u/pra18)\
**Post date:** [June 24, 2022, 6:10am UTC](https://forums.freertos.org/t/simple-tracing-code-utility-for-rtos-task-and-kernel-objects/15313/5 "2022-06-24T06:10:44Z")

</div>

just exercise FreeRTOS objects to test the port by a minimal trace code that will run along with the demo application and exercise task/ kernel objects and collect status information and show in a console.

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [June 24, 2022, 6:13am UTC](https://forums.freertos.org/t/simple-tracing-code-utility-for-rtos-task-and-kernel-objects/15313/6 "2022-06-24T06:13:34Z")

</div>

You can use the tests available in the [FreeRTOS/FreeRTOS](https://github.com/FreeRTOS/FreeRTOS) repo. This readme explains how to use them in your project - [FreeRTOS/README.md at main · FreeRTOS/FreeRTOS · GitHub](https://github.com/FreeRTOS/FreeRTOS/blob/main/FreeRTOS/Demo/ThirdParty/Template/README.md)

---

<div class="post-metadata">

**Author:** ![pra18](https://avatars.discourse-cdn.com/v4/letter/p/7bcc69/32.png) [@pra18](https://forums.freertos.org/u/pra18)\
**Post date:** [June 24, 2022, 6:14am UTC](https://forums.freertos.org/t/simple-tracing-code-utility-for-rtos-task-and-kernel-objects/15313/7 "2022-06-24T06:14:16Z")

</div>

just forgot that firstly precondition scenario like in config.h , some tracing macros like configUSE\_TRACE\_FACILITY and #define configGENERATE\_RUN\_TIME\_STATS will be enabled and then, this tracing code will collectively run as part of the application.
