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.

LAUNCHXL-F28069M: Creating an Independent Motorware Project

Part Number: LAUNCHXL-F28069M
Other Parts Discussed in Thread: MOTORWARE, , BOOSTXL-DRV8301

We have been using MotorWare and the LAUNCHXL-F28069M/BOOSTXL-DRV8301 combo for a while now.  We use the drive for different projects - this one to run a BLDC motor at constant speed; this one to run a different motor for a ramped acoustic test; etc.  The problem we continually ran into was trying to manage all of our "configurations". Matt Meier has a good procedure (see Jul 18 2016 post under Motorware setup for independent projects) that works but requires copying and modifying most all of the files associated with a project.  This is problematic in that each change in MotorWare requires a redo of the procedure.  Since most of our changes were to the main project file (the Labxxx.c file) and hal.c (along with hal.h), we developed a slightly different procedure.  Our procedure is listed below for those having the same problem.

Create an independent project (Instaspin Motion, F2806xM processor, Motorware_1_01_00_18)

1.       Import MotorWare project that will serve as template.

a.       Project->Import CCS Projects…

b.       Browse…

c.       C:\ti\motorware\motorware_1_01_00_18\sw\solutions\instaspin_motion\boards\boostxldrv8301_revB\f28x\f2806xM\projects

d.       Select project and then click on Finish.

2.       Create new CCS Project.

a.       File->New->CCS Project

b.       Change target to generic C28xx device

c.       Select Empty Project (with main.c)

d.       Give project meaningful name (e.g., Lab6c_28069M_8301).  Press Finish pushbutton when done.

3.       Copy .ccsproject, .cproject, and .project files from the MotorWare Project directory to the Project directory created in step 2 above:

a.       MotorWare Project Directory:

…\motorware_1_01_00_18\sw\solutions\instaspin_motion\boards\boostxldrv8301_revB\f28x\f2806xM\projects\ccs\proj_lab06c

b.       Project Directory:

…\documents\TI_DRIVE\Lab6c_28069M_8301

4.       In the new project directory (windows explorer), right click on .project and open in notepad.  On the 1st line, there will be <name>file_name</name>.  Change “file_name” to the name used in step 2.d above.  Save and exit .project file.

5.       Create a directory called Include in the Project Directory.

6.       Copy user.h, user_j1, and user_j5 from the MotorWare src directory to Include directory.

a.       MotorWare src Directory:

…\motorware_1_01_00_18\sw\solutions\instaspin_motion\boards\boostxldrv8301_revB\f28x\f2806xM\src

b.       Include Directory:

…\documents\TI_DRIVE\Lab6c_28069M_8301\Include

7.       Copy main.h, spintac_position, and spintac_velocity from the MotorWare Instaspin_Motion\scr directory to the Include directory.

a.       MotorWare Instaspin_Motion\src Directory:

…\motorware_1_01_00_18\sw\solutions\instaspin_motion\scr

b.       Include Directory:

…\documents\TI_DRIVE\Lab6c_28069M_8301\Include

8.       If changing hal.c, copy hal.h and hal_obj.h from MotorWare Hal directory to the include directory:

a.       MotorWare Hal Directory:

…\motorware_1_01_00_18\sw\modules\hal\boards\boostxldrv8301_revB\f28x\f2806x\src

b.       Include Directory:

…\documents\TI_DRIVE\Lab6c_28069M_8301\Include

AND copy hal.c from the MotorWare Hal directory to the new Project Directory:

a.       MotorWare Hal Directory:

…\motorware_1_01_00_18\sw\modules\hal\boards\boostxldrv8301_revB\f28x\f2806x\src

b.       Project Directory:

…\documents\TI_DRIVE\Lab6c_28069M_8301

9.       With the new project active (click on a file showing in the project explorer inside CCS), click Menu item Project->Properties.

10.   Click on the CCS General tab and then click on the Manage Configurations… pushbutton.

a.       Remove all configurations but the Flash and Release configurations. 

b.       Rename the Release configuration RAM (vice Release).    This should leave 2 configurations for the project: RAM and Flash.

c.       Click OK when done.

11.   Click on CCS Build.

12.   Click on Variables tab. 

13.   Click on MW_INSTALL_DIR and then click Edit…

14.   Change value to c:/ti/motorware/motorware_1_01_00_18 (i.e., make MW_INSTALL_DIR point to the motorware directory). [Yes…use “/” vice “\”.] Click OK once change made. 

15.   Change to the other configuration and make the same change (steps 11 through 14).

16.   Click OK again to save change (this will also exit properties). [NOTE – exiting the Properties dialog is important at this step.  If you don’t, the MW_INSTALL_DIR associated with the include files does not seem to update correctly which leads to problems.]

17.   Reopen the project properties dialog.

18.   Go to the C2000 Compiler->Include Options page.

19.   Click on “${PROJECT_ROOT}/../../../src”

20.   Click on the Edit icon.

21.   Change the directory to “${PROJECT_ROOT}/Include”.  This allows the \include directory from above to be used for all #include “xxx.h” include files. 

22.   IF changing hal.c, remove the "${MW_INSTALL_DIR}/sw/modules/hal/boards/boostxldrv8301_revB/f28x/f2806x/src/" include path.

23.   Click on OK pushbutton once change made.

24.   Change to the other configuration and make the same changes (steps 18 through 23).

25.   Click OK to exit Project Properties dialog.

26.   Copy contents of proj_labxxx.c file to the main.c file (inside CCS).

27.   Delete the proj_labxxx.c and hal.c (if changing hal.c) file links from CCS Project explorer.

28.   Update main.c , hal.c, and include files as needed.