Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 years, 1 month ago.
Cortex M4F DSP
Hi,
I have a Cortex M4F and I want to know how to use DSP on Mbed OS 5. Also, the FPU is used by default?
Thanks, Gabriel
1 Answer
6 years, 1 month ago.
Hi Gabriel,
The Mbed build system is based on a board or platform basis, so you will want to make sure that when compiling you are selecting the right target (either in the online compiler or from the "-m" switch from the command line). If you select a board that is based on the Cortex-M4 with an FPU (known as Cortex-M4F), then the FPU will be enabled and used when possible by the compiler.
To use the DSP instructions you have two primary options:
- write your own functions using either assembly or "C" intrinsics
- use a DSP library such as CMSIS-DSP ( https://github.com/ARM-software/CMSIS_5 )
Mbed doesn't incorporate CMSIS-DSP into the build environment. However, for convenience you will find the DSP souce code available under the "features\unsupported" area. This means that you can incorporate those files into your application as necessary.
Regards,
Ralph, Team Mbed