How to use Coder to generate generic C code?

조회 수: 21 (최근 30일)
John Edwards
John Edwards 2026년 1월 13일
댓글: John Edwards 2026년 1월 24일 17:51
Hi There,
I'm trying to use codegen to generate generic C code for use on a DSP.
I'm using the following command, which used to work on an older version (2022b):
codegen -c -config:lib -d matlab_process_wrapper_lib matlab_process_wrapper.m -report -rowmajor -args types
Unfortunately, it is generating the following code, which is not compiling:
for (k = 0; k <= 252; k += 2) {
_mm_storeu_pd(&dv[k],
_mm_mul_pd(_mm_loadu_pd(&s[k]), _mm_loadu_pd(&s[k + 1])));
}
I'm wondering if I should use embedded coder but I can't find a similar page for the options as this, for coder: https://uk.mathworks.com/help/coder/ref/codegen.html
All suggestions would be most welcome.
Thanks very much,
John

채택된 답변

Fangjun Jiang
Fangjun Jiang 2026년 1월 13일
  댓글 수: 1
John Edwards
John Edwards 2026년 1월 24일 17:51
Thank you very much, @Fangjun Jiang that got me working.
PS sorry for the delayed reply I got distracted by another project

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

제품


릴리스

R2025b

Community Treasure Hunt

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

Start Hunting!

Translated by