S32K3 hardfault whilst calling logf function

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

S32K3 hardfault whilst calling logf function

跳至解决方案
749 次查看
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 解答
699 次查看
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 回复数
720 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @HemantK,

What IDE / compiler / library do you use?

Thanks,

BR, Daniel

0 项奖励
714 次查看
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 项奖励
705 次查看
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 项奖励
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 项奖励