How can I get Embedded Coder to use the Arm Cortex M CMSIS functions
3 views (last 30 days)
Show older comments
Matlab 2015b with Embedded Coder and add-ons:
- Embedded Coder Support Package for ARM Cortex-M Processors
- DSP System Toolbox Support Package for ARM Cortex-M Processors
- Embedded Coder Support Package for STMicroelectronics STM32F4-Discovery Board
Coder options:
- Standard math library: C89/C90 (ANSI)
- Code replacement library: GCC Arm Cortex M-3
- Device: Arm Compatible / Arm Cortex
Whatever I try, this Matlab function:
function a = thecosinus(b)
a = cos(b)
gets converted into this C code:
#include <math.h>
double thecosinus(double b)
22 {
23 return cos(b);
24 }
How can I get coder to use the CMSIS function
#include <arm_math.h>
double thecosinus(double b)
22 {
23 return arm_cos_f32(b);
24 }
instead? And why does the code generation fail when I choose the C99 standard math library? Lastly, how can I let it use floats instead of doubles?
0 Comments
Answers (0)
See Also
Categories
Find more on ARM Cortex-M Processors in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!