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.

Compiler/TMS320C5517: How to use the cregister definition for IER0?

Part Number: TMS320C5517

Tool/software: TI C/C++ Compiler

Hi,

I'm trying to write some test code targeted for the C5517 and I want to use the cregister definition for the IER0 register.

After setting up my CCS project, it shows a processor setting of -v5515. I tried setting it to 5517 but it's not accepted. Then I tried for a while to figure out what -v options are acceptable, didn't find it on any documentation (and I looked through it all). Then by accident, I saw a note in the CCS Compiler settings dialog box that if you type list instead of a value, a list shows up in the title bar, not intuitive at all. I discovered I can use -vcpu:3.3. IMO this whole CPU/silicon revision input the the compiler is confusing as heck.

Anyways, the real reason I'm trying to set the proper -vcore version is I'm using c55x.h and trying to use the cregister definition for the IER0 register.

In c55x.h you have...

#ifdef __TMS320C55X_PLUS__

extern __cregister volatile unsigned long IER;
extern __cregister volatile unsigned int  IER0;
extern __cregister volatile unsigned int  IER1;
extern __cregister volatile unsigned long DBIER;
extern __cregister volatile unsigned int  DBIER0;
extern __cregister volatile unsigned int  DBIER1;
extern __cregister volatile unsigned int  IVPD;

extern __cregister volatile unsigned int  ST0;
extern __cregister volatile unsigned int  ST1;
extern __cregister volatile unsigned int  ST2;
extern __cregister volatile unsigned int  ST3;
extern __cregister volatile unsigned long XSP;
extern __cregister volatile unsigned long XSSP;
extern __cregister volatile unsigned long RETA;

extern __cregister volatile unsigned long IFR;
extern __cregister volatile unsigned int  IFR0;
extern __cregister volatile unsigned int  IFR1;
extern __cregister volatile unsigned int  BER;
extern __cregister volatile unsigned int  BIOS;

extern __cregister const volatile unsigned int IIR;
extern __cregister const unsigned int CPUCFG;
extern __cregister const unsigned int CPUREV;

#endif

So, in order for these cregister definitions to be defined, the symbol __TMS320C55X_PLUS__ has to be defined. I tried defining it myself in code but then the compiler complains about it

Here's my C code. I copy/pasted the cregister definition so I didn't have to define __TMS320C55X_PLUS__. same end result as if I had defined it and included c55x.h.

//#include <c55x.h>
extern __cregister volatile unsigned int  IER0;

int main(void)
{
    IER0 = 0x00000001;
    return 0;
}

**** Build of configuration Debug for project c5517evm ****

"C:\\ti\\ccs910\\ccs\\utils\\bin\\gmake" -k -j 12 all -O
 
Building file: "../main.c"
Invoking: C5500 Compiler
"C:/ti/ccs910/ccs/tools/compiler/c5500_4.4.1/bin/cl55" -vcpu:3.3 --memory_model=large -g --include_path="C:/UserData/Projects/ADC36xx/CCSv9_Workspace/c5517evm" --include_path="C:/ti/ccs910/ccs/tools/compiler/c5500_4.4.1/include" --define=c5517 --display_error_number --diag_warning=225 --ptrdiff_size=16 -k --preproc_with_compile --preproc_dependency="main.d_raw"  "../main.c"
 
>> Compilation failure
subdir_rules.mk:9: recipe for target 'main.obj' failed
"../main.c", line 5: error #838: unrecognized cregister name 'IER0'
"../main.c", line 5: error #658-D: the modifier "cregister" is not allowed on this declaration
2 errors detected in the compilation of "../main.c".
gmake: *** [main.obj] Error 1
gmake: Target 'all' not remade because of errors.

**** Build Finished ****



So my question is, how do I use the cregister definitions? I tired using -vcore:3.3 and that didn't work

Thanks

  • Brad Caldwell said:
    how do I use the cregister definitions?

    Unfortunately, they are not supported for C55x devices.  They are only supported for C55x+ devices.  As explained in this forum thread, no C55x+ devices were ever released to the general market.  

    Brad Caldwell said:
    I tried for a while to figure out what -v options are acceptable, didn't find it on any documentation (and I looked through it all).

    The best place for that sort of detail is the readme files in the root directory of where the compiler is installed.

    Thanks and regards,

    -George