s32k144 when math.h is included while debugging getting the error for acos function

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

s32k144 when math.h is included while debugging getting the error for acos function

ソリューションへジャンプ
1,444件の閲覧回数
sona1
Contributor I

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

0 件の賞賛
返信
1 解決策
1,369件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

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.

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,423件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

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

0 件の賞賛
返信
1,420件の閲覧回数
sona1
Contributor I

Yes I have added math.h 

0 件の賞賛
返信
1,370件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

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.

0 件の賞賛
返信