MK64F FPU support

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

MK64F FPU support

1,183 次查看
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 回复数

845 次查看
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 项奖励

845 次查看
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 项奖励