MK64F FPU support

cancel
Showing results for 
Search instead for 
Did you mean: 

MK64F FPU support

447 Views
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.

Labels (1)
Tags (3)
0 Kudos
2 Replies

109 Views
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 Kudos

109 Views
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 Kudos