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/tms320c6657: line 330: expecting Identifier, found '(' (Hex)

Part Number: TMS320C6657

Tool/software: Code Composer Studio

I am debugging EDMA in a c6657.  I have a pointer in the Expressions tab open to show the contents of the overlay mapped EDMA shadow registers.  The "value" fields of some of the registers do not contain a value, rather the line "line <xxx>: expencting an Identifier, found '(' (Hex)".   I am forced to use a memory browser to view those register's contents.  It only starts when I get to the global channel registers.  As shown it occurs when viewing the contents of the shadow channel registers as well.

Below is a partial screen capture.

  • Hi,

    I have been trying to find an example code that could have a similar struct as the one you mentioned, so I could try to reproduce the problem. Unfortunately I couldn't find the exact same parameter you mentioned and any other struct I tried worked quite well in my setup.

    Therefore I ask: would you mind sharing a piece of code that exhibits the problem?

    I apologize for the inconvenience,
    Rafael
  • The problem can be seen looking at this in the Expressions tab:  (EDMA_ShadowRegs_t *)(0x02742000)

    or by looking a p_edmaShadowRegs in the Variables tab.

    /*
     * main.c
     */
    
    #include <stdint.h>
    
    #define EDMA3CC_BASE_ADDR                 (0x02740000u)
    #define EDMA3CC_SHADOW_REGION_0_BASE_ADDR (0x02742000)
    
    
    /*--- Shadow region 0 channel registers overlay ---
     *
     * see sprugs5b, Table 4-1, p92
     */
    typedef struct {
       volatile uint32_t ER;             /* 2000h */
       volatile uint32_t ERH;            /* 2004h */
       volatile uint32_t ECR;            /* 2008h */
       volatile uint32_t ECRH;           /* 200Ch */
       volatile uint32_t ESR;            /* 2010h */
       volatile uint32_t ESRH;           /* 2014h */
       volatile uint32_t CER;            /* 2018h */
       volatile uint32_t CERH;           /* 201Ch */
       volatile uint32_t EER;            /* 2020h */
       volatile uint32_t EERH;           /* 2024h */
       volatile uint32_t EECR;           /* 2028h */
       volatile uint32_t EECRH;          /* 202Ch */
       volatile uint32_t EESR;           /* 2030h */
       volatile uint32_t EESRH;          /* 2034h */
       volatile uint32_t SER;            /* 2038h */
       volatile uint32_t SERH;           /* 203Ch */
       volatile uint32_t SECR;           /* 2040h */
       volatile uint32_t SECRH;          /* 2044h */
       volatile uint8_t  RSVD10[8];
       volatile uint32_t IER;            /* 2050h */
       volatile uint32_t IERH;           /* 2054h */
       volatile uint32_t IECR;           /* 2058h */
       volatile uint32_t IECRH;          /* 205Ch */
       volatile uint32_t IESR;           /* 2060h */
       volatile uint32_t IESRH;          /* 2064h */
       volatile uint32_t IPR;            /* 2068h */
       volatile uint32_t IPRH;           /* 206Ch */
       volatile uint32_t ICR;            /* 2070h */
       volatile uint32_t ICRH;           /* 2074h */
       volatile uint32_t IEVAL;          /* 2078h */
       volatile uint8_t  RSVD11[4];
       volatile uint32_t QER;            /* 2080h */
       volatile uint32_t QEER;           /* 2084h */
       volatile uint32_t QEECR;          /* 2088h */
       volatile uint32_t QEESR;          /* 208Ch */
       volatile uint32_t QSER;           /* 2090h */
       volatile uint32_t QSECR;          /* 2094h */
       } EDMA_ShadowRegs_t;
    
    
    int main(void)
    {
    
       /* need this for emulator to see the type in the Expressions tab */
       volatile EDMA_ShadowRegs_t * p_edmaShadowRegs = (EDMA_ShadowRegs_t *)EDMA3CC_SHADOW_REGION_0_BASE_ADDR;
    
    	return 0;
    }
    
    /* EOF */
    

  • Hi,

    Thank you for sending the code; however, I was unable to reproduce this issue here.

    Therefore I ask: which version of CCS are you using? The screenshot above was taken with CCSv7.1.0 but I also tested CCSv6.2.0.

    Regards,

    Rafael

  • I am using 7.0.0.00043, though I am due to get a new workstation (today!) with 7.1 installed. I will wait for the new machine, try again and report back on results with 7.1.0.
  • With the new workstation and CCS 7.1 the results were the same as before. However, when I changed emulator pods the problem was resolved.

    Bad pod: BH-XDS-560v2 (three bad in the last month)
    Good pod: BH-USB-560v2
  • Hi,

    Wow, thank you for reporting back your surprising findings. I will try a few different pods here and report back.

    Regards,
    Rafael
  • Hi,

    Unfortunately I couldn't reproduce this on my three JTAG debug probes: BH-USB-560v2, BH-XDS-560v2 and XDS560V2 STM. I send the pictures just in case you spot anything that may be different between our environments. 

    Given that you have been having trouble with failing debug probes, did you double-check the possibility of having any ground loops that may be confusing (and maybe damaging) the BH-XDS-560v2 pods? The differences in the number of electrical connections and hardware design may account for the observed differences in behaviour. 

    Hope this helps,

    Rafael