S12zvl Stack overfolw / progarme exection sequence

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

S12zvl Stack overfolw / progarme exection sequence

468 Views
charudattaingal
Contributor IV

Dear Team,

 

Want to know what will happen when s12vl stack overflow occur?

Looking for program execution flow on S12zvl Micro-controller in detail.

Ex: First load the program on memory, global variable will go in data segment, separate stack is created for each function call etc

Is there is any tool to diagnostic memory while executing S/w on S12zvl micro-controller?

 

 

Thanks & Regards,

Charudatta

Labels (1)
0 Kudos
2 Replies

288 Views
lama
NXP TechSupport
NXP TechSupport

Hi,

There is no mechanism to check stack overflow. However, I would like to suggest you to fill the last selected part of stack by selected constant and run the code to see how large stack is used in reality.

You can use command FILL in the prm file for this purpose. Description of the command can be found in MCU_Build_Tools_Utilities.pdf manulal which can be found in the CodeWarrior(installation dir)->Help->PDF directory.

BTW; information about stack should be problematic, because none of compilers is able to recognize what you are actually put onto stack and what you are doing with SP.

Best regards,

Ladislav

0 Kudos

288 Views
charudattaingal
Contributor IV

Hi Ladislav,

After each 3s stack overflow is generated by software,I verified this  by writing pattern on end of stack.

I am reading (verifying)  the pattern at 10ms after 3 sec time my pattern was overwritten.

I need to fix stack overflow issue.

Good to have if I get details execution flow of s/w on s12vl micro-controller like Linux OS.

Thanks & Regards,

Charudatta

0 Kudos