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/DRV8301-69M-KIT: 7 errors occurring when building any Labs after doing Lab 2a. Can't find fix.

Part Number: DRV8301-69M-KIT
Other Parts Discussed in Thread: TMS320F28069, MOTORWARE

Tool/software: Code Composer Studio

To whomever may be able to help,

I've been attempting to do the labs with the DRV8301-69M Kit with the xF2806F (TMS320F28069) control card. I have no issue building and loading Lab 1 and getting the LED to flash.

However, when I do Lab 2a, I can build it the first time and load it to the target, run the scripting console and complete the lab, including updating the specifications for my defined motor, which I've called 9225_Motor in the file. I don't touch any of the other lines of code or the ctrl.obj, hal.obj or proj_lab file and yet when I try to do Lab 2b, any other lab or Lab 2a over again suddenly I get the following 7 errors which I haven't been able to resolve.

Please help, I'm sure I've done something stupid but I have followed installation and lab instructions to the dot.

Kind Regards,

James

  • Just having read a number of closely related posts throughtout the day here in Australia, I thought i would add the full build console window to the above so you can look at build paths.



    **** Build of configuration Release for project proj_lab02c ****

    "C:\\ti\\ccsv7\\utils\\bin\\gmake" -k all
    'Building file: C:/ti/motorware/motorware_1_01_00_17/sw/modules/ctrl/src/32b/ctrl.c'
    'Invoking: C2000 Compiler'
    "C:/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.1.LTS/bin/cl2000" -v28 -ml -mt -O2 --include_path="C:/ti/motorware/motorware_1_01_00_17/sw/modules/hal/boards/drv8301kit_revD/f28x/f2806x/src/" --include_path="C:/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.1.LTS/include" --include_path="C:/ti/motorware/motorware_1_01_00_17/sw/solutions/instaspin_foc/boards/drv8301kit_revD/f28x/f2806xF/src" --include_path="C:/ti/motorware/motorware_1_01_00_17" -g --define=FAST_ROM_V1p6 --diag_warning=225 --display_error_number --preproc_with_compile --preproc_dependency="ctrl.d" "C:/ti/motorware/motorware_1_01_00_17/sw/modules/ctrl/src/32b/ctrl.c"

    >> Compilation failure
    subdir_rules.mk:44: recipe for target 'ctrl.obj' failed
    "C:/ti/motorware/motorware_1_01_00_17/sw/solutions/instaspin_foc/boards/drv8301kit_revD/f28x/f2806xF/src/user.h", line 344: error #41: expected an identifier
    "C:/ti/motorware/motorware_1_01_00_17/sw/solutions/instaspin_foc/boards/drv8301kit_revD/f28x/f2806xF/src/user.h", line 380: error #18: expected a ")"
    2 errors detected in the compilation of "C:/ti/motorware/motorware_1_01_00_17/sw/modules/ctrl/src/32b/ctrl.c".
    gmake: *** [ctrl.obj] Error 1
    'Building file: C:/ti/motorware/motorware_1_01_00_17/sw/modules/hal/boards/drv8301kit_revD/f28x/f2806x/src/hal.c'
    'Invoking: C2000 Compiler'
    "C:/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.1.LTS/bin/cl2000" -v28 -ml -mt -O2 --include_path="C:/ti/motorware/motorware_1_01_00_17/sw/modules/hal/boards/drv8301kit_revD/f28x/f2806x/src/" --include_path="C:/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.1.LTS/include" --include_path="C:/ti/motorware/motorware_1_01_00_17/sw/solutions/instaspin_foc/boards/drv8301kit_revD/f28x/f2806xF/src" --include_path="C:/ti/motorware/motorware_1_01_00_17" -g --define=FAST_ROM_V1p6 --diag_warning=225 --display_error_number --preproc_with_compile --preproc_dependency="hal.d" "C:/ti/motorware/motorware_1_01_00_17/sw/modules/hal/boards/drv8301kit_revD/f28x/f2806x/src/hal.c"

    >> Compilation failure
    subdir_rules.mk:79: recipe for target 'hal.obj' failed
    "C:/ti/motorware/motorware_1_01_00_17/sw/solutions/instaspin_foc/boards/drv8301kit_revD/f28x/f2806xF/src/user.h", line 344: error #41: expected an identifier
    "C:/ti/motorware/motorware_1_01_00_17/sw/solutions/instaspin_foc/boards/drv8301kit_revD/f28x/f2806xF/src/user.h", line 380: error #18: expected a ")"
    2 errors detected in the compilation of "C:/ti/motorware/motorware_1_01_00_17/sw/modules/hal/boards/drv8301kit_revD/f28x/f2806x/src/hal.c".
    gmake: *** [hal.obj] Error 1
    'Building file: C:/ti/motorware/motorware_1_01_00_17/sw/solutions/instaspin_foc/src/proj_lab02c.c'
    'Invoking: C2000 Compiler'
    "C:/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.1.LTS/bin/cl2000" -v28 -ml -mt -O2 --include_path="C:/ti/motorware/motorware_1_01_00_17/sw/modules/hal/boards/drv8301kit_revD/f28x/f2806x/src/" --include_path="C:/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.1.LTS/include" --include_path="C:/ti/motorware/motorware_1_01_00_17/sw/solutions/instaspin_foc/boards/drv8301kit_revD/f28x/f2806xF/src" --include_path="C:/ti/motorware/motorware_1_01_00_17" -g --define=FAST_ROM_V1p6 --diag_warning=225 --display_error_number --preproc_with_compile --preproc_dependency="proj_lab02c.d" "C:/ti/motorware/motorware_1_01_00_17/sw/solutions/instaspin_foc/src/proj_lab02c.c"

    >> Compilation failure
    subdir_rules.mk:135: recipe for target 'proj_lab02c.obj' failed
    "C:/ti/motorware/motorware_1_01_00_17/sw/solutions/instaspin_foc/boards/drv8301kit_revD/f28x/f2806xF/src/user.h", line 344: error #41: expected an identifier
    "C:/ti/motorware/motorware_1_01_00_17/sw/solutions/instaspin_foc/boards/drv8301kit_revD/f28x/f2806xF/src/user.h", line 380: error #18: expected a ")"
    2 errors detected in the compilation of "C:/ti/motorware/motorware_1_01_00_17/sw/solutions/instaspin_foc/src/proj_lab02c.c".
    gmake: *** [proj_lab02c.obj] Error 1
    'Building file: C:/ti/motorware/motorware_1_01_00_17/sw/modules/user/src/32b/user.c'
    'Invoking: C2000 Compiler'
    "C:/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.1.LTS/bin/cl2000" -v28 -ml -mt -O2 --include_path="C:/ti/motorware/motorware_1_01_00_17/sw/modules/hal/boards/drv8301kit_revD/f28x/f2806x/src/" --include_path="C:/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.1.LTS/include" --include_path="C:/ti/motorware/motorware_1_01_00_17/sw/solutions/instaspin_foc/boards/drv8301kit_revD/f28x/f2806xF/src" --include_path="C:/ti/motorware/motorware_1_01_00_17" -g --define=FAST_ROM_V1p6 --diag_warning=225 --display_error_number --preproc_with_compile --preproc_dependency="user.d" "C:/ti/motorware/motorware_1_01_00_17/sw/modules/user/src/32b/user.c"

    >> Compilation failure
    subdir_rules.mk:191: recipe for target 'user.obj' failed
    "C:/ti/motorware/motorware_1_01_00_17/sw/solutions/instaspin_foc/boards/drv8301kit_revD/f28x/f2806xF/src/user.h", line 344: error #41: expected an identifier
    "C:/ti/motorware/motorware_1_01_00_17/sw/solutions/instaspin_foc/boards/drv8301kit_revD/f28x/f2806xF/src/user.h", line 380: error #18: expected a ")"
    2 errors detected in the compilation of "C:/ti/motorware/motorware_1_01_00_17/sw/modules/user/src/32b/user.c".
    gmake: *** [user.obj] Error 1
    gmake: Target 'all' not remade because of errors.

    **** Build Finished ****

    Hope this helps.

    Cheers,

    James
  • James,

    I just imported and built the out-of-box example proj_lab02c from Motorware without any errors. I am using the same version of Motorware as you and also the same version of CCS (CCSv7 with compiler 16.9.1.LTS). 

    James Hill71 said:
    "C:/ti/motorware/motorware_1_01_00_17/sw/solutions/instaspin_foc/boards/drv8301kit_revD/f28x/f2806xF/src/user.h", line 344: error #41: expected an identifier
    "C:/ti/motorware/motorware_1_01_00_17/sw/solutions/instaspin_foc/boards/drv8301kit_revD/f28x/f2806xF/src/user.h", line 380: error #18: expected a ")"

    The errors you show are coming from user.h. Could you check the lines mentioned in the error message and verify that you did not inadvertently edit that file?

  • 7360.user.hHi AartiG,

    Thank you. It works when I first run it out of the box too but once I do the part of Lab 2a of adding my own motor it compiles the first time but not the subsequent times. I have added the user.h file as it is after I edit it for Lab 2a that the issue occurs and I then have the follow on effect of causing the errors for all the subsequent labs occurs.

  • James,

    The error stems from the changes made to user.h, specifically 

    #define 9225_Motor                  104

    Per the C standard, the "name" in a #define has the same form as a variable name, which can be made up of letters and digits but the first character must be a letter.

    If you change 9225_Motor to something that has a letter in the first character the error should disappear. 

  • Thank you AartiG!