How can I get Embedded Coder to use the Arm Cortex M CMSIS functions

8 ビュー (過去 30 日間)
Rui Fang
Rui Fang 2015 年 9 月 11 日
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 件)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by