Hi Steven,
Thank you for the question but based on the information you provided us with we can give you just some generic advices.
Could you specify:
1) which version of S32DS are yous using?
2) what MCU are you targetting?
3) can you debug the code to identify the exact statement the code will "run away"?
4) not quite understand "if i remove the codes to a small .c file ,every thing is ok" could you be more specific?
As a generic suggestion:
* Please check if there is no stack overflow event in your app (e.g. if there are too many local variables)
* you are using double precision floating point - are you building with the appropriate floating point libraries?
Hope it helps.
Stan