Stack problem when calling function

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

Stack problem when calling function

723 Views
kimchan_eb
Contributor III

Hello,

Here are two pictures that show the change of stack after step into sub function.

pastedImage_1.png

pastedImage_2.png

Because of the stack change, it won't return normally back to the place where it called it, instead, it will "return" to 0xFFFF which is incorrect.

I also test other test cases and didn't find any similar problem.

So how can I fix the problem?

Codewarrior version is 

pastedImage_3.png

Target ECU is S12G192.

Br,

Kim

Tags (3)
2 Replies

490 Views
kimchan_eb
Contributor III

I think I found the solution.

It's because stack size is not enough.

After I change stack size 0x100 to 0x200 in prm file. There will be no more this question.

Br,

Kim

0 Kudos

490 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hi Kim,

Just for interest, on the site below you can find more information about stack overflow:

memory size   

Best regards,

Diana