I am using s32k144 i am getting this error
Multiple errors reported.
1) Unable to create variable object
2) Failed to execute MI command:
-var-create - * "(float)((i_alpha * acos((double)theta_elec)) + (i_beta * asin((double)theta_elec)))"
Error message from debugger back end:
'acos' has unknown return type; cast the call to its declared return type
3) Failed to execute MI command:
-data-evaluate-expression "(float)((i_alpha * acos((double)theta_elec)) + (i_beta * asin((double)theta_elec)))"
Error message from debugger back end:
'acos' has unknown return type; cast the call to its declared return type
4) Failed to execute MI command:
-var-create - * "(float)((i_alpha * acos((double)theta_elec)) + (i_beta * asin((double)theta_elec)))"
Error message from debugger back end:
'acos' has unknown return type; cast the call to its declared return type
Solved! Go to Solution.
Hi @sona1
Try just casting the call to the proper return type.
The debugger requires some information before calling the functions if you call a function that returns a value, but generates code as though the function returned a scalar value, calling the function will corrupt the stack of the thread on which the function was called, ruining your debug session.
Hi @sona1
Did you already add the math library in the Project Settings? Check the following thread. It has information related to the topic.
atan2f in math.h with S32DS S32K144
B.R.
VaneB
Yes I have added math.h
Hi @sona1
Try just casting the call to the proper return type.
The debugger requires some information before calling the functions if you call a function that returns a value, but generates code as though the function returned a scalar value, calling the function will corrupt the stack of the thread on which the function was called, ruining your debug session.