After migration from CCS4 to CCS5 5.1.0.09000 I get a syntax error for the following lines in my main.c file:
extern cregister volatile unsigned int IER;
extern __cregister volatile unsigned int CSR;
(Those lines are identical to the ones from ...\ccsv5\tools\compiler\c6000\include\c6x.h. In that file, no syntax error is shown).
As a consequence, the symbols IER and CSR cannot be resolved. I tried both compiler versions 6.1.14 and 7.3.1. I use those statements on file scope (I also tried as first lines in main.c).
My environment is
Another strange thing: After switching back to CGT 6.1.14, I get the error message:
!CONFIGURATION: {0} [Mon Jan 16 15:16:10 CET 2012]
!TOOL: {0}
!WARNING: Unresolved option: com.ti.ccstudio.buildDefinitions.C6000_6.1.compilerID.ABI
My questions:
1) Why does the keyword 'cregister' show in black instead of purple (it is not recognized as keyword in CCS5 and hasn't been in CCS4 either )
2) Can I use both '__cregister' (like in the c6x.h) and 'cregister' (like in spru187t, example 6-1) or is there a difference in behavior?
3) I didn't set the --coffabi compiler option manually, it was set automatically when I switched to CGT 7.3.1 (which is a nice feature but might cause problems). Why doesn't it get removed automatically when switching back to 6.1.14? Are there other settings that are changed when I go from 6.1.14 to 7.3.1 and back?
4) How can I get rid of the syntax error (I wouldn't want to go back to assembler code to modify IER unless there is a compiler directive to reserve one or two registers for my own assembler code)?
By the way, I was missing the tags 'compiler'/'CGT' and 'CCS v5'