S32K3 hardfault whilst calling logf function

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

S32K3 hardfault whilst calling logf function

跳至解决方案
1,156 次查看
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 解答
1,106 次查看
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 回复数
1,127 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @HemantK,

What IDE / compiler / library do you use?

Thanks,

BR, Daniel

0 项奖励
回复
1,121 次查看
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 项奖励
回复
1,112 次查看
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 项奖励
回复
1,107 次查看
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 项奖励
回复