RadekS,
Keil 5.14 with MQX 4.1.X. PSP_HAS_FPU 1 which is set in kinetis.h.
OK, I double checked my configuration! New information:
With MQXCFG_ENABLE_FP 0, and HW FP support enabled in compiler I get no errors in the build.
With MQXCFG_ENABLE_FP 0, and HW FP support disabled in the compiler I get these errors in the PSP build:
assembling support.S...
C:\PetroMar\PMT_Embedded\MQX4.1.0\mqx\source\psp\cortex_m\core\M4\support.S(60): error: A1854E: Unknown opcode 'vmrs', maybe wrong target CPU?
C:\PetroMar\PMT_Embedded\MQX4.1.0\mqx\source\psp\cortex_m\core\M4\support.S(64): error: A1854E: Unknown opcode 'vstmdb', maybe wrong target CPU?
C:\PetroMar\PMT_Embedded\MQX4.1.0\mqx\source\psp\cortex_m\core\M4\support.S(95): error: A1854E: Unknown opcode 'vldm', maybe wrong target CPU?
C:\PetroMar\PMT_Embedded\MQX4.1.0\mqx\source\psp\cortex_m\core\M4\support.S(99): error: A1854E: Unknown opcode 'vmsr', maybe wrong target CPU?
These errors will disappear if PSP_HAS_FPU=0, I'm sure, because this section of code is wrapped with '#if PSP_HAS_FPU'.
But how do these defines work? To me PSP_HAS_FPU is a statement of fact, and that should always be true because it is in the hardware.
Whereas MQXCFG_ENABLE_FP is a desired configuration. It's not clear to me that PSP_HAS_FPU=0 is a valid thing to do on this processor,
even if I don't use the FPU, and even if the project successfully builds. I think the above section of code is more properly
wrapped with #if MQXCFG_ENABLE_FP instead. Can you clarrify if FPU=0 is valid?
Regarding the GCC soft, softfp, and hard vs. Keil: The Keil compiler has a similar feature called 'softfp_linkage'. Unfortunately, from
what I can tell, Keil does not provide their pre-complied c-libraries (only provided as binary) with this configuration. Only soft and hard.
I have a support ticket into ARM for this.
Regarding FP use in MQX code. This is an important point. For maximum portability you should by design not use floating point (and
state this in your documentation), or document which functions, libraries, or MQX tasks do use floating point.
Otherwise I can't properly set the MQX_FLOATING_POINT_TASK in my task if I invoke any MQX dependencies! I would also presume
for any MQX tasks that get started (RTCS_tcpip, FTP, telnet, etc.) that use floating point that they are setting the MQX_FLOATING_POINT_TASK
property?
Thanks!
PMT