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.

Trouble including c64.h

Other Parts Discussed in Thread: CCSTUDIO

Hi Brad,

I followed your advice on the above link to set IER to enable interrupts using:

#include <c64.h>
C64_enableIER (C64_EINT5);
I am using a Spectrum based EVM for the OMAP-L137 with a CCS DSP/BIOS version 5.33.05.  I have all the latest drivers per TI's automatic update site.
I am getting the following erros when I compile with the c64.h file included:
"C:/CCStudio_v3.3/bios_5_33_05/packages/ti/bios/include/c64.h", line 59: error: identifier "Uns" is undefined
"C:/CCStudio_v3.3/bios_5_33_05/packages/ti/bios/include/c64.h", line 60: error: identifier "Uns" is undefined
"C:/CCStudio_v3.3/bios_5_33_05/packages/ti/bios/include/c64.h", line 61: error: identifier "Uns" is undefined
"C:/CCStudio_v3.3/bios_5_33_05/packages/ti/bios/include/c64.h", line 96: error: identifier "Uns" is undefined
"C:/CCStudio_v3.3/bios_5_33_05/packages/ti/bios/include/c64.h", line 96: error: identifier "Uns" is undefined
"C:/CCStudio_v3.3/bios_5_33_05/packages/ti/bios/include/c64.h", line 102: error: identifier "Void" is undefined
"C:/CCStudio_v3.3/bios_5_33_05/packages/ti/bios/include/c64.h", line 102: error: identifier "Uns" is undefined
"C:/CCStudio_v3.3/bios_5_33_05/packages/ti/bios/include/c64.h", line 108: error: identifier "Void" is undefined
"C:/CCStudio_v3.3/bios_5_33_05/packages/ti/bios/include/c64.h", line 108: error: identifier "Uns" is undefined
"C:/CCStudio_v3.3/bios_5_33_05/packages/ti/bios/include/c64.h", line 118: error: identifier "Void" is undefined
"C:/CCStudio_v3.3/bios_5_33_05/packages/ti/bios/include/c64.h", line 118: error: identifier "Int" is undefined
"C:/CCStudio_v3.3/bios_5_33_05/packages/ti/bios/include/c64.h", line 118: error: identifier "Fxn" is undefined
"C:/CCStudio_v3.3/bios_5_33_05/packages/ti/bios/include/c64.h", line 118: error: identifier "Int" is undefined
Shouldn't these "undefined"s already be covered somewhere else, since you did not suggest including any other files.
Any help you can provide will greatly be appreciated.
                                                       Vedat
  • The easiest thing to do is to simply include the header file that's auto-generated by bios.  If your tcf file is called bios.tcf the corresponding header file will be bioscfg.h.  Include that file prior to c64.h and it will handle the necessary includes for you.  The one you're missing is std.h.

    Brad

  • Vedat Odabas-Geldiay said:

    Brad, thank you for your quick reply.  Here is what happened:

    I have included the tcf file's header file (Configuration2cfg.h) before the c64.h in the code, and now the compiler is not able to open this header file even though its in the same directory as the tcf file and I can open it.  The header file is also already included under the Include section of CCS files section.  The error message I get is :

    "NST_Main.c", line 70: fatal error: could not open source file "Configuration2cfg.h"

    I also tried including std.h by itself before the c64.h and this time I get the following error messages: They are duplicate specification and invalid combination of types etc errors.

    "C:\CCStudio_v3.3\bios_5_33_05\packages\ti\bios\include\tistdtypes.h", line 51: error: duplicate specifier in declaration
    "C:\CCStudio_v3.3\bios_5_33_05\packages\ti\bios\include\tistdtypes.h", line 51: error: invalid combination of type specifiers
    "C:\CCStudio_v3.3\bios_5_33_05\packages\ti\bios\include\tistdtypes.h", line 52: error: duplicate specifier in declaration
    "C:\CCStudio_v3.3\bios_5_33_05\packages\ti\bios\include\tistdtypes.h", line 52: error: duplicate specifier in declaration
    "C:\CCStudio_v3.3\bios_5_33_05\packages\ti\bios\include\tistdtypes.h", line 52: warning: declaration requires a typedef name
    "C:\CCStudio_v3.3\bios_5_33_05\packages\ti\bios\include\tistdtypes.h", line 53: error: duplicate specifier in declaration
    "C:\CCStudio_v3.3\bios_5_33_05\packages\ti\bios\include\tistdtypes.h", line 53: error: invalid combination of type specifiers
    "C:\CCStudio_v3.3\bios_5_33_05\packages\ti\bios\include\tistdtypes.h", line 56: error: invalid combination of type specifiers
    "C:\CCStudio_v3.3\bios_5_33_05\packages\ti\bios\include\tistdtypes.h", line 57: error: duplicate specifier in declaration
    "C:\CCStudio_v3.3\bios_5_33_05\packages\ti\bios\include\tistdtypes.h", line 57: warning: declaration requires a typedef name
    "C:\CCStudio_v3.3\bios_5_33_05\packages\ti\bios\include\tistdtypes.h", line 58: error: invalid combination of type specifiers

    Has anyone made this scheme work with the latest version of the released software? Do you have any other suggestions?

                                                                                                                                      Vedat

     

     

  • When you include a file with quotes in a C file, the compiler will look for that file relative to the source file being compiled.  If Configuration2cfg.h is not in the same directory as the file being compiled then you need to add that folder to the search path.

  • That helped Brad.

    Now I got all the type difference errors, but when I changed the order of the include files such that Configuration2cfg.h and c64.h is included before the evmomapl137.h, those errors also disappeared.  This is what I have and it now compiles error free: 

    #include "Configuration2.cfg.h"
    #include <c64.h> 
    #include "stdio.h"
    #include "evmomapl137.h"

    Before,  I had the evmomapl137.h  included before the Configuration2cfg.h and c64.h and that produced many type difference errors that I listed in the previous entries.

    As you suggested, if I replace "Configuration2.cfg.h" with <std.h> that also works.  Thank you.

                                                                                                                                                                             Vedat

     

  • I see the following code in evmomapl137.h:

    #define Uint32  unsigned int
    #define Uint16  unsigned short
    #define Uint8   unsigned char
    #define Int32   int
    #define Int16   short
    #define Int8    char

    I don't know why they didn't use a typedef... That's why you ended up with all those errors before.  I will email Spectrum Digital about it.  Perhaps they can fix it if they release a new rev of the software.