AnsweredAssumed Answered

FPU setup

Question asked by Elizabeth Russell on Jun 19, 2013
Latest reply on Jul 2, 2013 by Hui_Ma

I am working with a K60FN1M processor and using CW10.4. I want to make sure that I am setting up the hardware FPU correctly. I have done the following:


1 - Selected Hardware vfpv4 in the Tool Settings under project properties.

2 - Selected c9x for the Library model

3 - Included the ewl c library

4 - Explicitly enabled the FPU by setting bits 10 and 11 in SCB_CPACR

5 - Set both the ASPEN and LSPEN in SCB_FPCCR to enable the extended exception frame and the lazy stacking options

6 - Added the suffix f to all float constants.


I am using a preemptive task scheduler rather than a full RTOS.


I want to be able to use library routines such as powf(), expf(), etc. and have them only use single precision float values. Is there a specific ewl library that I should specify or certain macros that need to be defined?