LPCXpresso/MCUXpresso: How guarantee a certain stack size

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPCXpresso/MCUXpresso: How guarantee a certain stack size

836 Views
brampeeters
Contributor I

I was looking into information about how to set a certain stack size using LPC/MCUXpresso when i saw the following thread: https://community.nxp.com/message/767676 

Now if I understand things correctly, the idea here is that the linker/toolchain will just use whatever is left and give that to heap and stack.

Since I believe this way of working is incredibly insecure, I want to be able to set a stack size (and potentially heap size though i my current project i am not using a heap) and get a linker error if stack+heap+data does not fit anymore in the available memory.

Is there any info/examples on how to modify the linker templates to realize this ?

0 Kudos
Reply
1 Reply

705 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Bram Peeters,

Thank you for your interest in NXP Semiconductor products and 
for the opportunity to serve you.
I'd highly recommend you to adapt the heap or stack size by referring to the 11.9 section in the attachment.
Hope this helps.

Have a great day,
TIC

 

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

0 Kudos
Reply