I am trying to figure out whether the Kinetis K40X256 and K60N512 are both able to support floating point operations (not emulated floating point)? Is this a function of CodeWarrior, or the boards themselves?
The Kinetis families have the ability to support Floating point and the part numbers with those are defined, but the samples of those parts are not shipping yet. The first round of Kinetis silicon sampled to the market do not have FPU units. So CW, IAR, GCC etc all emulate FPU with library code which is why you are seeing so many clock cycles.
The K40 family and the other families will have pin for pin compatible versions that do have the FPU. So you can order later this year a version with FPU that will fit in your designs.
Today... CW knows that the FPU versions are not shipping... so there is no option or need to use the hardware module.
CW later this year will have FPU build options in the tool.
According to the K40 Product Page, the K40 has a single-precision floating-point unit. The Enter Keyword search box at the top right of this web page is your friend.
Right, but when I ran a simple floating point operation on my K40X256 KwikStik board using the free version of CodeWarrior, it took almost 160 cycles to finish a single operation, and when I viewed the assembly I saw it was emulating floating point.
The FPU will be available on some Kinetis families but I believe that it is an option and the first parts should appear towards the end of 2011 (accoring to information at a Kinetis seminar earlier this year).
I expect that the user will have to configure CW to inform it whether FPU is in HW or emulated. If the HW is available but the compiler thinks it must emulate it won't be able to make use of the module. On the other hand, trying to utilise the FPU when it is not there will presumably result in the code generated using the FPU instructions (assuming the compiler version supports these - it seems that CW, IAR and GCC understand the VFPUv4 Floating Point Unit) and on the HW this may result in an exception since the instruction is not understood (or similar)). I would try to see what happens - I haven't done it myself so can't be sure...
I was looking for some information on enabling hardware floating point on a CodeWarrior project and I found this thread. It's a bit old so I wanted to know if there was on update on hardware floating point support for CodeWarrior.
I am using the FRDM-K20D50M board which uses a K20 microcontroller with a Cortex-M4 core, which I believe has a single precision floating point unit. However, when I try to create a CodeWarrior bareboard project using this microcontroller, the option for hardware floating point is grayed out.
Do you know if CodeWarrior is still not supporting this feature or is this a license problem? I am using the Free Special Edition for MCU, version 10.4.
CodeWarrior supports hardware floating point uints, and this is not restricted by licensing. But the K20 on the FRDM-K20D50M does not have a floating point unit.
Retrieving data ...