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.

CCS/TMS320F28335: Matlab Simulink code generation to CCS

Part Number: TMS320F28335


Tool/software: Code Composer Studio

Hello,

I have no experience with CCS other than simple tutorials I have walked through.


I am trying to implement PWM signals using a Delfino by designing them in Simulink.


I am having trouble getting the checkEnvSetup to work and tell me all the necessary connections have been made.


I was able to make Simulink get an LED blink on the board and also send a constant value to GPIO-0 using the Digital Output block.

However when using RTDX to ePWM (as advised by a tutorial) the code is is made and I can load it onto the board but the pin doesn't give me any output.

I believe this has something to do with idelink_ert.tlc and it not being compatible with CCSv6.2.0.   In the Configuration Parameters of Simulink there is only an option for IDE Toolchain V4 and V5.  I have been using V5 because it is closest to V6.  


Should I download and use V5 of CCS?  Btw I am using Matlab 2016a/b.

 Thank you for any help you can give me.

  • Hi,

    The idelink_ert.tlc workflow is not compatible with CCSv6 and beyond. In fact, we will sunset this workflow in the future as it is based on old technology (CCSv3.3 or so).  It will partially work with CCSv4/v5, but some features are missing as there were large changes in CCS back then that affected the interface we built.

    I would suggest using ert.tlc and CCSv6.  With CCSv6 you shouldn't need to use .  if you need to get back and reconfigure the Support Package - type targetupdater at the MATLAB command line and walk through the steps to configure for CCSv6.

    -Brian

  • Hey Brian!

    Thank you for the help.

    What did you mean by your last sentence here.  I think there is a typo

    "With CCSv6 you shouldn't need to use .  if you need to get back and reconfigure the Support Package - type targetupdater at the MATLAB command line and walk through the steps to configure for CCSv6."

    What shouldn't I need to use?  

    As for Support Packages:

    So I have ran Target updater and it asks me to get Code Generation Tools 6.4.6  --> After some reading i think using the most updated 6.6.12 that is available will be ok. Is that correct?

    When I go to help and Download New Software and try to get CGT 6.6.12 I get this error message 

    An error occurred while collecting items to be installed
    session context was:(profile=epp.package.cpp, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
    No repository found containing: org.eclipse.update.feature,com.ti.cgt.c2000.6.4.win32,6.4.12
    No repository found containing: binary,com.ti.cgt.c2000.6.4.win32_root,6.4.12

    What does this error mean?

    Thank you so much for all the help.

  • Sorry, it should read "use checkEnvSetup".

    I don't know about that error - you may need to contact MathWorks Technical Support.

    -Brian

  • So downloaded ccsV5 and then used checkEnvSetup('ccsv5', 'f28335', 'setup') to get all the necessary links made.

    This worked and I was able to send a constant to an output pin on the board.

    Now I am using RTDX --> ePWM to get a pwm output.

    I get the following error when building the code in Simulink:


    Warning: The data type "int8" uses a word size that is not available on the intended target.
    Fixed-point signals using this data type will be put inside a larger word or multi words. When used,
    extra software will be generated to force this larger word or multi words to emulate a smaller
    word. This emulation is helpful when your prototype target and your final
    production target are not the same. If the smaller word size does NOT exist
    on the final production target, then consider increasing the word size to
    one that is supported.
    Warning: The data type "uint8" uses a word size that is not available on the intended target.
    Warning: The data type "boolean" uses a word size that is not available on the intended target.
    Error: File: C:\Program Files\MATLAB\R2016b\toolbox\target\extensions\processor\shared\ti\blks\mex\tlc_c\rtdx_util.tlc Line: 18 Column: 80
    Unable to find linkeroptions within the chipInfo scope
    Main program:
    ==> [00] C:\Program Files\MATLAB\R2016b\toolbox\target\extensions\processor\shared\ti\blks\mex\tlc_c\rtdx_util.tlc:AddRTDXLibraryAndIncludePath(18)
    [01] C:\Program Files\MATLAB\R2016b\toolbox\target\extensions\processor\shared\ti\blks\mex\tlc_c\rtdx_src.tlc:Start(83)
    [02] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\blocks\gensfun.tlc:Start(625)
    [03] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\opaquelib.tlc:OpaqueTLCBlockFcn(4036)
    [04] C:\Users\sfg10\Documents\MATLAB\Exp3_ert_rtw\tlc\s0_b0_ozvbc_ModelInitialize.tlc:ModelInitialize(7)
    [05] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\opaquelib.tlc:FcnGenRateGroupedCodeFromModule(4718)
    [06] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\opaquelib.tlc:FcnGenerateCodeFromModule(4633)
    [07] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\opaquelib.tlc:SLibFcnGenBodySysFcn(193)
    [08] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\opaquelib.tlc:SLibFcnGenBodyFcnCache(406)
    [09] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\opaquelib.tlc:SLibFcnGenBodySysFcnEntry(508)
    [10] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\commonbodlib.tlc:FcnGenBodySysCache(1212)
    [11] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\commonbodlib.tlc:SLibGenBodyCache(5188)
    [12] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\formatwide.tlc:<NONE>(55)
    Error: File: C:\Program Files\MATLAB\R2016b\toolbox\target\extensions\processor\shared\ti\blks\mex\tlc_c\rtdx_util.tlc Line: 125 Column: 28
    Undefined identifier cgHook
    Main program:
    ==> [00] C:\Program Files\MATLAB\R2016b\toolbox\target\extensions\processor\shared\ti\blks\mex\tlc_c\rtdx_util.tlc:AddRtdxIncludesToModelH(125)
    [01] C:\Program Files\MATLAB\R2016b\toolbox\target\extensions\processor\shared\ti\blks\mex\tlc_c\rtdx_src.tlc:Start(98)
    [02] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\blocks\gensfun.tlc:Start(625)
    [03] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\opaquelib.tlc:OpaqueTLCBlockFcn(4036)
    [04] C:\Users\sfg10\Documents\MATLAB\Exp3_ert_rtw\tlc\s0_b0_ozvbc_ModelInitialize.tlc:ModelInitialize(7)
    [05] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\opaquelib.tlc:FcnGenRateGroupedCodeFromModule(4718)
    [06] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\opaquelib.tlc:FcnGenerateCodeFromModule(4633)
    [07] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\opaquelib.tlc:SLibFcnGenBodySysFcn(193)
    [08] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\opaquelib.tlc:SLibFcnGenBodyFcnCache(406)
    [09] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\opaquelib.tlc:SLibFcnGenBodySysFcnEntry(508)
    [10] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\commonbodlib.tlc:FcnGenBodySysCache(1212)
    [11] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\commonbodlib.tlc:SLibGenBodyCache(5188)
    [12] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\formatwide.tlc:<NONE>(55)
    Error: File: C:\Program Files\MATLAB\R2016b\toolbox\target\extensions\processor\shared\ti\blks\mex\tlc_c\rtdx_util.tlc Line: 125 Column: 36
    The == and != operators can only be used to compare values of the same type
    Main program:
    ==> [00] C:\Program Files\MATLAB\R2016b\toolbox\target\extensions\processor\shared\ti\blks\mex\tlc_c\rtdx_util.tlc:AddRtdxIncludesToModelH(125)
    [01] C:\Program Files\MATLAB\R2016b\toolbox\target\extensions\processor\shared\ti\blks\mex\tlc_c\rtdx_src.tlc:Start(98)
    [02] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\blocks\gensfun.tlc:Start(625)
    [03] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\opaquelib.tlc:OpaqueTLCBlockFcn(4036)
    [04] C:\Users\sfg10\Documents\MATLAB\Exp3_ert_rtw\tlc\s0_b0_ozvbc_ModelInitialize.tlc:ModelInitialize(7)
    [05] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\opaquelib.tlc:FcnGenRateGroupedCodeFromModule(4718)
    [06] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\opaquelib.tlc:FcnGenerateCodeFromModule(4633)
    [07] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\opaquelib.tlc:SLibFcnGenBodySysFcn(193)
    [08] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\opaquelib.tlc:SLibFcnGenBodyFcnCache(406)
    [09] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\opaquelib.tlc:SLibFcnGenBodySysFcnEntry(508)
    [10] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\commonbodlib.tlc:FcnGenBodySysCache(1212)
    [11] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\commonbodlib.tlc:SLibGenBodyCache(5188)
    [12] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\formatwide.tlc:<NONE>(55)
    Error: File: C:\Program Files\MATLAB\R2016b\toolbox\target\extensions\processor\shared\ti\blks\mex\tlc_c\rtdx_util.tlc Line: 125 Column: 49
    Undefined identifier cgHook
    Main program:
    ==> [00] C:\Program Files\MATLAB\R2016b\toolbox\target\extensions\processor\shared\ti\blks\mex\tlc_c\rtdx_util.tlc:AddRtdxIncludesToModelH(125)
    [01] C:\Program Files\MATLAB\R2016b\toolbox\target\extensions\processor\shared\ti\blks\mex\tlc_c\rtdx_src.tlc:Start(98)
    [02] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\blocks\gensfun.tlc:Start(625)
    [03] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\opaquelib.tlc:OpaqueTLCBlockFcn(4036)
    [04] C:\Users\sfg10\Documents\MATLAB\Exp3_ert_rtw\tlc\s0_b0_ozvbc_ModelInitialize.tlc:ModelInitialize(7)
    [05] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\opaquelib.tlc:FcnGenRateGroupedCodeFromModule(4718)
    [06] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\opaquelib.tlc:FcnGenerateCodeFromModule(4633)
    [07] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\opaquelib.tlc:SLibFcnGenBodySysFcn(193)
    [08] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\opaquelib.tlc:SLibFcnGenBodyFcnCache(406)
    [09] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\opaquelib.tlc:SLibFcnGenBodySysFcnEntry(508)
    [10] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\commonbodlib.tlc:FcnGenBodySysCache(1212)
    [11] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\commonbodlib.tlc:SLibGenBodyCache(5188)
    [12] C:\Program Files\MATLAB\R2016b\rtw\c\tlc\mw\formatwide.tlc:<NONE>(55)
    ### Build procedure for model: 'Exp3' aborted due to an error.
    Error: File: C:\Program Files\MATLAB\R2016b\toolbox\target\extensions\processor\shared\ti\blks\mex\tlc_c\rtdx_util.tlc Line: 125 Column: 57
    The == and != operators can only be used to compare values of the same type




    What is the problem here?


    Thank you
  • I need CCSv5 to run idelink_ert.tlc

    I tried using CCSv6 which is compatible with ert.tlc but no .out file generates that I can load onto my board and run


    Again I'm trying to do simple PWM on a Delfino F28335
    I have a simulink model created to do the PWM and am sending the output to GPIO-00 using the digital output pin provided in the C2000 simulink library.

    Is it ok to use the digital output pin or do I need to use RTDX --> ePWM to properly implement a pwm signal.


    So simplified:

    1. Should I use idelink_ert.tlc or just ert.tlc and if the latter than how do I make simulink create the .out program to manually load onto my board in CCS

    2. Is it ok to send the PWM signal to the Digital Output Pin or do I need to use RTDX-->ePWm?


    Thank you for the help,

    Santino