LPCXpresso/MCUXpresso: How guarantee a certain stack size

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

LPCXpresso/MCUXpresso: How guarantee a certain stack size

937 次查看
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 项奖励
回复
1 回复

806 次查看
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 项奖励
回复