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/LAUNCHXL-F28377S: I need instructions to create a new CCS Project with ALL the necessary files/configurations

Part Number: LAUNCHXL-F28377S

Tool/software: Code Composer Studio

Hi all,

I have a F28377S launchpad and I'm using CCS version 8.0.0 but i also tried this on version 7.4. I'm also using the most recent version of C2000Ware (C2000Ware_1_00_03_00_Software). Note that I uninstalled both CCS and c2000Ware in frustration and it didn't help. I'm trying to create a new CCS project following the step by step instructions detailed in the F2837xS Firmware Development Package. I've attached the instructions to this post. I'm also trying to add driverlib support so I followed the instructions in that section as well. I followed the instructions exactly as they are detailed, but there are still errors when I try to build my project (new_project). If the main file is just a blank main file, it works, but as soon as you input driverlib functions, there are errors. I've included my code, project explorer configuration, and the resulting errors below:

-----------------

main.c

#include "driverlib.h"
#include "device.h"

void main(void)
{
Device_init();
GPIO_setMasterCore(85, GPIO_CORE_CPU1);
Interrupt_initModule();

InitSysPll(XTAL_OSC,IMULT_40,FMULT_1,PLLCLK_BY_2);
SysCtlClockSet(SYSCTL_OSCSRC_XTAL | SYSCTL_PLL_ENABLE | SYSCTL_IMULT(40) | SYSCTL_SYSDIV(2));
}

------------

Project Explorer Image

------------

console/errors

**** Build of configuration Debug for project new_project ****

"C:\\ti\\ccsv8\\utils\\bin\\gmake" -k -j 4 all -O

Building file: "../main.c"
Invoking: C2000 Compiler
"C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla1 --tmu_support=tmu0 --vcu_support=vcu2 --include_path="C:/Users/Bryan/Desktop/CCS/Delfino/new_project" --include_path="C:/ti/C2000Ware_1_00_03_00_Software/driverlib/f2837xs/driverlib" --include_path="C:/ti/C2000Ware_1_00_03_00_Software/device_support/f2837xs/common/include" --include_path="C:/ti/C2000Ware_1_00_03_00_Software/device_support/f2837xs/headers/include" --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.1.LTS/include" --define=CPU1 --define=_LAUNCHXL_F28377S -g --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="main.d_raw" "../main.c"

>> Compilation failure
subdir_rules.mk:44: recipe for target 'main.obj' failed
"../main.c", line 10: warning #225-D: function "InitSysPll" declared implicitly
"../main.c", line 10: error #20: identifier "XTAL_OSC" is undefined
"../main.c", line 10: error #20: identifier "IMULT_40" is undefined
"../main.c", line 10: error #20: identifier "FMULT_1" is undefined
"../main.c", line 10: error #20: identifier "PLLCLK_BY_2" is undefined
"../main.c", line 11: warning #225-D: function "SysCtlClockSet" declared implicitly
4 errors detected in the compilation of "../main.c".
gmake: *** [main.obj] Error 1
gmake: Target 'all' not remade because of errors.

**** Build Finished ****

---------------

Next, I tried simply importing a sample/blank project from C2000Ware through the Resource Explorer. I imported both the "empty_bitfield_driverlib_project" and the "empty_driverlib_project" and edited their main functions as follows and pasted the console outputs/errors:

empty_driverlib_main.c

#include "driverlib.h"
#include "device.h"

void main(void)
{
Device_init();
GPIO_setMasterCore(85, GPIO_CORE_CPU1);
Interrupt_initModule();

InitSysPll(XTAL_OSC,IMULT_40,FMULT_1,PLLCLK_BY_2);
SysCtlClockSet(SYSCTL_OSCSRC_XTAL | SYSCTL_PLL_ENABLE | SYSCTL_IMULT(40) | SYSCTL_SYSDIV(2));
}

------------

 ------------

console/errors

**** Build of configuration CPU1_RAM for project empty_driverlib_project ****

"C:\\ti\\ccsv8\\utils\\bin\\gmake" -k -j 4 all -O

Building file: "../empty_driverlib_main.c"
Invoking: C2000 Compiler
"C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 -Ooff --include_path="C:/Users/Bryan/Desktop/CCS/Delfino/empty_driverlib_project" --include_path="C:/Users/Bryan/Desktop/CCS/Delfino/empty_driverlib_project/device" --include_path="C:/ti/C2000Ware_1_00_03_00_Software/driverlib/f2837xs/driverlib" --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.1.LTS/include" --define=DEBUG --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="empty_driverlib_main.d_raw" "../empty_driverlib_main.c"

>> Compilation failure
subdir_rules.mk:9: recipe for target 'empty_driverlib_main.obj' failed
"../empty_driverlib_main.c", line 10: warning #225-D: function "InitSysPll" declared implicitly
"../empty_driverlib_main.c", line 10: error #20: identifier "XTAL_OSC" is undefined
"../empty_driverlib_main.c", line 10: error #20: identifier "IMULT_40" is undefined
"../empty_driverlib_main.c", line 10: error #20: identifier "FMULT_1" is undefined
"../empty_driverlib_main.c", line 10: error #20: identifier "PLLCLK_BY_2" is undefined
"../empty_driverlib_main.c", line 11: warning #225-D: function "SysCtlClockSet" declared implicitly
4 errors detected in the compilation of "../empty_driverlib_main.c".
gmake: *** [empty_driverlib_main.obj] Error 1
gmake: Target 'all' not remade because of errors.

**** Build Finished ****

--------------

empty_bitfield_driverlib_main.c

#include "F28x_Project.h"
#include "driverlib.h"
#include "device.h"

void main(void)
{
Device_init();
GPIO_setMasterCore(85, GPIO_CORE_CPU1);
Interrupt_initModule();

InitSysPll(XTAL_OSC,IMULT_40,FMULT_1,PLLCLK_BY_2);
SysCtlClockSet(SYSCTL_OSCSRC_XTAL | SYSCTL_PLL_ENABLE | SYSCTL_IMULT(40) | SYSCTL_SYSDIV(2));

}

-------------------

-------------------

console/errors

**** Build of configuration CPU1_RAM for project empty_bitfield_driverlib_project ****

"C:\\ti\\ccsv8\\utils\\bin\\gmake" -k -j 4 all -O

Building file: "../empty_bitfield_driverlib_main.c"
Invoking: C2000 Compiler
"C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 -Ooff --include_path="C:/Users/Bryan/Desktop/CCS/Delfino/empty_bitfield_driverlib_project" --include_path="C:/ti/C2000Ware_1_00_03_00_Software/device_support/f2837xs/common/include" --include_path="C:/ti/C2000Ware_1_00_03_00_Software/device_support/f2837xs/headers/include" --include_path="C:/Users/Bryan/Desktop/CCS/Delfino/empty_bitfield_driverlib_project/device" --include_path="C:/ti/C2000Ware_1_00_03_00_Software/driverlib/f2837xs/driverlib" --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.1.LTS/include" --define=DEBUG --define=_DUAL_HEADERS --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="empty_bitfield_driverlib_main.d_raw" "../empty_bitfield_driverlib_main.c"

>> Compilation failure
subdir_rules.mk:65: recipe for target 'empty_bitfield_driverlib_main.obj' failed
"../empty_bitfield_driverlib_main.c", line 11: error #20: identifier "FMULT_1" is undefined
"../empty_bitfield_driverlib_main.c", line 12: warning #225-D: function "SysCtlClockSet" declared implicitly
1 error detected in the compilation of "../empty_bitfield_driverlib_main.c".
gmake: *** [empty_bitfield_driverlib_main.obj] Error 1
gmake: Target 'all' not remade because of errors.

**** Build Finished ****

-------------------

I am aware that this code doesn't "do" anything, but I wanted to illustrate what functions would/wouldn't trigger an error. Note that I used the InitSysPll and SysCtlClockSet functions because those are the two functions that gave me the errors that started this goose chase. I want to be clear, however. Although I'd like to make sure I can use those two functions, I'm not just looking for a solution that narrow. I'd like to figure out how to generate from scratch or import a fully configured blank project, that has all the dependencies and can leverage all of the driverlib and system functions out the box.

If you have a solution, please be as clear as you can since I'm clearly no expert. I would like step by step instructions please. Assume I'm opening this MCU and CCS for the first time.

Thanks,

B

  • Bryan

    What you want to use is the third project you listed, empty_bitfield_driverlib_project.
    This combines the bit field and driverlib.
    You're seeing errors because of two issues:
    1. FMULT_1 is not a valid macro. See F2837xS_Examples.h
    2. SysCtlClockSet() is the API from the deprecated driverlib (/common/deprecated/driverlib). Don't use this one, it's only to support legacy customers. The correct driverlib is at ~/c2000ware/driverlib/f2837xs/driverlib). That is the driverlib that is setup in the example and the API for setting up PLL is SysCtl_setClock().

    Best regards
    Chris
  • This helped, thanks! I found an example on the forum using FMULT_1 when it should have been FMULT_0.