S12z linker symbol creation

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

S12z linker symbol creation

464 Views
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

Tags (1)
0 Kudos
Reply
2 Replies

434 Views
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 Kudos
Reply

432 Views
tomrix
Contributor II

Thanks Daniel,

This solution is great!

Regards
tomrix

Tags (1)
0 Kudos
Reply