How to know that how many stack size is occupied by threads

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to know that how many stack size is occupied by threads

ソリューションへジャンプ
1,289件の閲覧回数
utsavikalpesh
Contributor V

Hi,

I am working on Code warrior v10.2 and of MQX v4.0. I am working on TWR-K60D100M.

I want to know that how much stack size occupied by my task.

In my TASK_TEMPLATE_STRUCT I am writing like this for example,

// Task Idx,Function,        Stack,   Priority,   Name,        Attributes,          Param, Time Slice
{ STARTUP_TASK_IDX,        Startup_TASK,      400, 12,"Startup_TASK",    MQX_AUTO_START_TASK,0,    0 },

There is 10 thread running in my code.

But I want to know actually how much stack size is occupied by the task.

How would I come to know that my task is occupying this much of memory??Is there any way to see that??

Please help.

0 件の賞賛
返信
1 解決策
1,022件の閲覧回数
soledad
NXP Employee
NXP Employee

Hi,

You can use the Task Aware Debugging tool.

The Task Aware Debugging (TAD) Tool is a useful and powerful instrument to debug the MQX application. CodeWarrior Special and Standard editions can create and run an MQX application, but cannot run TAD.

To use TAD:

1. Debug the application in CodeWarrior using the debug button. pastedImage_0.png

2. To stop the application, use a breakpoint or use the suspend button.

3. Once the application breaks, the menu enables two options: MQX RTOS and RTCS.

The MQX menu shows information about the core and tasks running at that moment in MQX RTOS, information such as memory usage, stack usage, semaphores, mutexes, events, kernel data, errors, and so on. The RTCS menu shows information about the TCPIP stack, configuration, sockets, TCP stats, UDP stats, IP stats, and so on. Figure 11 shows both MQX RTOS and RTCS.

pastedImage_1.png

4. Go to the MQX menu and click on „Task Summary‟ option. It shows the priority, state, and the task error if any.

pastedImage_2.png

5. Go to the MQX menu and click on „Stack Usage‟ option. It also shows if an overflow happens.

pastedImage_3.png


Have a great day,
Sol

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,023件の閲覧回数
soledad
NXP Employee
NXP Employee

Hi,

You can use the Task Aware Debugging tool.

The Task Aware Debugging (TAD) Tool is a useful and powerful instrument to debug the MQX application. CodeWarrior Special and Standard editions can create and run an MQX application, but cannot run TAD.

To use TAD:

1. Debug the application in CodeWarrior using the debug button. pastedImage_0.png

2. To stop the application, use a breakpoint or use the suspend button.

3. Once the application breaks, the menu enables two options: MQX RTOS and RTCS.

The MQX menu shows information about the core and tasks running at that moment in MQX RTOS, information such as memory usage, stack usage, semaphores, mutexes, events, kernel data, errors, and so on. The RTCS menu shows information about the TCPIP stack, configuration, sockets, TCP stats, UDP stats, IP stats, and so on. Figure 11 shows both MQX RTOS and RTCS.

pastedImage_1.png

4. Go to the MQX menu and click on „Task Summary‟ option. It shows the priority, state, and the task error if any.

pastedImage_2.png

5. Go to the MQX menu and click on „Stack Usage‟ option. It also shows if an overflow happens.

pastedImage_3.png


Have a great day,
Sol

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信