MK64F FPU support

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

MK64F FPU support

1,731件の閲覧回数
simonhaines
Contributor III

I'm using MCUXpresso for a new project based on the MK64FX512xxx12 (not the FRDM board), and I'd like to use the hardware FPv4-SP unit on this part.

When creating a project, the SystemInit function contains code to unlock access to the FPU (via the CPACR), but the necessary definition of __VFP_FP__ is not present and the code is not executed. Am I missing a setting, or do I need to define this myself?

The project settings all have 'Architecture=Cortex-M4' and 'Floating point=FPv4SP (Hard ABI)' on the 'MCU C Compiler/Architecture', 'MCU Assembler/Architecture' and 'MCU Linker/Architecture' pages, and __FPU_PRESENT is correctly defined in 'MK64F12.h'. I'm happy to add the definition to the project, I just want to be sure I haven't missed something.

ラベル(1)
タグ(3)
0 件の賞賛
返信
2 返答(返信)

1,393件の閲覧回数
lpcxpresso_supp
NXP Employee
NXP Employee

How are you determining that the code is not executed - by looking at the file in the Editor view, or by debugging and single stepping through the code?

Note in particular that the Eclipse code indexer sometimes does not have visibility automatically generated compiler symbols like the VFP one into account, which can make it look in the Editor view that a #ifdef section of code is being conditionally compiled out, when in fact it will be compiled in.

Regards,

MCUXpresso IDE Support

0 件の賞賛
返信

1,393件の閲覧回数
simonhaines
Contributor III

OK this definition is output by the compiler, the IDE has no knowledge of it. To see all compiler definitions:

arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -E -dm - < /dev/null

0 件の賞賛
返信