S12z linker symbol creation

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

S12z linker symbol creation

468 次查看
tomrix
Contributor II

Hello,

I want to implement a stack usage supervision by iitializing the stack with a pattern and then check it cyclically.

I can find the linker symbol __SEG_END_SSTACK but no stack size or stack start address symbol is generated. 

Can anyone help on how to tell the linker to create such a symbol?

Regards
tomrix

标记 (1)
0 项奖励
回复
2 回复数

438 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @tomrix.,

There is a workaround to fill the stack with known values.
Please refer to the attached test project.


In the .prm linker file, there are two RAM sections.
The MY_STACK section is used for the Stack and it is filled with 0xED.
While the rest of RAM is filled with 0xAB.
The STACKTOP is then placed at the end of MY_STACK section.

danielmartynek_0-1747054985589.png

 

Regards,

Daniel

 

 

 

 

0 项奖励
回复

436 次查看
tomrix
Contributor II

Thanks Daniel,

This solution is great!

Regards
tomrix

标记 (1)
0 项奖励
回复