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.

TMS320F28379D: Unable to build a project with DCL example

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Tool/software:

Hi Experts,

We are using TMS320f28379D with CCSv7 to design a two-loop controller where two PI controllers in series are used. I have seen the examples in the DCL folder: (C:\ti\c2000\C2000Ware_1_00_03_00\libraries\control\DCL\c28\examples) where examples with F28069 are given.

Could you let us know which one to use and what include file should be used DCL.h or DCLF32.h? We have used #include "F28x_Project.h",#include "DCL.h" ; F28069_PID example, for property >include option  C:\ti\c2000\C2000Ware_1_00_03_00\libraries\control\DCL\c28\include is used but we are unable to build the project.

Thank you.

Regards,
Archie A.

  • Hi Archie,

    Can you try include both DCL.h and DCLF32.h? Note that if you're using the assembly version of the controller, you would need to also have to copy/reference the .asm files within source folder of DCL.

    Best,

    Sen Wang

  • Hello Sen,

    Thank you.

    When trying to run Example_F28069_PID.c. As suggested, by adding #include "DCL.h" and #include "DCLF32.h"  error shown is"../main.c", line 14: fatal error #1965: cannot open source file "DCLF32.h"and if #include "DCLF32.h" is commented out, the following error is shown.

    undefined        first referenced
      symbol              in file     
     ---------        ----------------
     _DCL_runClamp_C1 ./main.obj      
     _DCL_runPID_C4   ./main.obj      

    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "picontrollertest1.out" not built

    Any idea on this to resolve? Thank you.

    Regards,
    Archie A.

  • Hi Archie,

    Yes, both DCL_runClamp_C1 and DCL_runPID_C4 are assembly functions, please find its assembly implementation in c2000ware_path\libraries\control\DCL\c28\source. And either paste into project directory or add the path as an include option.

    Best,

    Sen Wang

  • Hello Sen,

    We are still getting the error:

    Can you assist further?

    Thank you.

    Regards,
    Archie A.

  • Hi Archie,

    Yes, I see the file strcture on the left side of CCS which has a "DCL32.h' file. Nonetheless we don't have a file named DCL32.h. Can you check if this file is accidentally renamed from "DCLF32.h"? 

    Thanks,

    Sen Wang

  • Hi Sen,

    Thank you for your support.

    We have used the c2000 version5 this time where "DCLF32.h" is available, attaching the error message:

    Thank you.

    Regads,
    Archie

  • Hi Archie,

    both DCL_runClamp_C1 and DCL_runPID_C4 are assembly functions, please find its assembly implementation in c2000ware_path\libraries\control\DCL\c28\source. And either paste into project directory or add the "source" path as an include option.

    Best,

    Sen Wang

  • Hi Sen,

    I have added the DCL_Clamp_C1.asm and DCL_PID_C4.asm files the project is built without error but with one warning:

    Found this of the same error - TMDSCNCD28335: I have error after execution of program. However, I am unable to understand the solution given in the post. It is mentioned to write directly to the coefficients in the controller structure in your main program.

    In the example, Example_F28069_PID.c which I am trying to execute the controller is already initialized in main() and DCL_PID pid1 = PID_DEFAULTS; is globally defined.

    Also, referring to the Example for DF22 the controller is initialized in the main() and DCL_DF22 controller1 = DF22_DEFAULTS; DCL_DF22 controller2 = DF22_DEFAULTS; is defined; but here the data array is initialized.

    Is initialization of the data array needed to remove the warning? I am unclear about the linker command file.

    Regards,
    Archie A.

  • Hi Archie, 

    Richard in this the post you found was also explaining how to initalize DCL strcture.

    DCL defines a memory section called "dclfuncs" that was meant for the users to map the section into the memory sectors specified in the linker script. Your linker script in this case seems to be F2837xD_Headers_nonBIOS_cpu1.cmd (any file ends with .cmd extension), please go into this section, and add the following line within SECTIONS:

    dclfuncs   : > RAMGS0,   PAGE = 1   

    Please change RAMGS0 to any memory sectors that was defined in your linker script. And change the PAGE number to which ever page that memory sectors resides in.

    Like what Richard said, this is only a warning, by default compiler will place the memory section to whichever sector it sees fit if not specified.

    Best,

    Sen Wang

  • Hello Sen,

    Thank you for your help.

    The solution provided resolves the issue now the program builds without any error or warning.

    Regards,
    Archie A.