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.

The difference between lab2a and lab2b

Other Parts Discussed in Thread: MOTORWARE

hello,

i could ID motor parament correctly by lab2a, but i found that the ctrl.c did not exist in lab2a project(ctrl_run() is defined in ctrl.c),.as userguide said, ctrl_run is running at ROM.

meanwhile,  lab2b had included ctrl.c in project's file system.

How dose the compiler decide to compile the funtion(ctrl_run) from ROM or ctrl.c?if the project had some config in any file that i didn't found.

thank you.

  • by the project settings. If the ctrl.c file is included it uses that file.
  • hello ChrisClearman,

    now i want to Integration of motorware projects(lab2 & lab5c &lab12b) for my application, could you tell me the location of project settings?

    and i have a strange phenomenon that if i add ctrl.c in lab2a project or remove ctrl.c in lab2b, my motor could not be ID correctly.

    durning motor identification, the statemachine will become EST_ERROR with same config in user.h
  • The project settings can be found by right clicking on the project name in CCS and then selecting "properties."  In properties go to the tab shown in the picture below.

    All of the files for that project are linked here.  Another way of getting to the linked files is to go to the actual ".project" file that is created by CCS.  The .project file is located in the project folder.  For example for project 2a in MotorWare go to the link "C:\ti\motorware_1_01_00_14\sw\solutions\instaspin_foc\boards\drv8301kit_revD\f28x\f2806xF\projects\ccs5\proj_lab02a."  In this folder you will find the .project file.  It is a text file that contains the setup information for the CCS project.  If you want to find where proj_lab2a.c is linked from, look for the following script.

      <link>
       <name>proj_lab02a.c</name>
       <type>1</type>
       <locationURI>MW_INSTALL_DIR/sw/solutions/instaspin_foc/src/proj_lab02a.c</locationURI>
      </link>

    MW_INSTALL_DIR always points inside of the MotorWare folder i.e. in this case:  c:\ti\motorware_1_01_00_14\.

  • It looks like the picture that I inserted did not show.  I'll try it again with a different approach.

  • sorry about i could not see the picture you give to me, i guess there could had some problem about network.

    i have found the ".project" file , but i couldn't find out the explanation for ctrl_run() using ROM or ctrl.c

    if i missed something in ".project"?
  • thank you, i see the picture now
    but i could not understand what decide the ctrl_run compiled from ROM and ctrl.c
  • having the ctrl.c in the project forces ctrl.c to be used, which includes ctrl.h
    without it the compiler uses the CTRL functions defined in the ROM_symbols library.
  • and i have a strange phenomenon that if i add ctrl.c in lab2a project or remove ctrl.c in lab2b, my motor could not be ID correctly.

    durning motor identification, the statemachine will become EST_ERROR with same config in user.h