Enabling Hardware Floating Point Compilation for Arm Cortex-M4 in PSoC Creator™ - KBA222890

Version: **



How can I enable hardware floating point (hardfp) compilation for Arm® Cortex®-M4 processor in PSoC Creator™ 4.2?



PSoC Creator 4.2 adds command line options, and because of the order in which it adds the options, you cannot add the




flag as a linker option in PSoC Creator. Instead, you can:


  1. Export the project to a Makefile.
  2. Modify the Makefile’s CFLAGS to use the hard floating point operations.
  3. Modify library paths to point to the hard floating point libraries.


The floating-point libraries are shipped with PSoC Creator 4.2 and higher. These library variants have names that end with _cm4f.a (for Crypto and BLE) or _M4f.a (for CapSense®). You can copy the libraries from the installation directories to your build environment and rename the libraries, or you can update your Makefile to use the ‘f’ variants from within the Cypress installation directories.


The default installation of PSoC Creator 4.2 contains relevant libraries in the following paths:

C:\Program Files (x86)\Cypress\PDL\3.0.1\drivers\peripheral\crypto\libs

C:\Program Files (x86)\Cypress\PDL\3.0.1\middleware\ble\lib

C:\Program Files (x86)\Cypress\PSoC Creator\4.2\PSoC Creator\psoc\content\CyComponentLibrary\CyComponentLibrary.cylib\CapSense_v2_0