How do I tell my project which processor is used?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How do I tell my project which processor is used?

ソリューションへジャンプ
1,061件の閲覧回数
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

ラベル(1)
0 件の賞賛
返信
1 解決策
924件の閲覧回数
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 件の賞賛
返信
3 返答(返信)
924件の閲覧回数
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 件の賞賛
返信
924件の閲覧回数
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 件の賞賛
返信
925件の閲覧回数
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 件の賞賛
返信