qpc/ports/arm-cm-qk/gnu/qk_port.h:85:
#if (__ARM_FP != 0) /* if VFP available... */
along with the same define in qk_port.c, lines 108, 155, 217, 280.
Will error on build if C compiler flags contains:
-mcpu=cortex-m3
-mcpu=cortex-m4+nofp
-mcpu=cortex-m4 when -mfloat-abi=soft or lacking -mfloat-abi altogether.
(as opposed to eg cortex-m4)
__ARM_FP is undefined when there is no hardware floating-point, according to ARM C Language extensions, §5.5 Floating-point and vector hardware:
https://arm-software.github.io/acle/main/acle.html#markdown-toc-floating-point-and-vector-hardware
Changing all the above #if checks to:
#if defined(__ARM_FP) && (__ARM_FP != 0) /* if VFP available... */
instead, ie checking it is defined before the value check, fixed it for me.
Anonymous
oops, forgot the error message:
Thanks for reporting.
I've never encountered that problem, but probably because the -mfloat-abi compilation option was always specified.
But anyway, all QP ports to ARM Cortex-M will be modified to use:
instead of:
--MMS
I found
-mfloat-abi=softto give the error as well. But thank you!Our context is that it's easy for floating point to sneak in via library inclusions if not careful.
Once your change is in, (and as long as
src/qs/qs_fp.cis excluded, for obvious reasons) the-mgeneral-regs-onlyARM compiler flag that bans all floating point register use works as well.Fixed in QP/C/C++ 7.3.0.
--MMS