Increasing default stack size has no effect

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
cohuc_3807591
Level 3
Level 3
5 likes given First like given

Hello All:

I recently tried to increase the default stack size of my main thread through the #define statement in wiced_defaults.h, but every value I tried seemed to have no effect. I don't know of a good method to check the stack size, but I needed to increase it to avoid a stack overflow, and how I know it had no effect was that I would see the same stack overflow reset with every value I tried - 2x the default, 4x, 8x, 10x, and 20x. This doesnt seem to be an issue when the stack is created via wiced_rtos_create_thread, where I found that setting a stack size of 2x the default successfully avoided the stack overflow problem

Any suggestions about why the wiced_default.h method doesn't work, or how to do it differently?

0 Likes
1 Solution
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

Hello:

I think you need to change the APPLICATION_STACK_SIZE value in the .mk file for your application.

View solution in original post

0 Likes
2 Replies
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

Hello:

Do you mean you modify the

WICED_DEFAULT_APPLICATION_STACK_SIZE (6144) ?

You application still showed overflow , but if you used wiced_rtos_create_thread() with a specific stack value in your application , it can avoid the issue.

Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

Hello:

I think you need to change the APPLICATION_STACK_SIZE value in the .mk file for your application.

0 Likes