Stack problem when calling function

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

Stack problem when calling function

977 次查看
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

标记 (3)
2 回复数

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

744 次查看
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