S32K3 hardfault whilst calling logf function

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K3 hardfault whilst calling logf function

Jump to solution
746 Views
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 Kudos
1 Solution
696 Views
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

View solution in original post

0 Kudos
4 Replies
717 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @HemantK,

What IDE / compiler / library do you use?

Thanks,

BR, Daniel

0 Kudos
711 Views
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 Kudos
702 Views
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 Kudos
697 Views
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 Kudos