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/TMS570LS1227: 333 errors whilst trying to compile example_sci_uart_9600.c

Part Number: TMS570LS1227
Other Parts Discussed in Thread: HALCOGEN

Tool/software: Code Composer Studio

Hi, I am trying to compile example_sci_uart_9600.c for the TMS570LS1227ZWT. I have followed the step by step guide here https://www.youtube.com/watch?v=YZcV68WSbGI 

But for reasons unknown to me I am getting 333 compilation errors (please see below).

For the first error, for instance, I see that it refers to line 1084 in adc.c, which reads:

config_reg->CONFIG_G1SAMPDISEN = ADC1_G1SAMPDISEN_CONFIGVALUE;

So my initial suspicion was that ADC1_G1SAMPDISEN_CONFIGVALUE was probably declared in some header file, which I had not include in my compilation instructions.

However, I have performed a file search (Ctrl+H) and ADC1_G1SAMPDISEN_CONFIGVALUE is only present in that specific location, adc.c line 1084, which is very odd.

Any ideas what i might be doing wrong? Thanks in advance!

The full list of errors is here :

Description Resource Path Location Type
#20 identifier "ADC1_BNDCR_CONFIGVALUE" is undefined adc.c /UART Test/source line 1078 C/C++ Problem
#20 identifier "ADC1_BNDEND_CONFIGVALUE" is undefined adc.c /UART Test/source line 1079 C/C++ Problem
#20 identifier "ADC1_CLOCKCR_CONFIGVALUE" is undefined adc.c /UART Test/source line 1071 C/C++ Problem
#20 identifier "ADC1_G0MODECR_CONFIGVALUE" is undefined adc.c /UART Test/source line 1072 C/C++ Problem
#20 identifier "ADC1_G0SAMP_CONFIGVALUE" is undefined adc.c /UART Test/source line 1080 C/C++ Problem
#20 identifier "ADC1_G0SAMPDISEN_CONFIGVALUE" is undefined adc.c /UART Test/source line 1083 C/C++ Problem
#20 identifier "ADC1_G0SRC_CONFIGVALUE" is undefined adc.c /UART Test/source line 1075 C/C++ Problem
#20 identifier "ADC1_G1MODECR_CONFIGVALUE" is undefined adc.c /UART Test/source line 1073 C/C++ Problem
#20 identifier "ADC1_G1SAMP_CONFIGVALUE" is undefined adc.c /UART Test/source line 1081 C/C++ Problem
#20 identifier "ADC1_G1SAMPDISEN_CONFIGVALUE" is undefined adc.c /UART Test/source line 1084 C/C++ Problem
#20 identifier "ADC1_G1SRC_CONFIGVALUE" is undefined adc.c /UART Test/source line 1076 C/C++ Problem
#20 identifier "ADC1_G2MODECR_CONFIGVALUE" is undefined adc.c /UART Test/source line 1074 C/C++ Problem
#20 identifier "ADC1_G2SAMP_CONFIGVALUE" is undefined adc.c /UART Test/source line 1082 C/C++ Problem
#20 identifier "ADC1_G2SAMPDISEN_CONFIGVALUE" is undefined adc.c /UART Test/source line 1085 C/C++ Problem
#20 identifier "ADC1_G2SRC_CONFIGVALUE" is undefined adc.c /UART Test/source line 1077 C/C++ Problem
#20 identifier "ADC1_OPMODECR_CONFIGVALUE" is undefined adc.c /UART Test/source line 1070 C/C++ Problem
#20 identifier "ADC1_PARCR_CONFIGVALUE" is undefined adc.c /UART Test/source line 1086 C/C++ Problem
#20 identifier "ADC2_BNDCR_CONFIGVALUE" is undefined adc.c /UART Test/source line 1140 C/C++ Problem
#20 identifier "ADC2_BNDEND_CONFIGVALUE" is undefined adc.c /UART Test/source line 1141 C/C++ Problem
#20 identifier "ADC2_CLOCKCR_CONFIGVALUE" is undefined adc.c /UART Test/source line 1133 C/C++ Problem
#20 identifier "ADC2_G0MODECR_CONFIGVALUE" is undefined adc.c /UART Test/source line 1134 C/C++ Problem
#20 identifier "ADC2_G0SAMP_CONFIGVALUE" is undefined adc.c /UART Test/source line 1142 C/C++ Problem
#20 identifier "ADC2_G0SAMPDISEN_CONFIGVALUE" is undefined adc.c /UART Test/source line 1145 C/C++ Problem
#20 identifier "ADC2_G0SRC_CONFIGVALUE" is undefined adc.c /UART Test/source line 1137 C/C++ Problem
#20 identifier "ADC2_G1MODECR_CONFIGVALUE" is undefined adc.c /UART Test/source line 1135 C/C++ Problem
#20 identifier "ADC2_G1SAMP_CONFIGVALUE" is undefined adc.c /UART Test/source line 1143 C/C++ Problem
#20 identifier "ADC2_G1SAMPDISEN_CONFIGVALUE" is undefined adc.c /UART Test/source line 1146 C/C++ Problem
#20 identifier "ADC2_G1SRC_CONFIGVALUE" is undefined adc.c /UART Test/source line 1138 C/C++ Problem
#20 identifier "ADC2_G2MODECR_CONFIGVALUE" is undefined adc.c /UART Test/source line 1136 C/C++ Problem
#20 identifier "ADC2_G2SAMP_CONFIGVALUE" is undefined adc.c /UART Test/source line 1144 C/C++ Problem
#20 identifier "ADC2_G2SAMPDISEN_CONFIGVALUE" is undefined adc.c /UART Test/source line 1147 C/C++ Problem
#20 identifier "ADC2_G2SRC_CONFIGVALUE" is undefined adc.c /UART Test/source line 1139 C/C++ Problem
#20 identifier "ADC2_OPMODECR_CONFIGVALUE" is undefined adc.c /UART Test/source line 1132 C/C++ Problem
#20 identifier "ADC2_PARCR_CONFIGVALUE" is undefined adc.c /UART Test/source line 1148 C/C++ Problem
#20 identifier "CAN1_ABOTR_CONFIGVALUE" is undefined can.c /UART Test/source line 1479 C/C++ Problem
#20 identifier "CAN1_BTR_CONFIGVALUE" is undefined can.c /UART Test/source line 1477 C/C++ Problem
#20 identifier "CAN1_CTL_CONFIGVALUE" is undefined can.c /UART Test/source line 1475 C/C++ Problem
#20 identifier "CAN1_ES_CONFIGVALUE" is undefined can.c /UART Test/source line 1476 C/C++ Problem
#20 identifier "CAN1_INTMUX0_CONFIGVALUE" is undefined can.c /UART Test/source line 1480 C/C++ Problem
#20 identifier "CAN1_INTMUX2_CONFIGVALUE" is undefined can.c /UART Test/source line 1481 C/C++ Problem
#20 identifier "CAN1_INTMUX3_CONFIGVALUE" is undefined can.c /UART Test/source line 1483 C/C++ Problem
#20 identifier "CAN1_RIOC_CONFIGVALUE" is undefined can.c /UART Test/source line 1485 C/C++ Problem
#20 identifier "CAN1_TEST_CONFIGVALUE" is undefined can.c /UART Test/source line 1478 C/C++ Problem
#20 identifier "CAN1_TIOC_CONFIGVALUE" is undefined can.c /UART Test/source line 1484 C/C++ Problem
#20 identifier "CAN2_ABOTR_CONFIGVALUE" is undefined can.c /UART Test/source line 1529 C/C++ Problem
#20 identifier "CAN2_BTR_CONFIGVALUE" is undefined can.c /UART Test/source line 1527 C/C++ Problem
#20 identifier "CAN2_CTL_CONFIGVALUE" is undefined can.c /UART Test/source line 1525 C/C++ Problem
#20 identifier "CAN2_ES_CONFIGVALUE" is undefined can.c /UART Test/source line 1526 C/C++ Problem
#20 identifier "CAN2_INTMUX0_CONFIGVALUE" is undefined can.c /UART Test/source line 1530 C/C++ Problem
#20 identifier "CAN2_INTMUX2_CONFIGVALUE" is undefined can.c /UART Test/source line 1531 C/C++ Problem
#20 identifier "CAN2_INTMUX3_CONFIGVALUE" is undefined can.c /UART Test/source line 1533 C/C++ Problem
#20 identifier "CAN2_RIOC_CONFIGVALUE" is undefined can.c /UART Test/source line 1535 C/C++ Problem
#20 identifier "CAN2_TEST_CONFIGVALUE" is undefined can.c /UART Test/source line 1528 C/C++ Problem
#20 identifier "CAN2_TIOC_CONFIGVALUE" is undefined can.c /UART Test/source line 1534 C/C++ Problem
#20 identifier "CAN3_ABOTR_CONFIGVALUE" is undefined can.c /UART Test/source line 1579 C/C++ Problem
#20 identifier "CAN3_BTR_CONFIGVALUE" is undefined can.c /UART Test/source line 1577 C/C++ Problem
#20 identifier "CAN3_CTL_CONFIGVALUE" is undefined can.c /UART Test/source line 1575 C/C++ Problem
#20 identifier "CAN3_ES_CONFIGVALUE" is undefined can.c /UART Test/source line 1576 C/C++ Problem
#20 identifier "CAN3_INTMUX0_CONFIGVALUE" is undefined can.c /UART Test/source line 1580 C/C++ Problem
#20 identifier "CAN3_INTMUX2_CONFIGVALUE" is undefined can.c /UART Test/source line 1581 C/C++ Problem
#20 identifier "CAN3_INTMUX3_CONFIGVALUE" is undefined can.c /UART Test/source line 1583 C/C++ Problem
#20 identifier "CAN3_RIOC_CONFIGVALUE" is undefined can.c /UART Test/source line 1585 C/C++ Problem
#20 identifier "CAN3_TEST_CONFIGVALUE" is undefined can.c /UART Test/source line 1578 C/C++ Problem
#20 identifier "CAN3_TIOC_CONFIGVALUE" is undefined can.c /UART Test/source line 1584 C/C++ Problem
#20 identifier "DCC1_CNT0CLKSRC_CONFIGVALUE" is undefined dcc.c /UART Test/source line 391 C/C++ Problem
#20 identifier "DCC1_CNT0SEED_CONFIGVALUE" is undefined dcc.c /UART Test/source line 387 C/C++ Problem
#20 identifier "DCC1_CNT1CLKSRC_CONFIGVALUE" is undefined dcc.c /UART Test/source line 390 C/C++ Problem
#20 identifier "DCC1_CNT1SEED_CONFIGVALUE" is undefined dcc.c /UART Test/source line 389 C/C++ Problem
#20 identifier "DCC1_GCTRL_CONFIGVALUE" is undefined dcc.c /UART Test/source line 386 C/C++ Problem
#20 identifier "DCC1_VALID0SEED_CONFIGVALUE" is undefined dcc.c /UART Test/source line 388 C/C++ Problem
#20 identifier "DCC2_CNT0CLKSRC_CONFIGVALUE" is undefined dcc.c /UART Test/source line 428 C/C++ Problem
#20 identifier "DCC2_CNT0SEED_CONFIGVALUE" is undefined dcc.c /UART Test/source line 424 C/C++ Problem
#20 identifier "DCC2_CNT1CLKSRC_CONFIGVALUE" is undefined dcc.c /UART Test/source line 427 C/C++ Problem
#20 identifier "DCC2_CNT1SEED_CONFIGVALUE" is undefined dcc.c /UART Test/source line 426 C/C++ Problem
#20 identifier "DCC2_GCTRL_CONFIGVALUE" is undefined dcc.c /UART Test/source line 423 C/C++ Problem
#20 identifier "DCC2_VALID0SEED_CONFIGVALUE" is undefined dcc.c /UART Test/source line 425 C/C++ Problem
#20 identifier "EMIF_AWCC_CONFIGVALUE" is undefined emif.c /UART Test/source line 214 C/C++ Problem
#20 identifier "EMIF_CE2CFG_CONFIGVALUE" is undefined emif.c /UART Test/source line 217 C/C++ Problem
#20 identifier "EMIF_CE3CFG_CONFIGVALUE" is undefined emif.c /UART Test/source line 218 C/C++ Problem
#20 identifier "EMIF_CE4CFG_CONFIGVALUE" is undefined emif.c /UART Test/source line 219 C/C++ Problem
#20 identifier "EMIF_CE5CFG_CONFIGVALUE" is undefined emif.c /UART Test/source line 220 C/C++ Problem
#20 identifier "EMIF_INTMSK_CONFIGVALUE" is undefined emif.c /UART Test/source line 223 C/C++ Problem
#20 identifier "EMIF_PMCR_CONFIGVALUE" is undefined emif.c /UART Test/source line 224 C/C++ Problem
#20 identifier "EMIF_SDCR_CONFIGVALUE" is undefined emif.c /UART Test/source line 215 C/C++ Problem
#20 identifier "EMIF_SDRCR_CONFIGVALUE" is undefined emif.c /UART Test/source line 216 C/C++ Problem
#20 identifier "EMIF_SDSRETR_CONFIGVALUE" is undefined emif.c /UART Test/source line 222 C/C++ Problem
#20 identifier "EMIF_SDTIMR_CONFIGVALUE" is undefined emif.c /UART Test/source line 221 C/C++ Problem
#20 identifier "HET1_AND_CONFIGVALUE" is undefined het.c /UART Test/source line 3218 C/C++ Problem
#20 identifier "HET1_DIR_CONFIGVALUE" is undefined het.c /UART Test/source line 3221 C/C++ Problem
#20 identifier "HET1_GCR_CONFIGVALUE" is undefined het.c /UART Test/source line 3213 C/C++ Problem
#20 identifier "HET1_HRSH_CONFIGVALUE" is undefined het.c /UART Test/source line 3219 C/C++ Problem
#20 identifier "HET1_INTENAC_CONFIGVALUE" is undefined het.c /UART Test/source line 3216 C/C++ Problem
#20 identifier "HET1_INTENAS_CONFIGVALUE" is undefined het.c /UART Test/source line 3215 C/C++ Problem
#20 identifier "HET1_PCR_CONFIGVALUE" is undefined het.c /UART Test/source line 3225 C/C++ Problem
#20 identifier "HET1_PDR_CONFIGVALUE" is undefined het.c /UART Test/source line 3222 C/C++ Problem
#20 identifier "HET1_PFR_CONFIGVALUE" is undefined het.c /UART Test/source line 3214 C/C++ Problem
#20 identifier "HET1_PRY_CONFIGVALUE" is undefined het.c /UART Test/source line 3217 C/C++ Problem
#20 identifier "HET1_PSL_CONFIGVALUE" is undefined het.c /UART Test/source line 3224 C/C++ Problem
#20 identifier "HET1_PULDIS_CONFIGVALUE" is undefined het.c /UART Test/source line 3223 C/C++ Problem
#20 identifier "HET1_XOR_CONFIGVALUE" is undefined het.c /UART Test/source line 3220 C/C++ Problem

  • So, I have managed to understand what was wrong.

    I initially created the HALCOGEN project with all the drivers enabled and generated the code. As a result adc.c, can.c and other files were created.

    I later realised that for the tutorial I only needed the SCI2 driver, so I disabled the rest. In the device explorer tree in Halcogen I saw that adc.h was generated, but not adc.c.

    However adc.c and can.c already existed in my CCS project (because they had been created the first time round), and the new adc.h did not contain the initialisation parameters used in adc.c, hence the error.

    In order to get around this, I enabled all of the drivers and carried on with the tutorial. I am unsure if this is normal, if I have to manually delete the .c files that no longer apply, or what the suggested way to proceed is in the case of a driver not being relevant anymore for a specific project.

    Kind regards,

    Sofia
  • Hi Sofia,

    I am glad that you were able to work through the issue and identify the problem. In regard to the residual files remaining that are of no use to you, I think your should be able to exclude them from your CCS project. The header files shouldn't be referenced if there is no dependencies on them so they won't hurt anything to leave in. As far as the c files are concerned, performing a build clean up may help exclude files not needed from the build process. The clean operation is found at Project-> Clean...