|
SmartSnippets DA1459x SDK
|
This tool improves task debugging providing information about the stack size of a task and the heap usage. In order to be used CONFIG_RTT or CONFIG_RETARGET should be configured first.
sdk/middleware/monitoring/ and update the included headers of the project.dg_configENABLE_TASK_MONITORINGMAX_NUMBER_OF_MONITORED_TASKS defines the maximun number of all monitored tasks. Its default value is 5 and is placed in task_monitoring.h file.This tool can be used by two different ways:
The debugging information is printed in the RTT terminal, if CONFIG_RTT is set, or to UART if CONFIG_RETARGET is set.
User calls the function tm_print_tasks_status() and the debugging information is printed to the coresponding terminal.
User calls the function tm_print_registered_tasks() and the debugging information or the registered task is printed to the coresponding terminal. A task is register using the function tm_register_monitor_task(uint16_t id) where id is user defined and helps to track the output. A task is unregistered through the function tm_unregister_monitor_task()
User can determine to call the printing functions through an already created task, through a dedicated task, by a timer or even add them to OS_APP_IDLE
Both modes have the limitation that report smaller values in the stack size information for the task that calls the printing functions. The reason is that they use space from stack in order to print the debugging information.
In all task mode the reported available heap is smaller that the actual because this mode uses space from heap in order to store the debugging info of the task into heap.
1.8.16