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/TMS320C6678: macro ##(concatenation) does not create valid token in CCS v8.2

Part Number: TMS320C6678

Tool/software: Code Composer Studio

I have updated new CCS v8.2, In the new CCS macro ##(concatenation) does not create valid token in CCS v8.2. ERROR : #1934-D concatenation with "BCCH" in macro "INIT_TDFRMTBL" does not create a valid token. I attached my code below. 

#define INIT_TDFRMTBL(NAME,TYPEANDOFFSET,DOWNLINK,UPLINK,ALLOWEDSLOTS,C0ONLY,REPEAT,SUBSLOT) \
  if(1){TDFrm_Init(&gTDMA.Frame.##NAME,(CHAR*)#NAME,TYPEANDOFFSET,DOWNLINK,UPLINK,ALLOWEDSLOTS,C0ONLY, \
  REPEAT,sizeof(NAME)/sizeof(INT8), SUBSLOT, NAME);}

VOID TDFrmTbl_Init( VOID )
{

 INIT_TDFRMTBL(BCCH,TDMA_BEACON,TRUE,FALSE,0x55,TRUE,51,0);

}

gTDMA, Frame are struct variables.

After compile this code. CCS gives error like #1934-D concatenation with "BCCH" in macro "INIT_TDFRMTBL" does not create a valid token. Everything is correct in my side, I use that same code in older version CCS 7.4 its working good.

  • When I try to compile your code sample, I gets lots of errors, in addition to the one about invalid token.  Some of them were easy to fix, but others I am not so sure about.  So, at the end of it all, I cannot be confident I have reproduced the problem for the same reason you experience it.  When I compile with a recent version of GCC, I see an error diagnostic similar to invalid token.

    I recommend you add the option --gen_preprocessor_listing.  It is documented in the C6000 compiler manual.  This causes the compiler to produce a preprocessor listing file.  It has the same name as the source file, with the extension changed to .rl.  Among other things, it shows source lines before and after macro expansion.  You can see how the preprocessor did the token pasting, and decide whether the result is valid.  You can also do the same thing with the older version of the compiler, and compare.  I'm pretty sure you will work out what happened.

    If you are still stuck, then please send in a complete example that builds clean, except for the invalid token diagnostic.  Please tell the version of the compiler (not CCS), and show all the compiler options exactly as the compiler sees them.

    Thanks and regards,

    -George

  • I tried with "--gen_preprocessor_listing" option, I couldn't find macro concatenate happened or not. I attach mu source code and .r1 file below. Please give some solution.

    source file=>

    #define INIT_TDFRMTBL(NAME,TYPEANDOFFSET,DOWNLINK,UPLINK,ALLOWEDSLOTS,C0ONLY,REPEAT,SUBSLOT) \
    if(1){TDFrm_Init(&gTDMA.Frame.##NAME,(CHAR*)#NAME,TYPEANDOFFSET,DOWNLINK,UPLINK,ALLOWEDSLOTS,C0ONLY, \
    REPEAT,sizeof(NAME)/sizeof(INT8), SUBSLOT, NAME);}

    INIT_TDFRMTBL(IDLE,TDMA_MISC,TRUE,TRUE,0xff,FALSE,51,0);


    .r1 file=>

    W "../TDFrmTbl.c" 209 2 concatenation with "IDLE" in macro "INIT_TDFRMTBL" does not create a valid token
    N INIT_TDFRMTBL(IDLE,TDMA_MISC,TRUE,TRUE,0xff,FALSE,51,0);
    X if(1){TDFrm_Init(&gTDMA . Frame .IDLE,(CHAR*)"IDLE",TDMA_MISC,1U,1U,0xff,0U, 51,sizeof(IDLE)/sizeof(INT8), 0, IDLE);};
  • I still lack enough information to clearly show the cause of the problem.

    The problem token is ...

    mohanprabhu l said:
    gTDMA . Frame .IDLE

    Perhaps gTDMA is not a structure.  Or, if it is a structure, it has no member named Frame.  Perhaps the same thing is true of Frame and IDLE.  Or something along these lines.

    Please be sure to match upper and lower case letters.  For example, Frame and frame are different names.

    Thanks and regards,

    -George

  • gTDMA and Frame are structure variables. These structure def contain in our file. The declaration and definition of structure and function are very clear in our side. The problem is in that macro concatenation , While compiling which gives warning: (#1934-D concatenation with "BCCH" in macro "INIT_TDFRMTBL" does not create a valid token). I attach structure and function def below.
    The warning contained in TDFrmTbl_Init() function => INIT_TDFRMTBL(....). You check it below.
    source file =>

    #include "TDFrmTbl.h"
    /** A macro to save some typing when we set up TDMA maps. */
    #define INIT_TDFRMTBL(NAME,TYPEANDOFFSET,DOWNLINK,UPLINK,ALLOWEDSLOTS,C0ONLY,REPEAT,SUBSLOT) \
    if(1){TDFrm_Init(&gTDMA.Frame.##NAME,(CHAR*)#NAME,TYPEANDOFFSET,DOWNLINK,UPLINK,ALLOWEDSLOTS,C0ONLY, \
    REPEAT,sizeof(NAME)/sizeof(INT8), SUBSLOT, NAME);}

    #pragma DATA_SECTION(gTDMA,".delcomObj")
    #pragma DATA_ALIGN(gTDMA,128)
    TDFrmTbl gTDMA;

    #pragma DATA_SECTION(IDLE,".delcomObj")
    static INT8 IDLE[] = {0};

    #pragma DATA_SECTION(IDLE_26,".delcomObj")
    static INT8 IDLE_26[] = {0};
    #pragma DATA_SECTION(LoopbackTestFull,".delcomObj")
    static INT8 LoopbackTestFull[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47};
    #pragma DATA_SECTION(FCCH,".delcomObj")
    static INT8 FCCH[] = {0,10,20,30,40};
    #pragma DATA_SECTION(SCH,".delcomObj")
    static INT8 SCH[] = {1,11,21,31,41};
    #pragma DATA_SECTION(BCCH,".delcomObj")
    static INT8 BCCH[] = {2,3,4,5};
    // Note that we removed Frm,s for the SDCCH components of the Combination-V C0T0.
    #pragma DATA_SECTION(RACHC5,".delcomObj")
    static INT8 RACHC5[] = {4,5,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,45,46};
    // RACH FOR COMBINATION IV- VI COTO
    #pragma DATA_SECTION(RACHC4_6,".delcomObj")
    static INT8 RACHC4_6[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50};
    // CCCH 0-2 are used in C-IV and C-V. The others are used in C-IV only.
    #pragma DATA_SECTION(CCCH_0,".delcomObj")
    static INT8 CCCH_0[] = {6,7,8,9};
    #pragma DATA_SECTION(CCCH_1,".delcomObj")
    static INT8 CCCH_1[] = {12,13,14,15};
    #pragma DATA_SECTION(CCCH_2,".delcomObj")
    static INT8 CCCH_2[] = {16,17,18,19};
    #pragma DATA_SECTION(CCCH_3,".delcomObj")
    static INT8 CCCH_3[] = {22,23,24,25};
    #pragma DATA_SECTION(CCCH_4,".delcomObj")
    static INT8 CCCH_4[] = {26,27,28,29};
    #pragma DATA_SECTION(CCCH_5,".delcomObj")
    static INT8 CCCH_5[] = {32,33,34,35};
    #pragma DATA_SECTION(CCCH_6,".delcomObj")
    static INT8 CCCH_6[] = {36,37,38,39};
    #pragma DATA_SECTION(CCCH_7,".delcomObj")
    static INT8 CCCH_7[] = {42,43,44,45};
    #pragma DATA_SECTION(CCCH_8,".delcomObj")
    static INT8 CCCH_8[] = {46,47,48,49};

    #pragma DATA_SECTION(SDCCH_4_0D,".delcomObj")
    static INT8 SDCCH_4_0D[] = {22,23,24,25};
    #pragma DATA_SECTION(SDCCH_4_0U,".delcomObj")
    static INT8 SDCCH_4_0U[] = {37,38,39,40};
    #pragma DATA_SECTION(SDCCH_4_1D,".delcomObj")
    static INT8 SDCCH_4_1D[] = {26,27,28,29};
    #pragma DATA_SECTION(SDCCH_4_1U,".delcomObj")
    static INT8 SDCCH_4_1U[] = {41,42,43,44};
    #pragma DATA_SECTION(SDCCH_4_2D,".delcomObj")
    static INT8 SDCCH_4_2D[] = {32,33,34,35};
    #pragma DATA_SECTION(SDCCH_4_2U,".delcomObj")
    static INT8 SDCCH_4_2U[] = {47,48,49,50};
    #pragma DATA_SECTION(SDCCH_4_3D,".delcomObj")
    static INT8 SDCCH_4_3D[] = {36,37,38,39};
    #pragma DATA_SECTION(SDCCH_4_3U,".delcomObj")
    static INT8 SDCCH_4_3U[] = {0,1,2,3};
    #pragma DATA_SECTION(SACCH_C4_0D,".delcomObj")
    static INT8 SACCH_C4_0D[] = {42,43,44,45};
    #pragma DATA_SECTION(SACCH_C4_0U,".delcomObj")
    static INT8 SACCH_C4_0U[] = {57,58,59,60};
    #pragma DATA_SECTION(SACCH_C4_1D,".delcomObj")
    static INT8 SACCH_C4_1D[] = {46,47,48,49};
    #pragma DATA_SECTION(SACCH_C4_1U,".delcomObj")
    static INT8 SACCH_C4_1U[] = {61,62,63,64};
    #pragma DATA_SECTION(SACCH_C4_2D,".delcomObj")
    static INT8 SACCH_C4_2D[] = {93,94,95,96};
    #pragma DATA_SECTION(SACCH_C4_2U,".delcomObj")
    static INT8 SACCH_C4_2U[] = {6,7,8,9};
    #pragma DATA_SECTION(SACCH_C4_3D,".delcomObj")
    static INT8 SACCH_C4_3D[] = {97,98,99,100};
    #pragma DATA_SECTION(SACCH_C4_3U,".delcomObj")
    static INT8 SACCH_C4_3U[] = {10,11,12,13};
    #pragma DATA_SECTION(SDCCH_8_0D,".delcomObj")
    static INT8 SDCCH_8_0D[] = {0,1,2,3};
    #pragma DATA_SECTION(SDCCH_8_0U,".delcomObj")
    static INT8 SDCCH_8_0U[] = {15,16,17,18};
    #pragma DATA_SECTION(SDCCH_8_1D,".delcomObj")
    static INT8 SDCCH_8_1D[] = {4,5,6,7};
    #pragma DATA_SECTION(SDCCH_8_1U,".delcomObj")
    static INT8 SDCCH_8_1U[] = {19,20,21,22};
    #pragma DATA_SECTION(SDCCH_8_2D,".delcomObj")
    static INT8 SDCCH_8_2D[] = {8,9,10,11};
    #pragma DATA_SECTION(SDCCH_8_2U,".delcomObj")
    static INT8 SDCCH_8_2U[] = {23,24,25,26};
    #pragma DATA_SECTION(SDCCH_8_3D,".delcomObj")
    static INT8 SDCCH_8_3D[] = {12,13,14,15};
    #pragma DATA_SECTION(SDCCH_8_3U,".delcomObj")
    static INT8 SDCCH_8_3U[] = {27,28,29,30};
    #pragma DATA_SECTION(SDCCH_8_4D,".delcomObj")
    static INT8 SDCCH_8_4D[] = {16,17,18,19};
    #pragma DATA_SECTION(SDCCH_8_4U,".delcomObj")
    static INT8 SDCCH_8_4U[] = {31,32,33,34};
    #pragma DATA_SECTION(SDCCH_8_5D,".delcomObj")
    static INT8 SDCCH_8_5D[] = {20,21,22,23};
    #pragma DATA_SECTION(SDCCH_8_5U,".delcomObj")
    static INT8 SDCCH_8_5U[] = {35,36,37,38};
    #pragma DATA_SECTION(SDCCH_8_6D,".delcomObj")
    static INT8 SDCCH_8_6D[] = {24,25,26,27};
    #pragma DATA_SECTION(SDCCH_8_6U,".delcomObj")
    static INT8 SDCCH_8_6U[] = {39,40,41,42};
    #pragma DATA_SECTION(SDCCH_8_7D,".delcomObj")
    static INT8 SDCCH_8_7D[] = {28,29,30,31};
    #pragma DATA_SECTION(SDCCH_8_7U,".delcomObj")
    static INT8 SDCCH_8_7U[] = {43,44,45,46};
    #pragma DATA_SECTION(SACCH_C8_0D,".delcomObj")
    static INT8 SACCH_C8_0D[] = {32,33,34,35};
    #pragma DATA_SECTION(SACCH_C8_0U,".delcomObj")
    static INT8 SACCH_C8_0U[] = {47,48,49,50};
    #pragma DATA_SECTION(SACCH_C8_1D,".delcomObj")
    static INT8 SACCH_C8_1D[] = {36,37,38,39};
    #pragma DATA_SECTION(SACCH_C8_1U,".delcomObj")
    static INT8 SACCH_C8_1U[] = {51,52,53,54};
    #pragma DATA_SECTION(SACCH_C8_2D,".delcomObj")
    static INT8 SACCH_C8_2D[] = {40,41,42,43};
    #pragma DATA_SECTION(SACCH_C8_2U,".delcomObj")
    static INT8 SACCH_C8_2U[] = {55,56,57,58};
    #pragma DATA_SECTION(SACCH_C8_3D,".delcomObj")
    static INT8 SACCH_C8_3D[] = {44,45,46,47};
    #pragma DATA_SECTION(SACCH_C8_3U,".delcomObj")
    static INT8 SACCH_C8_3U[] = {59,60,61,62};
    #pragma DATA_SECTION(SACCH_C8_4D,".delcomObj")
    static INT8 SACCH_C8_4D[] = {83,84,85,86};
    #pragma DATA_SECTION(SACCH_C8_4U,".delcomObj")
    static INT8 SACCH_C8_4U[] = {98,99,100,101};
    #pragma DATA_SECTION(SACCH_C8_5D,".delcomObj")
    static INT8 SACCH_C8_5D[] = {87,88,89,90};
    #pragma DATA_SECTION(SACCH_C8_5U,".delcomObj")
    static INT8 SACCH_C8_5U[] = {0,1,2,3};
    #pragma DATA_SECTION(SACCH_C8_6D,".delcomObj")
    static INT8 SACCH_C8_6D[] = {91,92,93,94};
    #pragma DATA_SECTION(SACCH_C8_6U,".delcomObj")
    static INT8 SACCH_C8_6U[] = {4,5,6,7};
    #pragma DATA_SECTION(SACCH_C8_7D,".delcomObj")
    static INT8 SACCH_C8_7D[] = {95,96,97,98};
    #pragma DATA_SECTION(SACCH_C8_7U,".delcomObj")
    static INT8 SACCH_C8_7U[] = {8,9,10,11};
    #pragma DATA_SECTION(SACCH_TF_T0,".delcomObj")
    static INT8 SACCH_TF_T0[] = {12,38,64,90};
    #pragma DATA_SECTION(SACCH_TF_T1,".delcomObj")
    static INT8 SACCH_TF_T1[] = {25,51,77,103};
    #pragma DATA_SECTION(SACCH_TF_T2,".delcomObj")
    static INT8 SACCH_TF_T2[] = {38,64,90,12};
    #pragma DATA_SECTION(SACCH_TF_T3,".delcomObj")
    static INT8 SACCH_TF_T3[] = {51,77,103,25};
    #pragma DATA_SECTION(SACCH_TF_T4,".delcomObj")
    static INT8 SACCH_TF_T4[] = {64,90,12,38};
    #pragma DATA_SECTION(SACCH_TF_T5,".delcomObj")
    static INT8 SACCH_TF_T5[] = {77,103,25,51};
    #pragma DATA_SECTION(SACCH_TF_T6,".delcomObj")
    static INT8 SACCH_TF_T6[] = {90,12,38,64};
    #pragma DATA_SECTION(SACCH_TF_T7,".delcomObj")
    static INT8 SACCH_TF_T7[] = {103,25,51,77};
    #pragma DATA_SECTION(FACCH_TCHF,".delcomObj")
    static INT8 FACCH_TCHF[] = {0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,21,22,23,24};

    #pragma DATA_SECTION(FACCH_TCHH_S0,".delcomObj")
    static INT8 FACCH_TCHH_S0[] = {0,2,4,6,8,10,14,16,18,20,22,24};
    #pragma DATA_SECTION(FACCH_TCHH_S1,".delcomObj")
    static INT8 FACCH_TCHH_S1[] = {1,3,5,7,9,11,13,15,17,19,21,23};

    #pragma DATA_SECTION(SACCH_TH_S0_T0,".delcomObj")
    static INT8 SACCH_TH_S0_T0[] = {12,38,64,90};
    #pragma DATA_SECTION(SACCH_TH_S0_T1,".delcomObj")
    static INT8 SACCH_TH_S0_T1[] = {12,38,64,90};
    #pragma DATA_SECTION(SACCH_TH_S0_T2,".delcomObj")
    static INT8 SACCH_TH_S0_T2[] = {38,64,90,12};
    #pragma DATA_SECTION(SACCH_TH_S0_T3,".delcomObj")
    static INT8 SACCH_TH_S0_T3[] = {38,64,90,12};
    #pragma DATA_SECTION(SACCH_TH_S0_T4,".delcomObj")
    static INT8 SACCH_TH_S0_T4[] = {64,90,12,38};
    #pragma DATA_SECTION(SACCH_TH_S0_T5,".delcomObj")
    static INT8 SACCH_TH_S0_T5[] = {64,90,12,38};
    #pragma DATA_SECTION(SACCH_TH_S0_T6,".delcomObj")
    static INT8 SACCH_TH_S0_T6[] = {90,12,38,64};
    #pragma DATA_SECTION(SACCH_TH_S0_T7,".delcomObj")
    static INT8 SACCH_TH_S0_T7[] = {90,12,38,64};

    #pragma DATA_SECTION(SACCH_TH_S1_T0,".delcomObj")
    static INT8 SACCH_TH_S1_T0[] = {25,51,77,103};
    #pragma DATA_SECTION(SACCH_TH_S1_T1,".delcomObj")
    static INT8 SACCH_TH_S1_T1[] = {25,51,77,103};
    #pragma DATA_SECTION(SACCH_TH_S1_T2,".delcomObj")
    static INT8 SACCH_TH_S1_T2[] = {51,77,103,25};
    #pragma DATA_SECTION(SACCH_TH_S1_T3,".delcomObj")
    static INT8 SACCH_TH_S1_T3[] = {51,77,103,25};
    #pragma DATA_SECTION(SACCH_TH_S1_T4,".delcomObj")
    static INT8 SACCH_TH_S1_T4[] = {77,103,25,51};
    #pragma DATA_SECTION(SACCH_TH_S1_T5,".delcomObj")
    static INT8 SACCH_TH_S1_T5[] = {77,103,25,51};
    #pragma DATA_SECTION(SACCH_TH_S1_T6,".delcomObj")
    static INT8 SACCH_TH_S1_T6[] = {103,25,51,77};
    #pragma DATA_SECTION(SACCH_TH_S1_T7,".delcomObj")
    static INT8 SACCH_TH_S1_T7[] = {103,25,51,77};

    VOID TDFrmTbl_Init( VOID )
    {
    printf("%d ", merge(12, 34));
    INIT_TDFRMTBL(IDLE,TDMA_MISC,TRUE,TRUE,0xff,FALSE,51,0);
    INIT_TDFRMTBL(IDLE_26,TDMA_MISC,TRUE,TRUE,0xff,FALSE,26,0);
    INIT_TDFRMTBL(LoopbackTestFull,TDMA_MISC,TRUE,TRUE,0xff,FALSE,51,0);
    INIT_TDFRMTBL(FCCH,TDMA_BEACON,TRUE,FALSE,0x01,TRUE,51,0);
    INIT_TDFRMTBL(SCH,TDMA_BEACON,TRUE,FALSE,0x01,TRUE,51,0);
    INIT_TDFRMTBL(BCCH,TDMA_BEACON,TRUE,FALSE,0x55,TRUE,51,0);
    // Note that we removed Frm,s for the SDCCH components of the Combination-V C0T0.
    INIT_TDFRMTBL(RACHC5,TDMA_BEACON,FALSE,TRUE,0x55,TRUE,51,0);
    INIT_TDFRMTBL(RACHC4_6,TDMA_BEACON,FALSE,TRUE,0x55,TRUE,51,0);
    // CCCH 0-2 are used in C-IV and C-V. The others are used in C-IV only.
    INIT_TDFRMTBL(CCCH_0,TDMA_BEACON,TRUE,FALSE,0x55,TRUE,51,0);
    INIT_TDFRMTBL(CCCH_1,TDMA_BEACON,TRUE,FALSE,0x55,TRUE,51,0);
    INIT_TDFRMTBL(CCCH_2,TDMA_BEACON,TRUE,FALSE,0x55,TRUE,51,0);
    INIT_TDFRMTBL(CCCH_3,TDMA_BEACON,TRUE,FALSE,0x55,TRUE,51,0);

    // TODO -- Other CCCH subchannels 4-8 for support of C-IV.
    INIT_TDFRMTBL(CCCH_4,TDMA_BEACON,TRUE,FALSE,0x55,TRUE,51,0);
    INIT_TDFRMTBL(CCCH_5,TDMA_BEACON,TRUE,FALSE,0x55,TRUE,51,0);
    INIT_TDFRMTBL(CCCH_6,TDMA_BEACON,TRUE,FALSE,0x55,TRUE,51,0);
    INIT_TDFRMTBL(CCCH_7,TDMA_BEACON,TRUE,FALSE,0x55,TRUE,51,0);
    INIT_TDFRMTBL(CCCH_8,TDMA_BEACON,TRUE,FALSE,0x55,TRUE,51,0);



    INIT_TDFRMTBL(SDCCH_4_0D,SDCCH_4_0,TRUE,FALSE,0x01,TRUE,51,0);
    INIT_TDFRMTBL(SDCCH_4_0U,SDCCH_4_0,FALSE,TRUE,0x01,TRUE,51,0);
    INIT_TDFRMTBL(SDCCH_4_1D,SDCCH_4_1,TRUE,FALSE,0x01,TRUE,51,1);
    INIT_TDFRMTBL(SDCCH_4_1U,SDCCH_4_1,FALSE,TRUE,0x01,TRUE,51,1);
    INIT_TDFRMTBL(SDCCH_4_2D,SDCCH_4_2,TRUE,FALSE,0x01,TRUE,51,2);
    INIT_TDFRMTBL(SDCCH_4_2U,SDCCH_4_2,FALSE,TRUE,0x01,TRUE,51,2);
    INIT_TDFRMTBL(SDCCH_4_3D,SDCCH_4_3,TRUE,FALSE,0x01,TRUE,51,3);
    INIT_TDFRMTBL(SDCCH_4_3U,SDCCH_4_3,FALSE,TRUE,0x01,TRUE,51,3);
    INIT_TDFRMTBL(SACCH_C4_0D,SDCCH_4_0,TRUE,FALSE,0x01,TRUE,102,0);
    INIT_TDFRMTBL(SACCH_C4_0U,SDCCH_4_0,FALSE,TRUE,0x01,TRUE,102,0);
    INIT_TDFRMTBL(SACCH_C4_1D,SDCCH_4_1,TRUE,FALSE,0x01,TRUE,102,1);
    INIT_TDFRMTBL(SACCH_C4_1U,SDCCH_4_1,FALSE,TRUE,0x01,TRUE,102,1);
    INIT_TDFRMTBL(SACCH_C4_2D,SDCCH_4_2,TRUE,FALSE,0x01,TRUE,102,2);
    INIT_TDFRMTBL(SACCH_C4_2U,SDCCH_4_2,FALSE,TRUE,0x01,TRUE,102,2);
    INIT_TDFRMTBL(SACCH_C4_3D,SDCCH_4_3,TRUE,FALSE,0x01,TRUE,102,3);
    INIT_TDFRMTBL(SACCH_C4_3U,SDCCH_4_3,FALSE,TRUE,0x01,TRUE,102,3);
    INIT_TDFRMTBL(SDCCH_8_0D,SDCCH_8_0,TRUE,FALSE,0xFF,FALSE,51,0);
    INIT_TDFRMTBL(SDCCH_8_0U,SDCCH_8_0,FALSE,TRUE,0xFF,FALSE,51,0);
    INIT_TDFRMTBL(SDCCH_8_1D,SDCCH_8_1,TRUE,FALSE,0xFF,FALSE,51,1);
    INIT_TDFRMTBL(SDCCH_8_1U,SDCCH_8_1,FALSE,TRUE,0xFF,FALSE,51,1);
    INIT_TDFRMTBL(SDCCH_8_2D,SDCCH_8_2,TRUE,FALSE,0xFF,FALSE,51,2);
    INIT_TDFRMTBL(SDCCH_8_2U,SDCCH_8_2,FALSE,TRUE,0xFF,FALSE,51,2);
    INIT_TDFRMTBL(SDCCH_8_3D,SDCCH_8_3,TRUE,FALSE,0xFF,FALSE,51,3);
    INIT_TDFRMTBL(SDCCH_8_3U,SDCCH_8_3,FALSE,TRUE,0xFF,FALSE,51,3);
    INIT_TDFRMTBL(SDCCH_8_4D,SDCCH_8_4,TRUE,FALSE,0xFF,FALSE,51,4);
    INIT_TDFRMTBL(SDCCH_8_4U,SDCCH_8_4,FALSE,TRUE,0xFF,FALSE,51,4);
    INIT_TDFRMTBL(SDCCH_8_5D,SDCCH_8_5,TRUE,FALSE,0xFF,FALSE,51,5);
    INIT_TDFRMTBL(SDCCH_8_5U,SDCCH_8_5,FALSE,TRUE,0xFF,FALSE,51,5);
    INIT_TDFRMTBL(SDCCH_8_6D,SDCCH_8_6,TRUE,FALSE,0xFF,FALSE,51,6);
    INIT_TDFRMTBL(SDCCH_8_6U,SDCCH_8_6,FALSE,TRUE,0xFF,FALSE,51,6);
    INIT_TDFRMTBL(SDCCH_8_7D,SDCCH_8_7,TRUE,FALSE,0xFF,FALSE,51,7);
    INIT_TDFRMTBL(SDCCH_8_7U,SDCCH_8_7,FALSE,TRUE,0xFF,FALSE,51,7);
    INIT_TDFRMTBL(SACCH_C8_0D,SDCCH_8_0,TRUE,FALSE,0xFF,FALSE,102,0);
    INIT_TDFRMTBL(SACCH_C8_0U,SDCCH_8_0,FALSE,TRUE,0xFF,FALSE,102,0);
    INIT_TDFRMTBL(SACCH_C8_1D,SDCCH_8_1,TRUE,FALSE,0xFF,FALSE,102,1);
    INIT_TDFRMTBL(SACCH_C8_1U,SDCCH_8_1,FALSE,TRUE,0xFF,FALSE,102,1);
    INIT_TDFRMTBL(SACCH_C8_2D,SDCCH_8_2,TRUE,FALSE,0xFF,FALSE,102,2);
    INIT_TDFRMTBL(SACCH_C8_2U,SDCCH_8_2,FALSE,TRUE,0xFF,FALSE,102,2);
    INIT_TDFRMTBL(SACCH_C8_3D,SDCCH_8_3,TRUE,FALSE,0xFF,FALSE,102,3);
    INIT_TDFRMTBL(SACCH_C8_3U,SDCCH_8_3,FALSE,TRUE,0xFF,FALSE,102,3);
    INIT_TDFRMTBL(SACCH_C8_4D,SDCCH_8_4,TRUE,FALSE,0xFF,FALSE,102,4);
    INIT_TDFRMTBL(SACCH_C8_4U,SDCCH_8_4,FALSE,TRUE,0xFF,FALSE,102,4);
    INIT_TDFRMTBL(SACCH_C8_5D,SDCCH_8_5,TRUE,FALSE,0xFF,FALSE,102,5);
    INIT_TDFRMTBL(SACCH_C8_5U,SDCCH_8_5,FALSE,TRUE,0xFF,FALSE,102,5);
    INIT_TDFRMTBL(SACCH_C8_6D,SDCCH_8_6,TRUE,FALSE,0xFF,FALSE,102,6);
    INIT_TDFRMTBL(SACCH_C8_6U,SDCCH_8_6,FALSE,TRUE,0xFF,FALSE,102,6);
    INIT_TDFRMTBL(SACCH_C8_7D,SDCCH_8_7,TRUE,FALSE,0xFF,FALSE,102,7);
    INIT_TDFRMTBL(SACCH_C8_7U,SDCCH_8_7,FALSE,TRUE,0xFF,FALSE,102,7);
    INIT_TDFRMTBL(SACCH_TF_T0,TCHF_0,TRUE,TRUE,0x01,FALSE,104,0);
    INIT_TDFRMTBL(SACCH_TF_T1,TCHF_0,TRUE,TRUE,0x02,FALSE,104,0);
    INIT_TDFRMTBL(SACCH_TF_T2,TCHF_0,TRUE,TRUE,0x04,FALSE,104,0);
    INIT_TDFRMTBL(SACCH_TF_T3,TCHF_0,TRUE,TRUE,0x08,FALSE,104,0);
    INIT_TDFRMTBL(SACCH_TF_T4,TCHF_0,TRUE,TRUE,0x10,FALSE,104,0);
    INIT_TDFRMTBL(SACCH_TF_T5,TCHF_0,TRUE,TRUE,0x20,FALSE,104,0);
    INIT_TDFRMTBL(SACCH_TF_T6,TCHF_0,TRUE,TRUE,0x40,FALSE,104,0);
    INIT_TDFRMTBL(SACCH_TF_T7,TCHF_0,TRUE,TRUE,0x80,FALSE,104,0);
    INIT_TDFRMTBL(FACCH_TCHF,TCHF_0,TRUE,TRUE,0xff,FALSE,26,0);

    INIT_TDFRMTBL(FACCH_TCHH_S0,TCHH_0,TRUE,TRUE,0xFF,FALSE,26,0);
    INIT_TDFRMTBL(FACCH_TCHH_S1,TCHH_1,TRUE,TRUE,0xFF,FALSE,26,0);

    INIT_TDFRMTBL(SACCH_TH_S0_T0,TCHH_0,TRUE,TRUE,0x01,FALSE,104,0);
    INIT_TDFRMTBL(SACCH_TH_S0_T1,TCHH_0,TRUE,TRUE,0x02,FALSE,104,0);
    INIT_TDFRMTBL(SACCH_TH_S0_T2,TCHH_0,TRUE,TRUE,0x04,FALSE,104,0);
    INIT_TDFRMTBL(SACCH_TH_S0_T3,TCHH_0,TRUE,TRUE,0x08,FALSE,104,0);
    INIT_TDFRMTBL(SACCH_TH_S0_T4,TCHH_0,TRUE,TRUE,0x10,FALSE,104,0);
    INIT_TDFRMTBL(SACCH_TH_S0_T5,TCHH_0,TRUE,TRUE,0x20,FALSE,104,0);
    INIT_TDFRMTBL(SACCH_TH_S0_T6,TCHH_0,TRUE,TRUE,0x40,FALSE,104,0);
    INIT_TDFRMTBL(SACCH_TH_S0_T7,TCHH_0,TRUE,TRUE,0x80,FALSE,104,0);

    INIT_TDFRMTBL(SACCH_TH_S1_T0,TCHH_1,TRUE,TRUE,0x01,FALSE,104,0);
    INIT_TDFRMTBL(SACCH_TH_S1_T1,TCHH_1,TRUE,TRUE,0x02,FALSE,104,0);
    INIT_TDFRMTBL(SACCH_TH_S1_T2,TCHH_1,TRUE,TRUE,0x04,FALSE,104,0);
    INIT_TDFRMTBL(SACCH_TH_S1_T3,TCHH_1,TRUE,TRUE,0x08,FALSE,104,0);
    INIT_TDFRMTBL(SACCH_TH_S1_T4,TCHH_1,TRUE,TRUE,0x10,FALSE,104,0);
    INIT_TDFRMTBL(SACCH_TH_S1_T5,TCHH_1,TRUE,TRUE,0x20,FALSE,104,0);
    INIT_TDFRMTBL(SACCH_TH_S1_T6,TCHH_1,TRUE,TRUE,0x40,FALSE,104,0);
    INIT_TDFRMTBL(SACCH_TH_S1_T7,TCHH_1,TRUE,TRUE,0x80,FALSE,104,0);
    }

    TDFrm *gSACCH_TF[8]=
    {
    &gTDMA.Frame.SACCH_TF_T0,
    &gTDMA.Frame.SACCH_TF_T1,
    &gTDMA.Frame.SACCH_TF_T2,
    &gTDMA.Frame.SACCH_TF_T3,
    &gTDMA.Frame.SACCH_TF_T4,
    &gTDMA.Frame.SACCH_TF_T5,
    &gTDMA.Frame.SACCH_TF_T6,
    &gTDMA.Frame.SACCH_TF_T7
    };
    TDFrm *gSACCH_TH_S0[8]=
    {
    &gTDMA.Frame.SACCH_TH_S0_T0,
    &gTDMA.Frame.SACCH_TH_S0_T1,
    &gTDMA.Frame.SACCH_TH_S0_T2,
    &gTDMA.Frame.SACCH_TH_S0_T3,
    &gTDMA.Frame.SACCH_TH_S0_T4,
    &gTDMA.Frame.SACCH_TH_S0_T5,
    &gTDMA.Frame.SACCH_TH_S0_T6,
    &gTDMA.Frame.SACCH_TH_S0_T7

    };

    TDFrm *gSACCH_TH_S1[8]=
    {
    &gTDMA.Frame.SACCH_TH_S1_T0,
    &gTDMA.Frame.SACCH_TH_S1_T1,
    &gTDMA.Frame.SACCH_TH_S1_T2,
    &gTDMA.Frame.SACCH_TH_S1_T3,
    &gTDMA.Frame.SACCH_TH_S1_T4,
    &gTDMA.Frame.SACCH_TH_S1_T5,
    &gTDMA.Frame.SACCH_TH_S1_T6,
    &gTDMA.Frame.SACCH_TH_S1_T7

    };

    //#pragma CODE_SECTION(TDFrmTbl_Print,".textDDR")
    VOID TDFrmTbl_Print( VOID )
    {

    TDFrm *pTDFrm;

    pTDFrm = &gTDMA.Frame.FCCH;


    TDFrm_PrintHeader();
    for(; ;)
    {
    if(pTDFrm< &gTDMA.Frame.LoopbackTestFull)
    {
    TDFrm_Print( pTDFrm );
    pTDFrm++;

    }
    else if(pTDFrm == &gTDMA.Frame.LoopbackTestFull)
    {
    // do nothing
    break;
    }
    }


    }



    Header file=>

    #ifndef _TD_FRM_TBL_H_INCLUDED_
    #define _TD_FRM_TBL_H_INCLUDED_

    #include "TDFrm.h"

    typedef struct TDFrmLst
    {
    TDFrm IDLE;

    TDFrm IDLE_26;
    /**@name Mux parameters for standard channels, from GSM 05.03 Clause 7 Tables 1-4. */
    //@{
    /**@name Beacon channels */
    //@{
    TDFrm FCCH; ///< GSM 05.02 Clause 7 Table 3 Line 1 B0-B4
    TDFrm SCH; ///< GSM 05.02 Clause 7 Table 3 Line 2 B0-B4
    TDFrm BCCH; ///< GSM 05.02 Clause 7 Table 3 Line 3
    /// GSM 05.02 Clause 7 Table 3 Line 7 B0-B50, excluding C-V SDCCH parts (SDCCH/4 and SCCH/C4)
    TDFrm RACHC5;
    TDFrm RACHC4_6;
    TDFrm CCCH_0; ///< GSM 05.02 Clause 7 Table 3 Line 5 B0
    TDFrm CCCH_1; ///< GSM 05.02 Clause 7 Table 3 Line 5 B1
    TDFrm CCCH_2; ///< GSM 05.02 Clause 7 Table 3 Line 5 B2
    TDFrm CCCH_3; ///< GSM 05.02 Clause 7 Table 3 Line 5 B3
    TDFrm CCCH_4; ///< GSM 05.02 Clause 7 Table 3 Line 5 B4
    TDFrm CCCH_5; ///< GSM 05.02 Clause 7 Table 3 Line 5 B5
    TDFrm CCCH_6; ///< GSM 05.02 Clause 7 Table 3 Line 5 B6
    TDFrm CCCH_7; ///< GSM 05.02 Clause 7 Table 3 Line 5 B7
    TDFrm CCCH_8; ///< GSM 05.02 Clause 7 Table 3 Line 5 B8
    //@}
    /**@name SDCCH */
    //@{
    ///@name For Combination V
    //@{
    TDFrm SDCCH_4_0D; ///< GSM 05.02 Clause 7 Table 3 Line 10/0D
    TDFrm SDCCH_4_0U; ///< GSM 05.02 Clause 7 Table 3 Line 10/0U
    TDFrm SDCCH_4_1D;
    TDFrm SDCCH_4_1U;
    TDFrm SDCCH_4_2D;
    TDFrm SDCCH_4_2U;
    TDFrm SDCCH_4_3D;
    TDFrm SDCCH_4_3U;
    //@}
    ///@name For Combination VII
    //@{
    TDFrm SDCCH_8_0D;
    TDFrm SDCCH_8_0U;
    TDFrm SDCCH_8_1D;
    TDFrm SDCCH_8_1U;
    TDFrm SDCCH_8_2D;
    TDFrm SDCCH_8_2U;
    TDFrm SDCCH_8_3D;
    TDFrm SDCCH_8_3U;
    TDFrm SDCCH_8_4D;
    TDFrm SDCCH_8_4U;
    TDFrm SDCCH_8_5D;
    TDFrm SDCCH_8_5U;
    TDFrm SDCCH_8_6D;
    TDFrm SDCCH_8_6U;
    TDFrm SDCCH_8_7D;
    TDFrm SDCCH_8_7U;
    //@}
    //@}
    /**@name SACCH */
    //@{
    /**name SACCH for SDCCH */
    //@{
    ///@name For Combination V
    //@{
    TDFrm SACCH_C4_0D;
    TDFrm SACCH_C4_0U;
    TDFrm SACCH_C4_1D;
    TDFrm SACCH_C4_1U;
    TDFrm SACCH_C4_2D;
    TDFrm SACCH_C4_2U;
    TDFrm SACCH_C4_3D;
    TDFrm SACCH_C4_3U;
    //@}
    ///@name For Combination VII
    //@{
    TDFrm SACCH_C8_0D;
    TDFrm SACCH_C8_0U;
    TDFrm SACCH_C8_1D;
    TDFrm SACCH_C8_1U;
    TDFrm SACCH_C8_2D;
    TDFrm SACCH_C8_2U;
    TDFrm SACCH_C8_3D;
    TDFrm SACCH_C8_3U;
    TDFrm SACCH_C8_4D;
    TDFrm SACCH_C8_4U;
    TDFrm SACCH_C8_5D;
    TDFrm SACCH_C8_5U;
    TDFrm SACCH_C8_6D;
    TDFrm SACCH_C8_6U;
    TDFrm SACCH_C8_7D;
    TDFrm SACCH_C8_7U;
    //@}
    //@}
    /**@name SACCH for TCH/F on different timeslots. */
    //@{
    TDFrm SACCH_TF_T0;
    TDFrm SACCH_TF_T1;
    TDFrm SACCH_TF_T2;
    TDFrm SACCH_TF_T3;
    TDFrm SACCH_TF_T4;
    TDFrm SACCH_TF_T5;
    TDFrm SACCH_TF_T6;
    TDFrm SACCH_TF_T7;
    //@}
    //@}
    /**name FACCH+TCH/F placement */
    //@{
    //TDFrm FACCH_TCHF;
    //@}
    /**name FACCH+TCH/H Subchannel 0 */
    TDFrm FACCH_TCHH_S0;

    /**name FACCH+TCH/H Subchannel 1 */
    TDFrm FACCH_TCHH_S1;
    /**@name SACCH for TCH/H for subchannel 0 on different timeslots. */
    TDFrm SACCH_TH_S0_T0;
    TDFrm SACCH_TH_S0_T1;
    TDFrm SACCH_TH_S0_T2;
    TDFrm SACCH_TH_S0_T3;
    TDFrm SACCH_TH_S0_T4;
    TDFrm SACCH_TH_S0_T5;
    TDFrm SACCH_TH_S0_T6;
    TDFrm SACCH_TH_S0_T7;

    /**@name SACCH for TCH/H subchannel 1 on different timeslots. */
    TDFrm SACCH_TH_S1_T0;
    TDFrm SACCH_TH_S1_T1;
    TDFrm SACCH_TH_S1_T2;
    TDFrm SACCH_TH_S1_T3;
    TDFrm SACCH_TH_S1_T4;
    TDFrm SACCH_TH_S1_T5;
    TDFrm SACCH_TH_S1_T6;
    TDFrm SACCH_TH_S1_T7;
    /**name FACCH+TCH/F placement */
    //@{
    TDFrm FACCH_TCHF;
    //@}
    /**@name Test fixtures. */
    TDFrm LoopbackTestFull;
    // TDFrm LoopbackTestHalfU;
    // TDFrm LoopbackTestHalfD;
    //@}

    }TDFrmLst;


    typedef struct TDFrmTbl
    {

    TDFrmLst Frame;

    }TDFrmTbl;

    extern TDFrm *gSACCH_TF[8];
    extern TDFrm *gSACCH_TH_S0[8];
    extern TDFrm *gSACCH_TH_S1[8];


    VOID TDFrmTbl_Init( VOID );
    VOID TDFrmTbl_Print( VOID );
    extern TDFrmTbl gTDMA;
    #endif //#ifndef _TD_FRM_TBL_H_INCLUDED_
  • The result of the ## operator should be a valid token in C.  However, in your case Frame.##NAME yields Frame.IDLE, which is not a single token, but two tokens connected by an operator.  Just remove the ## in the INIT_TDFRMTBL macro.  It was never necessary.  

    It is a bug that earlier versions of the compiler accepted this code.  That bug has since been corrected in recent versions.

    When the GCC compiler issues a similar error, it looks like ...

    error: pasting "." and "IDLE" does not give a valid preprocessing token

    An internet search on the phrase does not give a valid preprocessing token returns several links with more discussion of this error.

    I apologize for not recognizing this situation earlier.

    Thanks and regards,

    -George