__STACK_SIZE has no effect

Hi,

I defined __STACK_SIZE as compile/build flag. It has no effect according to GCC output after building is done.

Chip is nRF52840.

I tried to set fixed stack size in startup file and it did not changed RAM used size. Both linker script and startup file are from nRF5 SDK v17.1.0

What I'm doing wrong? 

Parents
  • You are using an outdated and unsupported SDK.

    Stack size won't be reflected in RAM usage IIRC - the linker has no idea about dynamic stuff.

    I believe the old liker scrips initialize the SP at or near top-of-RAM anyway. The linker will start barking at you when your static stuff gets too big and reaches into the areas reserved for stack.

Reply
  • You are using an outdated and unsupported SDK.

    Stack size won't be reflected in RAM usage IIRC - the linker has no idea about dynamic stuff.

    I believe the old liker scrips initialize the SP at or near top-of-RAM anyway. The linker will start barking at you when your static stuff gets too big and reaches into the areas reserved for stack.

Children
Related