KW30Z Connectivity CSTACK warning

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

KW30Z Connectivity CSTACK warning

跳至解决方案
1,717 次查看
lucianfiran
Contributor V

IAR 7.50;  KW40Z_Connectivity_Software_1.0.1 (KSDK_1.3.0)

If enable graphical stack display from Tool Options...

pastedImage_1.png

Got some warnings if set some break points

pastedImage_2.png

\platform\devices\MKW30Z4\linker\iar\MKW30Z160xxx4_connectivity.icf

if (isdefinedsymbol(__stack_size__)) {
  define symbol __size_cstack__        = __stack_size__;
} else {
  define symbol __size_cstack__        = 512;
}

if (isdefinedsymbol(__heap_size__)) {
  define symbol __size_heap__          = __heap_size__;
} else {
  define symbol __size_heap__          = 0;
}

...

define block CSTACK    with alignment = 8, size = __size_cstack__   { };
define block HEAP      with alignment = 8, size = __size_heap__     { };

pastedImage_8.png

Should the stack be increase and how much ?

Should de heap remain 0 (zero) ?

1 解答
1,589 次查看
jorge_a_vazquez
NXP Employee
NXP Employee

Hi Lucian

No, please don't modify heap, Connectivity framework define his own memory manager, refer to the section 3.3. Memory management of the CONNFWKRM.pdf document, as you can see framework provide a non-fragmenting memory allocation solution, where it defines blocks of memorys as:

         _block_size_  32  _number_of_blocks_    6 _eol_  \
         _block_size_  64  _number_of_blocks_    3 _eol_  \
         _block_size_ 128  _number_of_blocks_    3 _eol_‍‍‍

When a new buffer is requested to be allocated, the framework returns the first available partition block of equal or higher size.


Hope this information helps you
Have a great day,
Jorge Alcala

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

在原帖中查看解决方案

1 回复
1,590 次查看
jorge_a_vazquez
NXP Employee
NXP Employee

Hi Lucian

No, please don't modify heap, Connectivity framework define his own memory manager, refer to the section 3.3. Memory management of the CONNFWKRM.pdf document, as you can see framework provide a non-fragmenting memory allocation solution, where it defines blocks of memorys as:

         _block_size_  32  _number_of_blocks_    6 _eol_  \
         _block_size_  64  _number_of_blocks_    3 _eol_  \
         _block_size_ 128  _number_of_blocks_    3 _eol_‍‍‍

When a new buffer is requested to be allocated, the framework returns the first available partition block of equal or higher size.


Hope this information helps you
Have a great day,
Jorge Alcala

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