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.

Getting Dual Motor Control Kit to work in CCS 4

Other Parts Discussed in Thread: CONTROLSUITE

Hello,

As i am both pretty new with MCU programming and CCS, I was wondering if anyone has got the dual motor control kit to work in CCS4.

The samples included on the disk was written for CCS 3.3 and I had some issues importing it (even as legacy project).

However, i did find Crosshairs' TSP on this URL:
http://crosshairsembedded.com/TMDS2MTRPFCKIT

That is the a rewritten edition of the sample project that is supposed to work on CCS4, but i get "unresolved symbol" error like this:

<Linking>

 undefined      first referenced                    
  symbol            in file                         
 ---------      ----------------                    
 _AdcRegs       ./2xPM_Sensorless.obj               
 _AdcResult     ./2xPM_Sensorless.obj               
 _CpuTimer0Regs ./2xPM_Sensorless.obj               
 _CpuTimer1Regs ./2xPM_Sensorless.obj               
 _CpuTimer2Regs ./2xPM_Sensorless.obj               
 _EPwm1Regs     ./2xPM_Sensorless.obj               
 _EPwm2Regs     ./2xPM_Sensorless.obj               
 _EPwm3Regs     ./2xPM_Sensorless.obj               
 _EPwm4Regs     ./2xPM_Sensorless.obj               
 _EPwm6Regs     ./2xPM_Sensorless.obj               
 _EQep1Regs     ./2xPM_Sensorless.obj               
 _FlashRegs     ./2xPM_Sensorless-DevInit_F2803x.obj
 _GpioCtrlRegs  ./2xPM_Sensorless.obj               
 _GpioDataRegs  ./2xPM_Sensorless.obj               
 _PieCtrlRegs   ./2xPM_Sensorless.obj               
 _PieVectTable  ./2xPM_Sensorless.obj               
 _SciaRegs      ./src Crosshairs/Commros_user.obj   
 _SysCtrlRegs   ./2xPM_Sensorless-DevInit_F2803x.obj

error: unresolved symbols remain
error: errors encountered during linking; "TMDS2MTRPFCKIT-2xPM_Sensorless.out"   not built

Below are some screens:

  • Yngve,

    let's look at your includes:

    Try remove from "Include options" of project properties 3 lines after "...math/IQmath/v15c...". Paste instead them the following:

    C:\ti\controlSUITE\device_support\f2803x\v127\DSP2803x_common\include\

    C:\ti\controlSUITE\device_support\f2803x\v127\DSP2803x_headers\include\

    Regards,

    Igor

  • Hi Igor and thank you for your reply :-)

    Not quite sure what you meant, but I removed the "math/IQmath/v15c"-line from include options list and added the two others you suggested.

    The include list now looks like this:

    (Not sure why the flashing leds are there).

    I cleaned the project and rebuilt it.

    The same issues are still there along with a new one:

    <Linking>
    "../F28035_FLASH_2xPM_Sensorless.CMD", line 90: error: placement fails for
       object ".text", size 0x1fc2 (page 0).  Available ranges:
       FLASHA       size: 0x1f80       unused: 0x1f80       max hole: 0x1f80    

     undefined      first referenced                    
      symbol            in file                         
     ---------      ----------------                    
     _AdcRegs       ./2xPM_Sensorless.obj               
     _AdcResult     ./2xPM_Sensorless.obj               
     _CpuTimer0Regs ./2xPM_Sensorless.obj               
     _CpuTimer1Regs ./2xPM_Sensorless.obj               
     _CpuTimer2Regs ./2xPM_Sensorless.obj               
     _EPwm1Regs     ./2xPM_Sensorless.obj               
     _EPwm2Regs     ./2xPM_Sensorless.obj               
     _EPwm3Regs     ./2xPM_Sensorless.obj               
     _EPwm4Regs     ./2xPM_Sensorless.obj               
     _EPwm6Regs     ./2xPM_Sensorless.obj               
     _EQep1Regs     ./2xPM_Sensorless.obj               
     _FlashRegs     ./2xPM_Sensorless-DevInit_F2803x.obj
     _GpioCtrlRegs  ./2xPM_Sensorless.obj               
     _GpioDataRegs  ./2xPM_Sensorless.obj               
     _PieCtrlRegs   ./2xPM_Sensorless.obj               
     _PieVectTable  ./2xPM_Sensorless.obj               
     _SciaRegs      ./src Crosshairs/Commros_user.obj   
     _SysCtrlRegs   ./2xPM_Sensorless-DevInit_F2803x.obj
     __IQdiv2       ./2xPM_Sensorless.obj               
     __IQmpy2       ./2xPM_Sensorless.obj               

    error: unresolved symbols remain
    error: errors encountered during linking; "TMDS2MTRPFCKIT-2xPM_Sensorless.out"
       not built

    (Below are contents from line 51 to line 90 in the F28035_FLASH_2xPM_Sensorless.CMD-file

    Not sure why this section suddenly is too big.

    ===========================

    PAGE 0:
        progRAM        : origin = 0x008000, length = 0x001000 /* on-chip RAM (L0-L2)*/
        OTP         : origin = 0x3D7800, length = 0x000400     /* on-chip OTP */
        FLASHH      : origin = 0x3E8000, length = 0x002000     /* on-chip FLASH */
        FLASHG      : origin = 0x3EA000, length = 0x002000     /* on-chip FLASH */
        FLASHF      : origin = 0x3EC000, length = 0x002000     /* on-chip FLASH */
        FLASHE      : origin = 0x3EE000, length = 0x002000     /* on-chip FLASH */
        FLASHD      : origin = 0x3F0000, length = 0x002000     /* on-chip FLASH */
        FLASHC      : origin = 0x3F2000, length = 0x002000     /* on-chip FLASH */
        FLASHA      : origin = 0x3F6000, length = 0x001F80     /* on-chip FLASH */
        CSM_RSVD    : origin = 0x3F7F80, length = 0x000076     /* Part of FLASHA.  Program with all 0x0000 when CSM is in use. */
        BEGIN       : origin = 0x3F7FF6, length = 0x000002     /* Part of FLASHA.  Used for "boot to Flash" bootloader mode. */
        CSM_PWL     : origin = 0x3F7FF8, length = 0x000008     /* Part of FLASHA.  CSM password locations in FLASHA */

        IQTABLES    : origin = 0x3FE000, length = 0x000B50     /* IQ Math Tables in Boot ROM */
        IQTABLES2   : origin = 0x3FEB50, length = 0x00008C     /* IQ Math Tables in Boot ROM */
        IQTABLES3   : origin = 0x3FEBDC, length = 0x0000AA     /* IQ Math Tables in Boot ROM */

        BOOTROM     : origin = 0x3FF27C, length = 0x000D44     /* Boot ROM */
        RESET       : origin = 0x3FFFC0, length = 0x000002     /* part of boot ROM  */
        VECTORS     : origin = 0x3FFFC2, length = 0x00003E     /* part of boot ROM  */

    PAGE 1 :
        BOOT_RSVD   : origin = 0x000000, length = 0x000050     /* Part of M0, BOOT rom will use this for stack */
        RAMM0       : origin = 0x000050, length = 0x0003B0     /* on-chip RAM block M0 */
           RAMM1       : origin = 0x000400, length = 0x000400     /* on-chip RAM block M1 */
        dataRAM        : origin = 0x009000, length = 0x001000     /* data RAM (L3) */
        FLASHB      : origin = 0x3F4000, length = 0x002000     /* on-chip FLASH */

        CLA_CPU_MSGRAM  : origin = 0x001480, length = 0x000080 /* CLA-R/W, CPU-R message RAM */
        CPU_CLA_MSGRAM  : origin = 0x001500, length = 0x000080 /* CPU-R/W, CLA-R message RAM */
    }
     
     
    SECTIONS
    {
       /* Allocate program areas: */
       .cinit            : > FLASHC,     PAGE = 0
       .pinit            : > FLASHA,     PAGE = 0
       .text             : > FLASHA,     PAGE = 0

  • Hi,

    There seems to be some issue with the cmd file. I guess, its not properly configured!

    Try using one of these cmd files:

    6404.2xPM_Sensorless_v1_1.zip

    Regards,

    Gautam

  • Thank you for your suggestion, Gautam.

    I tried replacing the existing .cmd-files with the ones from the zip file but it had no effect on the problem.

    Below is the project tree as it is configured now (with excluded files and so on)

    And here is the error from the build:

    <Linking>
    "../F28035_RAM_2xPM_Sensorless.CMD", line 81: error: placement fails for object
       ".text", size 0x1fc2 (page 0).  Available ranges:
       progRAM      size: 0x1800       unused: 0x1728       max hole: 0x1728    
    "../F28035_RAM_2xPM_Sensorless.CMD", line 90: error: run placement fails for
       object ".ebss", size 0x92b (page 1).  Available ranges:
       dataRAM      size: 0x800        unused: 0x4c6        max hole: 0x4c6     

     undefined      first referenced                    
      symbol            in file                         
     ---------      ----------------                    
     _AdcRegs       ./2xPM_Sensorless.obj               
     _AdcResult     ./2xPM_Sensorless.obj               
     _CpuTimer0Regs ./2xPM_Sensorless.obj               
     _CpuTimer1Regs ./2xPM_Sensorless.obj               
     _CpuTimer2Regs ./2xPM_Sensorless.obj               
     _EPwm1Regs     ./2xPM_Sensorless.obj               
     _EPwm2Regs     ./2xPM_Sensorless.obj               
     _EPwm3Regs     ./2xPM_Sensorless.obj               
     _EPwm4Regs     ./2xPM_Sensorless.obj               
     _EPwm6Regs     ./2xPM_Sensorless.obj               
     _EQep1Regs     ./2xPM_Sensorless.obj               
     _FlashRegs     ./2xPM_Sensorless-DevInit_F2803x.obj
     _GpioCtrlRegs  ./2xPM_Sensorless.obj               
     _GpioDataRegs  ./2xPM_Sensorless.obj               
     _PieCtrlRegs   ./2xPM_Sensorless.obj               
     _PieVectTable  ./2xPM_Sensorless.obj               
     _SciaRegs      ./src Crosshairs/Commros_user.obj   
     _SysCtrlRegs   ./2xPM_Sensorless-DevInit_F2803x.obj
     __IQdiv2       ./2xPM_Sensorless.obj               
     __IQmpy2       ./2xPM_Sensorless.obj               

    error: unresolved symbols remain
    error: errors encountered during linking; "TMDS2MTRPFCKIT-2xPM_Sensorless.out"
       not built

    >> Compilation failure

  • Hi Yngve!

    Try to add into your project folder file  DSP2803x_GlobalVariableDefs.c  from

    C:\ti\controlSUITE\device_support\f2803x\v127\DSP2803x_headers\source\

    Regards,

    Igor

  • Hi Igor!

    That had a great effect on the missing symbols, but now they are not properly allocated.

    I still feel this was a major step forward :)

  • Yngve,

    at first let's look at unresolved symbols: IQdiv2 & IQmpy2. Restore please in "Include options" path "....math/IQmath/v15c... ". I didn't mean remove this path. I have meant remove only 3 path lines after him and add

    C:\ti\controlSUITE\device_support\f2803x\v127\DSP2803x_common\include\

    C:\ti\controlSUITE\device_support\f2803x\v127\DSP2803x_headers\include\

    (you did that already but old 3 paths which I mean you didn't remove still)

    Regards,

    Igor 

  • Hi Igor, sorry about the misunderstanding.

    I have removed the 2 lines after IQmath/v15c, but i can't find where to remove this flashingLeds-stuff. It is not listed in the include options, and it is not possible to delete directly from the project folder tree.

    I also had some missing files-problem after removing the two include-folders, but after re-adding only the required files I have now no missing symbols - only placement fails.

    Thank you very much, this is another step forward. I might actually need to connect the motors soon :)

  • Hi Yngve!

    Yngve Solbakken said:

     I have now no missing symbols - only placement fails.

    I suspect the remaining problem is the problem of used command linker file (CMD). It is unlikely that anything else matter...

    Regards,

    Igor

  • Yes, I believe so myself.

    It seems that .text is getting insufficient space and that the other ones are simply not listed in the cmd-file.

    I am trying all the different versions of the cmd-files now (i have 6-7 files with the same name spread around in different TSPs, folders etc).

    Is it possible to manually edit this file to enlarge the allocated memory space, or is this done automatically somehow?

  • Igor Gorbachev said:

    Hi Yngve!

     I have now no missing symbols - only placement fails.

    I suspect the remaining problem is the problem of used command linker file (CMD). It is unlikely that anything else matter...

    Regards,

    Igor

    [/quote]

    Hi, I got it to work!

    I just played around in the .CMD-file and increased som memory areas and watch as the number of placement errors decreased.

    Finally there were no errors, so now i can connect the motors :)

  • Yngve,

    try to edit your CMD file thus:

    .cinit : >> FLASHA | FLASHC | FLASHD, PAGE = 0
    .pinit : >> FLASHA | FLASHC | FLASHD, PAGE = 0
    .text : >> FLASHA | FLASHC | FLASHD, PAGE = 0

    Regards,

    Igor

  • Congrats, Yngve!

    Good luck,

    Igor