Hi, I am analyzing RAM usage in my project and I noticed that the cellular library allocates 8 kB for the stack of its thread (PLATFORM_THREAD_DEFAULT_STACK_SIZE == 2048). It seems like a lot. Is that correct? Are there any circumstances under which this can be reduced? Like not using some functionality or is this really needed by the core functions.
PLATFORM_THREAD_DEFAULT_STACK_SIZE defines the stack depth of _pktioReadThread. The default value is for demo purpose and can be reduced by developer’s requirements.
When deciding the stack depth of the _pktioReadThread, user defined callback functions must also be considered since they are invoked in the thread. For example, the generic URC callback function is defined by user and the required stack depth depends on their implementation. It is suggested to reference the stack size FAQ to decide the stack size.
we will close this issue if no any further update. Welcome to create new issues or reopen it if you still meet the issues.