KW30Z Connectivity CSTACK warning

cancel
Showing results for 
Search instead for 
Did you mean: 

KW30Z Connectivity CSTACK warning

Jump to solution
168 Views
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 Solution
40 Views
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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

1 Reply
41 Views
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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post