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.

Cannot find CSR and IER

Good morning,

I have two projects loaded into code composer the both reference these registers but one works and one reports unresolved symbols which relates to CSR and IER.

I know this is more than likley something simple and I am missing a define or include path in the project but I have been tearing my hair out looking for it for a couple of days so if someone could please point me in the right direction I would be very grateful.

Thanks

Sean

  • Sean,

    Compare your #includes between the two. The first one should be <c6x.h>.

    Regards,
    RandyP

  • Hi Randy,

    All the included that are in the working project are also in the one that isn't working.  c6x.h isnt actually in either of them but I put it in to see and it made no diffrence.

    Sean

  • Sean,

    Unresolved Symbols sounds like a link time error, rather than compile time error,  Can you confirm?

    If yes then you are missing some library in your second project.

    Regards,

    Rahul

  • Hi,

    yes sorry for not being clear it happens in the linking part of the build below is what appears in the console.

    Thanks

    Sean

    <Linking>

    undefined first referenced
    symbol in file
    --------- ----------------
    _PIC_SPI_Rx ./14ducfg.obj
    _PIC_SPI_Tx ./14ducfg.obj

    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "14du.out" not built

    >> Compilation failure
    gmake: *** [14du.out] Error 1
    gmake: Target `all' not remade because of errors.

    **** Build Finished ****

  • Sean,

    Please confirm that all the libraries linked in the first project are same as the ones being linked in second project. Check the project settings as well as linker command files. Also please specify the device you are using, and if you are using BIOS so that we can help you locate the appropriate library that needs to be linked

    Regards,

    Rahul

  • Hello,

    yes it is all the same.  I am using a C6713B and I am using the BIOS.

    Thanks 

    Sean

  • Sean,

    Which version of CCS and which version of BIOS are you using?

    Your error message above does not have any mention of CSR and IER. Is this a new problem, or a different problem? If not, what am I missing in understanding this?

    Regards,
    RandyP

  • Hi,

    I am using CCS v , Compiler v7.3.1 and DSP/BIOS v5.41.11.38 and yes the same libraries are included in both.

    "Symbol 'CSR' could not be resolved" and "Symbol 'IER' could not be resolved" are displayed in the problem window and have errors next to them in the code.  It doesn't say say what the symbols are in the console (this would be sensible) but i can only assume it is IER and CSR as that is what is reported int he problems window.

    Sean

  • I have gone to an old backed up version which builds and I will re do the changes as it looks like it is going to be by far the easier option.

    Thanks

    Sean

  • Sean,

    Your CCS version did not come through in the post, but it is probably v5.x, and the x could be relevant - probably not but it could be.

    Sean Bedford said:

    undefined       first referenced
    symbol            in file
    -----------        ----------------
    _PIC_SPI_Rx   ./14ducfg.obj
    _PIC_SPI_Tx   ./14ducfg.obj

    The message above says the undefined symbols are _PIC_SPI_Rx and _PIC_SPI_Tx, and that they were referenced in your BIOS Config file. Perhaps there is a typo in the name of an ISR?

    These are not related to the CSR and IER errors. Usually the errors that show up in Problems also show up in the console window during the compile step at which they occur.

    Regards,
    RandyP

  • As Randy said, the two unresolved _SPI_* symbols is a different problem from unresolved 'CSR' and 'IER'.  It would be either a spelling problem (upper vs. lower case really does matter) or a failure to include the necessary library (not normally a problem if you let CCS configure BIOS for you).

    A similar message about 'CSR' and 'IER' would occur if they were used without a suitable preceding declaration in *some* source file (C using EABI, if they really don't start with an underscore).  Usually you should get these declared by #include <c6x.h> (that header is in the compiler's usual "include" directory).  For most purposes, that is the best way, but instead you can manually declare them:

    extern cregister volatile unsigned int CSR; extern cregister volatile unsigned int IER;

    If you're using "strict ANSI" mode (which is somewhat unlikely), then change cregister to __cregister.

    Another possibility might be if you used them incorrectly in an assembly-language file.  The control registers can only be used with the MVC operator, *not* with MOV, AND, etc.

    About those other symbols, you can search for them in the source files.  On Windows, you can use the findstr command from a command ("DOS") window: open the window by typing "cmd" in the "Run..." or "Search programs and files" box, use "cd {pathname}" to navigate to the folder where your source files are, then type "findstr {target_pattern} *.c".  On Unix or Linux, use "grep" instead of "findstr".

  • Hi,

    Thanks for the responces.  When loaded an old backed up project the CSR and IER problem went away but the other remained and it was down to a spelling mistake.

    Thank you for your help.

    Sean