How do I tell my project which processor is used?

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

How do I tell my project which processor is used?

Jump to solution
701 Views
matthias
Contributor III

Hello,

 

I am using KDS3.0/KSDK1.2.0 with Processor Expert, the processor we use is MK66FX1M0VMD18. I added the correct Processor Expert CPU component for my K66F processor and so far it looks like the project settings' include paths point to the correct KSDK directories for the K66F processor. However, when I include the file "arm_math.h", I get a warning "Compiler generates FPU instructions for a device without FPU [...]".
I can get rid of the warning by including "MK66F18.h" before "arm_math.h", but in my opinion, the project should already know which processor I am using. Is there an additional setting in the project that I missed, or do I really have to include "MK66F18.h" in addition to defining the processor type in the Processor Expert component?

 

Best regards

Matthias

Labels (1)
0 Kudos
1 Solution
564 Views
BlackNight
NXP Employee
NXP Employee

Hi Matthias,

So it seems that the library assumes __FPU_PRESENT defined somewhere.

Then I recommend you add this define to the compiler preprocessor settings: that way it is always defined:

pastedImage_0.png

Erich

View solution in original post

0 Kudos
3 Replies
564 Views
BlackNight
NXP Employee
NXP Employee

Hi Matthias,

do you have proper floating point options set in your project settings?

pastedImage_0.png

And the console log shows that they are used like this:

arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -O0 -fmessage-length=0 -fsigned-char

?

Erich

0 Kudos
564 Views
matthias
Contributor III

Hello Erich,

thanks for your quick reply. Yes, the settings you mentioned are the same in my project:

pastedImage_1.png

The problem is not that the compiler does not generate hard floating point instructions (I guess it does), but as the warning says, it doesn't know that my processor supports them unless I include "MK66F18.h" which contains the needed "#define __FPU_PRESENT 1".

Regards

Matthias

0 Kudos
565 Views
BlackNight
NXP Employee
NXP Employee

Hi Matthias,

So it seems that the library assumes __FPU_PRESENT defined somewhere.

Then I recommend you add this define to the compiler preprocessor settings: that way it is always defined:

pastedImage_0.png

Erich

0 Kudos