S32K3 hardfault whilst calling logf function

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

S32K3 hardfault whilst calling logf function

ソリューションへジャンプ
750件の閲覧回数
HemantK
Contributor III

Hello All,

I am facing a wierd issue while using logf in S32k3 SOC.
For the below code:

1. float logIndex = 1.2f;
2. static float testLog;
3. testLog = logf(1.2f);
4. testLog = logf(logIndex);

Executing step 3 works fine but as soon as processor tries to execute step 4, I get hard fault.

HemantK_0-1677269598287.png


Can you please suggest what the potential cause could be?

0 件の賞賛
1 解決策
700件の閲覧回数
HemantK
Contributor III

Hello, 

I found the issue with the project. Our project is cmake and was using a different library as compared to the one used by S32DS.

 

Many thanks for the help

元の投稿で解決策を見る

0 件の賞賛
4 返答(返信)
721件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @HemantK,

What IDE / compiler / library do you use?

Thanks,

BR, Daniel

0 件の賞賛
715件の閲覧回数
HemantK
Contributor III

Hello Daniel, 

 

I am using compile NXP/S32DS.3.4/S32DS/build_tools/gcc_v10.2/gcc-10.2-arm32-eabi

and the library integrated is /arm-none-eabi/lib/arm/v5te/hard/libm.a

 

Regards, 

Hemant Kapoor

 

 

0 件の賞賛
706件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @HemantK,

Thank you for the information.

I'm not able to replicate the issue on my side.

Can you share a test project with this error?

 

Regadrs,

Daniel

0 件の賞賛
701件の閲覧回数
HemantK
Contributor III

Hello, 

I found the issue with the project. Our project is cmake and was using a different library as compared to the one used by S32DS.

 

Many thanks for the help

0 件の賞賛