Page 1 of 1

App. Stacksize

Posted: Thu Jul 29, 2021 8:16 pm
by sAz
Hi everyone,

I am implementing an algorithm on the Crazyflies using the app. entry point.

There we have to define APP_STACKSIZE (default 300) as described here https://www.bitcraze.io/documentation/r ... app_layer/.

How can I determine the right stack size for my application?

Thanks

Re: App. Stacksize

Posted: Mon Aug 02, 2021 1:02 pm
by kimberly
You can check this pretty easily! So you can use the default stack size (or one that is larger) at first, compile and flash the program, and check with the console tab in the cfclient how much RAM it actually takes up (with the button 'Task Dump). After that, you can reduce your APP_STACKSIZE to a value little above that :)