Floating point instructions on s32k146 processor

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

Floating point instructions on s32k146 processor

600 Views
KelvinSmith
Contributor III

We have code running on the the s32k1SIC evaluation board, which uses the s32k146 processor. The code is bogging down in floating point math, and looking at the disassembled code, I see that it is not using floating point instructions. Looking at the manual for the processor, I see that the s32k14x processors have a math coprocessor. I tried writing a vadd instruction, and when it compiles, it tells me that I can't use floating point instructions in thumb mode. So I put in a .arm directing to generate regular arm instructions, and it tells me that I can't do that on a thumb-only processor. How can I use the floating point instructions?

0 Kudos
4 Replies

577 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi 

Did your project enable the hardware FPU?

ENABLE_FPU Float ABI FP instructions (hard).png


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

566 Views
KelvinSmith
Contributor III

Thanks Robin,

I looked for a setting like that and couldn't find it. But there must still be some setting because now when I build, during the link I get errors like this for each file:

c:/nxp/s32ds.3.4/s32ds/build_tools/gcc_b1620/gcc-6.3-arm32-eabi/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/bin/real-ld.exe: error: libuavcanV1_demo.elf uses VFP register arguments, ./Project_Settings/Startup_Code/system_S32K146.o does not
c:/nxp/s32ds.3.4/s32ds/build_tools/gcc_b1620/gcc-6.3-arm32-eabi/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/bin/real-ld.exe: failed to merge target specific data of file ./Project_Settings/Startup_Code/system_S32K146.o

0 Kudos

544 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Sorry. I don't understand what do you mean: I looked for a setting like that and couldn't find it. 
What IDE are you using? If you are using S32DS, then you can select Hardware FPU during create new S32DS Project too.

New S32DS Project.jpgFloat ABI.jpgvmul vdiv.jpg

0 Kudos

532 Views
KelvinSmith
Contributor III

Robin, I see that what I said was ambiguous. I did find the option (as you described) and I selected it, matching the images above. But when I compile, at the link stage, I get the errors I listed above.

0 Kudos