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 5.1 - Invalid use of macro pasting in macro

Hello,

I ported over an application from CCS 3.3 to CCS 5.1, which made liberal use of CSL macros, which are now getting flagged.  At the end of this post is a partial example of how they are used in one case, to initialize a McBSP configuration structure.  In CCS 5.1, every single entry line is underscored in the text editor, and has a question mark next to it.  When I mouse over the question mark, it says:

    Multiple markers at this line

        - Invalid use of macro pasting in macro: _PER_FMKS

        - Invalid use of macro pasting in macro: MCBSP_FMKS

The configuration of the McBSP, using this approach, doesn't appear to be working as expected in CCS 5.1, possibly related to these errors.

Please advise,

Robert

 

static MCBSP_Config mcbsp_cfg_1 =
{
MCBSP_FMKS( SPCR, FREE, NO ) |
MCBSP_FMKS( SPCR, SOFT, NO ) |
MCBSP_FMKS( SPCR, FRST, YES ) |
MCBSP_FMKS( SPCR, GRST, YES) |
MCBSP_FMKS( SPCR, XINTM, XRDY ) |
MCBSP_FMKS( SPCR, XSYNCERR, NO ) |
MCBSP_FMKS( SPCR, XRST, YES ) |
MCBSP_FMKS( SPCR, DLB, OFF ) |
MCBSP_FMKS( SPCR, RJUST, RZF ) |
MCBSP_FMKS( SPCR, CLKSTP, DISABLE ) |
MCBSP_FMKS( SPCR, DXENA, OFF ) |
MCBSP_FMKS( SPCR, RINTM, RRDY ) |
MCBSP_FMKS( SPCR, RSYNCERR, NO ) |
MCBSP_FMKS( SPCR, RRST, YES ),

.

.

.

  • Hi Robert,

    I can reproduce these syntax errors when I import a CCS 3.3 CSL project into CCS5.1 as well. It seems these are due to the Eclipse indexer not being aware of these macros. These are only syntax errors reported by the indexer and the project itself should build fine.

    To disable these syntax errors from appearing in the editor, you can disable the indexer for that particular project. Go to Project Properties->C/C++ General->Indexer, and check the box for "Enable project specific settings" and then uncheck the box for "Enable indexer". The right-click on your source file and select Refresh. Those syntax errors should then disappear.

    I will also follow up with the development team to see if those syntax checks can be disabled to begin with when the projects are imported for the first time.

  • Thanks Aarti,

    That removed most of them.  But I'm left with these:

         MCBSP_FMKS( RCR, RDATDLY, 0BIT )  
         MCBSP_FMKS( RCR, RWDLEN1, 16BIT )

    for which there is still a question mark, and the comment: Invalid binary format encountered

    ?

    Robert

  • Robert,

    I was just told of another way to disable the indexer markers without disabling the indexer itself. If you disable the indexer completely you will lose the capabilities of code completion and navigation to declaration/definition. So the following is a better solution: go to Window->Preferences->General->Editors->Text Editors->Annotations and uncheck all three checkboxes for "C/C++ Indexer Markers". This should help with that last macro which reported invalid binary format as well.

     

  • Thanks Arti,

    That did cover all the obvious issues.  I'm still not getting the expected result using CSL and MCBSP_Config constructs, which worked in CCS 3.3.  Specifically SPCR is not being initialized as instructed using MCBSP_FMKS, or MCBSP_SPCR_RMK.  But unless you have some possible insight, that's probably a topic for another thread, if I'm not able to tackle it otherwise ;)

    Robert

  • Robert38116 said:
    I'm still not getting the expected result using CSL and MCBSP_Config constructs, which worked in CCS 3.

    Robert,

    If you continue to have problems with this, I would suggest starting a new thread to keep the topics separate. Thanks!

  • AartiG said:

    I'm still not getting the expected result using CSL and MCBSP_Config constructs, which worked in CCS 3.

    Robert,

    If you continue to have problems with this, I would suggest starting a new thread to keep the topics separate. Thanks!

    [/quote]

    http://e2e.ti.com/support/dsp/tms320c6000_high_performance_dsps/f/115/p/146456/529278.aspx#529278

    :-)

    No help with it yet, though.

    Robert