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/TMS320F28035: Build error #838,need help?

Part Number: TMS320F28035
Other Parts Discussed in Thread: C2000WARE

Tool/software: Code Composer Studio

Hi:

When build my project, #838 error, console display as below

I check E2E , have the same question :

e2e.ti.com/.../559968 unrecognized cregister name 'IER'

 Add #include "F2803x_Cla_typedefs.h" in the first included header in  DSP280x_Device.h , it does not work ,  still  unrecognized cregister name 'IER' and  'IFR' 

 Check the picture above I think the compiler don't unrecognized keyword "cregister " but in F2803x_Cla_typedefs.h

#ifndef __TMS320C28XX__
#define __cregister
#endif //__TMS320C28xx__

The above picture i double click the error message  to open DSP280x_Device.h ,and the display show "cregister "is not a keyword and unrecognized .

But when i double click the file name in Project Explorer, the display show cregister  is a key word , display show as below

Then I edit one DSP280x_Device.h, the other one change simultaneously, so i think this two windows of DSP280x_Device.h display the same file, but in the different display?

Need suggestion the correct the build error, thanks

  • Tobby Guo said:
    Then I edit one DSP280x_Device.h, the other one change simultaneously, so i think this two windows of DSP280x_Device.h display the same file, but in the different display?

    It sounds like they are the same file.  In the project Explorer you can right click on a file name, select properties, under Resource you can view the location of the file.   Does this match up with the error information? 

  • Lori ,

    Thanks for your suggestion.

    I right click on project name , the properties shows as below:

    The project file :

    This project was  organize for CCS3.3 or CCS7.4/8.1 in one project file.

    The CLA  code was write by assembly in the old project,  l plan rewrite the CLA code use C

    After I add the cla file and change the related content of CMD file,  rebulid the project, #838 error,.

    Need more suggestions, Thanks.

  • Tobby,

    I took a simple CLA example from C2000ware.  In the .cla file if I order the includes like this I see the same error:

    #include "DSP2803x_Device.h"
    #include "DSP28x_Project.h"
    #include "DSP2803x_Cla_typedefs.h"

    If I order them like this, then I don't see the error:

    #include "DSP28x_Project.h"
    #include "DSP2803x_Cla_typedefs.h"
    #include "DSP2803x_Device.h"

    Another thing you can try is to modify Device.h to indicate the definitions should only be used if found in a .c file (and not a .cla file)

    //
    // Common CPU Definitions
    //
    #ifdef  __TMS320C28XX__
    extern __cregister volatile unsigned int IFR;
    extern __cregister volatile unsigned int IER;
    #endif

  • Lori ,

    Thanks for your suggestion.

    In my project, I change the order of include files, error #838. Then I do the test on CLA example(C2000ware\device_support\f2803x\examples\cla\acos),test result same as yours. Then I check the file content of DSP28x_Project.h

    The original #include "DSP2803x_Cla_typedefs.h "is before #include "DSP2803x_Device.h" compilation success. Then I change the sequence of this two code, compilation error, #838 console :

     I check the code in "DSP2803x_Cla_typedefs.h,  I think have nothing with unrecognized cregister name 'IER'&'IFR', just as  Vishal_Coelho mentioned   make sure DSP2803x_Cla_typedefs.h is the first included header in that file, why?

    e2e.ti.com/.../970962

    Then I modify Device.h as your suggestion, compilation success. But, according the console information before code modify, how can i know the definitions be used  in a .cla file result in compilation #838error, thanks for your support.

  • Tobby,

    The explanation is a bit convoluted.  I've copied the code from CLA_typedefs and from ..device.h 

    CLA_typedefs
    ============
    
    #ifdef __TMS320C28XX_CLA0__                      <<- true in .cla file
    
    <deleted lines>
    
    extern __cregister volatile unsigned int MSTF;   <<- fine for CLA
    #endif //__TMS320C28XX_CLA0__
    
                                 The next two lines are why the order of #include matters
    #ifndef  __TMS320C28XX__     <<- true in .cla file
    #define __cregister          <<- will make following __cregisters blank
    #endif  //__TMS320C28xx__
    
    device.h
    ============
                                                    Because of the lines in CLA typedef
    extern __cregister volatile unsigned int IFR;   <<- turns into volitile unsigned int IFR;
    extern __cregister volatile unsigned int IER;   <<- turns into volitile unsigned int IER;

    If the order of the files is flipped, then the lines in device.h cause an error when found in a .cla file.  

    My last suggestion, to modify Device.h keeps the offending lines from being used when compiling in a .cla file.  I feel this is the better solution because it doesn't depend on the order of the files.  

    Regards

    Lori