This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Generating C code from a Matlab-Simulink model for DSP C6748

Other Parts Discussed in Thread: OMAP-L138, TMS320C6748

I'm trying to generate C code from a Matlab-Simulink simple model (eg.: sine wave generator with a DAC at the output). This code must be executed with Code Composer Studio for TMS320C6748 DSP (Texas Instrument C6748). Specifically, for the development board OMAP-L138 ZOOM ™EVM DEVELOPMENT KIT.

For this, I am using the following versions: Simulink (Version 7.7 - R2011a) Embedded Coder (Version 6.0 - R2011a) Code Composer Studio v3.3

I tried several options (with generic modules in Simulink and programming the C6748 timers, configuring a module "Target Preferences" with "OMAP_L138/C6748 EVM"...) but it isn't working.

Is it possible to implement this idea? Is there an example working?

Thanks

  • Juan,

    When you say that using the MATLAB/Simulink-generated application code is not working, how specifically does it fail?  Are you successfully generating application source code?  Can you open and build that application in CCS?  Does the application fail to run correctly on your DSP device?  I want to understand whether this is a question that we can support on this forum.  You may want to investigate whether some resources provided by The Mathworks are better suited to address your question.  For example, the MATLAB Answers site may be a good place to look:

    Also, the Embedded Coder help page on their website links to  some examples:

    Hope this helps.

  • Hi,Juan,

    I  am wandering what matlab/simulink-generated application code can bring to me(a freshman as a algorithm developer).

    1.I have designed a algorithm based matlab, Is it necessary to generate C code run on simulator based Matlab or write C code by hand ?

    2.Is it the same efficient as wrote by hand? or Can I modify the generated C code for some periphery chips that was not included in the matlab plateform?

    3.Generated C code can help develpers to know the algorithm better than Matlab from the running time , memory size consumption. 

        Is there any other benifits for a algorithm developer?

    Thanks.

    Alan

  • hi there, i'm encountering the same problem here, it cannot generate the .out file...here's my error. did you solve your problem?

    c:/progra~1/matlab/r2014a/rtw/c/src/common/rt_main.c:99 Could not find include file "c6748evm_aic31_lct.h"
    0 errors, 1 warning
    C:/PROGRA~1/MATLAB/R2014a/sys/perl/win32/bin/perl.exe C:/PROGRA~1/MATLAB/R2014a/rtw/c/tools/mkvc_lnk.pl untitled.lnk rtGetInf.obj rtGetNaN.obj rt_nonfinite.obj untitled.obj untitled_data.obj rt_logging.obj
    "### Creating standalone executable "../untitled.exe" ..."
    C:/PROGRA~1/MATLAB/R2014a/sys/lcc64/lcc64/bin/lcclnk64 -s -LC:/PROGRA~1/MATLAB/R2014a/sys/lcc64/lcc64/lib64 -o ../untitled.exe @untitled.lnk rt_main.obj
    untitled.obj .text: undefined reference to 'dacXmt'
    untitled.obj .text: undefined reference to 'dacCodecInit'
    gmake: *** [../untitled.exe] Error 2