Floating point instructions on s32k146 processor

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

Floating point instructions on s32k146 processor

2,355 次查看
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 项奖励
回复
5 回复数

1,722 次查看
KILLERzheng
Contributor IV

I solve this problem by adding the dir info below, for reference only.

KILLERzheng_0-1715934666902.png

 

0 项奖励
回复

2,332 次查看
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 项奖励
回复

2,321 次查看
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 项奖励
回复

2,299 次查看
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 项奖励
回复

2,287 次查看
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 项奖励
回复