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/TMS320F28379D: compiler flag

Part Number: TMS320F28379D

Tool/software: Code Composer Studio

hi to all,

            im trying to include a simulink C code into CCSv10, when I tried to compile the Program this errors are shown:

Description	Resource	Path	Location	Type
#35 #error directive: Must define one of RT, NRT, MATLAB_MEX_FILE, SL_INTERNAL, or FIPXT_SHARED_MODULE	.ccsproject	/Matlab_simulink_project	line 316, external location: /home/gaston/.local/MATLAB/R2020a/simulink/include/simstruc_compcond.h	C/C++ Problem

I include de compiler flags:

-D"RT" -D"USE_RTMODEL"

But the error still persist.

From Matlab help this is their response:

If the issue persists after this, please add RT and USE_RTMODEL as compiler flags in external IDE.

Maybe Im settings the compiler flags wrong.

Gastón

  • Gaston,

    The options should look somethign like this:

    -define=RT --define=USE_RTMODEL

    It is easiest to set them via the project options in CCS.  You can do that here:

    Regards,

    John

  • Could you tell me wich of these files Do I need to include into CCS?

    I include microcontroller_gpio. and microcontroller_gpio.h in CCS and Im getting this error:

    Description	Resource	Path	Location	Type
    cannot open source file "rt_logging.h"	microcontroller_gpio.h	/Matlab_simulink_project	line 31	C/C++ Problem

    Which files are included in CCS?
    Gastón

  • You will have to add the location of rt_logging.h to the compiler search path in CCS.  Select "Include Options" in the Project options tree.  It is just up from where you added RT and USE_RTMODEL.

    I can't tell you want files the MathWorks wants you to add to the CCS project.  They must have some documentaiton somewhere on that.

    John

  • Hi john,

                I can't find any doc about this (import code from simulink to ccs). I alrady contacted Mathworks about this issue. Just asking if any has already do this and maybe throw some ligth into this issue.

    Thanks

    Gastón