PSOC Creator 4.4 Hardware Float Enable

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
benjaminpaik
Level 2
Level 2
10 questions asked 10 sign-ins 5 questions asked

I've been experimenting with the PSOC 6 BLE Pioneer kit to come up to speed on Cypress parts and the PSOC Creator IDE. I read that the chip has a floating point unit, and I was searching through the options in the IDE to see how to enable floating point operations in hardware (but didn't find anything). I searched the forum and came across a post from a few years ago that outlined a manual process for setting the compiler flags and linking the libraries, but it seemed somewhat involved and not user friendly. I wanted to know if this issue has been addressed in the latest version of PSOC creator 4.4, and if so, how do I access it? If it hasn't been addressed, I would assume that enabling the FPU is discouraged for some reason. Are there library compatibility issues I should be aware of? In a worst-case scenario, are there intrinsic functions available to access the FPU instructions?

0 Likes
1 Solution
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi @benjaminpaik

The steps to enable hard FP is provided in this Knowledge-Based Article - https://community.cypress.com/t5/Knowledge-Base-Articles/Enabling-Hardware-Floating-Point-Compilatio...

You can also refer to this post - https://community.cypress.com/t5/PSoC-6-MCU/enabling-hardfp-psoc-6/m-p/237601#M8754

The issue is with the way PSoC Creator handles the custom flags. PSoC Creator passes hard-coded string -mfloat-abi=softfp. If any custom flags are added in the Build Settings, they are appended at the end.  So, if we add a custom flag to enable hardfp then that is ignored (lesser priority). Therefore, the PSoC Creator project needs to be exported to a makefile project so that we can edit the flags.

However, in ModusToolbox, which is based on makefile, we can easily enable hardfp by using the VFP_SELECT variable in the application makefile.

image.png

Thanks and Regards,
Rakshith M B

View solution in original post

0 Likes
5 Replies
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi @benjaminpaik

The steps to enable hard FP is provided in this Knowledge-Based Article - https://community.cypress.com/t5/Knowledge-Base-Articles/Enabling-Hardware-Floating-Point-Compilatio...

You can also refer to this post - https://community.cypress.com/t5/PSoC-6-MCU/enabling-hardfp-psoc-6/m-p/237601#M8754

The issue is with the way PSoC Creator handles the custom flags. PSoC Creator passes hard-coded string -mfloat-abi=softfp. If any custom flags are added in the Build Settings, they are appended at the end.  So, if we add a custom flag to enable hardfp then that is ignored (lesser priority). Therefore, the PSoC Creator project needs to be exported to a makefile project so that we can edit the flags.

However, in ModusToolbox, which is based on makefile, we can easily enable hardfp by using the VFP_SELECT variable in the application makefile.

image.png

Thanks and Regards,
Rakshith M B
0 Likes

Thanks for the quick response. I had a few follow-up questions. Is ModusToolbox intended to replace PSOC Creator as the default IDE in the near future? Also, are there any features in PSOC Creator that don't exist in ModusToolbox (e.g. adding middlewares, peripheral configuration, etc.). In other words, can I use ModusToolbox moving forward and have all the features I am accustomed to from PSOC Creator?

0 Likes
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Yes, the newer PSoC 4 and PSoC 6 devices will be supported in ModusToolbox. ModusToolbox also provides a plethora of new features that will help you in your application development like git compatibility, IDE independence, device-agnostic project development, etc to name a few.

Also, are there any features in PSOC Creator that don't exist in ModusToolbox (e.g. adding middlewares, peripheral configuration, etc.)

You will have access to all middleware and additional middleware too. Peripheral configuration can be done using the HAL driver or the Device Configurator in ModusToolbox. However, UDBs cannot be used in ModusToolbox.

In other words, can I use ModusToolbox moving forward and have all the features I am accustomed to from PSOC Creator?

The answer to this depends on your application. If UDBs are a necessity for your application, then you will have to use PSoC Creator. If not, it is recommended that you use ModusToolbox.

 

Thanks and Regards,
Rakshith M B
0 Likes

Thanks for your answers. I have a few final follow-up questions:

1. It seems like it should be trivial to change the hardcoded "-mfloat-abi=softfp" flag to be configurable via a checkbox (perhaps in the build settings of PSOC creator). I assume the majority of people who purchase a part with an FPU intend to use it, so it would make sense to have this option better integrated with the IDE since it is the standard use case. Is there somewhere I can post feature requests for some something like I described?

2. I see that ModusToolbox currently only supports PSOC 4 and PSOC 6 architectures. Will support eventually be expanded to include the full Cypress range of parts (such as the FM line)?

3. (Somewhat related to 2) Will PSOC Creator continue to be developed/updated in the future, or is the intention for ModusToolbox to eventually replace PSOC Creator entirely?

0 Likes

Hi @benjaminpaik,


1. It seems like it should be trivial to change the hardcoded "-mfloat-abi=softfp" flag to be configurable via a checkbox (perhaps in the build settings of PSOC creator). I assume the majority of people who purchase a part with an FPU intend to use it, so it would make sense to have this option better integrated with the IDE since it is the standard use case. Is there somewhere I can post feature requests for some something like I described?


There exists an internal ticket regarding this issue but it is unlikely that this will be modified. I will update the internal team regarding the request so that they can evaluate the same.


2. I see that ModusToolbox currently only supports PSOC 4 and PSOC 6 architectures. Will support eventually be expanded to include the full Cypress range of parts (such as the FM line)?


There is no plan to support FM devices on ModusToolbox at the moment.


3. (Somewhat related to 2) Will PSOC Creator continue to be developed/updated in the future, or is the intention for ModusToolbox to eventually replace PSOC Creator entirely?


It is unlikely that a new feature will be added to PSoC Creator. The newer devices will be supported in ModusToolbox. However, for older devices that are not supported in ModusToolbox, we will have to use PSoC Creator.

Thanks and Regards,
Rakshith M B