FTDI Community

General Category => Discussion - Software => Topic started by: KTrenholm on October 21, 2021, 09:27:53 PM

Title: Vinculum II IDE: Thread Manager Does Not Show Max Stack Usage?
Post by: KTrenholm on October 21, 2021, 09:27:53 PM
Hello,

I'm debugging a project in the Vinculum II IDE using a V2EVAL kit with the VNC2 48-pin Daughterboard.
I notice that the Thread Manager window has a column for Peak Stack (Bytes), but it is not populating with any information (all other columns show data, including Current Stack).

Has anyone come across this before?  Something I need to set somewhere maybe?

Thanks!
Title: Re: Vinculum II IDE: Thread Manager Does Not Show Max Stack Usage?
Post by: FTDI Community on October 25, 2021, 10:02:32 AM
Hi,
Can you provide some screen shots of the issue you are seeing? 
Build settings (Debug/Release) ?   
How big are the stacks for each thread?
Maybe the scheduler has not started? That would need to be running to get the thread manager to show information.
Does it have the current stack size listed?

Regards
FTDI Community
Title: Re: Vinculum II IDE: Thread Manager Does Not Show Max Stack Usage?
Post by: KTrenholm on October 25, 2021, 02:29:09 PM
Hi,
Can you provide some screen shots of the issue you are seeing? 
Build settings (Debug/Release) ?   
How big are the stacks for each thread?
Maybe the scheduler has not started? That would need to be running to get the thread manager to show information.
Does it have the current stack size listed?

Regards
FTDI Community

- Build is set for Debug.
- I have 5 application threads, configured as follows:
Code: [Select]
tcbSETUP = vos_create_thread_ex(25, 1024, setup, "Setup", 0);
tcbUART = vos_create_thread_ex(24, 1024, UART, "UART", 0);
tcbBOOTL = vos_create_thread_ex(24, 2048, BOOTL, "BOOTLOAD", 0);
tcbBOMS_RD = vos_create_thread_ex(25, 2048, BOMS_RD, "BOMSRead", 0);
tcbCOMMAND = vos_create_thread_ex(24, 512, COMMAND, "Command", 0);
Some of these may be a little larger than needed in terms of stack size, but that's why I'm looking for the max stack usage.

-Screen capture of the Thread Manager is attached (not sure how to inline in my post).  All information is present other than Peak Stack.



Title: Re: Vinculum II IDE: Thread Manager Does Not Show Max Stack Usage?
Post by: FTDI Community on October 25, 2021, 05:09:26 PM
Hi
Did you try hitting “Pause” in the debug ribbon?
Calculating the peak stack is transfer intensive so I’d bet it would only be performed when it’s stopped running the actual code on the device. 

Regards
FTDI Community
Title: Re: Vinculum II IDE: Thread Manager Does Not Show Max Stack Usage?
Post by: KTrenholm on October 25, 2021, 07:05:46 PM
Hi
Did you try hitting “Pause” in the debug ribbon?
Calculating the peak stack is transfer intensive so I’d bet it would only be performed when it’s stopped running the actual code on the device. 

Regards
FTDI Community

Aha, that looks to have done it (it appeared when I hit a breakpoint), not sure how I missed that, thanks!