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.
I am working on the USBSTK5515. Whenever I declare a pointer to ioport space I get a question mark on the left hand marigin that says Syntax Error. However the code still compiles without error and runs as expected. Does someone know why this is? Below is an example of what I am saying.
volatile ioport Uint16* led_ptr1 = (volatile ioport Uint16*)(0x1c0a);
However I do not get the warning for the following
volatile
ioport X;
Only when I add the Uint16* do I get that warning, Why would this be and am I doing something wrong?
I don't see any syntax errors when I try to use the same code. Could you send a screenshot of the error? Which version of CCS are you using?
Ok I see it in CCSv5. I had tried it earlier with CCSv4 and did not see it.
It looks like the Eclipse CDT parser (which parses the code to build an index) does not like that syntax even though the TI C compiler accepts it.
Since the compiler itself does not generate any errors, you could ignore the CDT syntax error. You can also turn off syntax error reporting in the editor by going to Window->Preferences->General->Editors->Text Editors->Annotations, select C/C++ Indexer Markers and uncheck all the checkboxes.
Hope this helps.
You can trickle the syntax checker by the following code, placed in some header file:
#ifndef __TMS320C55X__
#ifndef ioport
#define ioport
#endif
#endif
__TMS320C55X__ - is autogenerated, and is not visible to the parser, but is passed to the compiler, which means that the above code will not compile. It will only remove the error marks for you.
Remark: replace " __TMS320C55X__ " with your target device if different.
Hi Georgi,
I tried that but __TMS320C55X__ is already defined before compilation. Cant "F3" to where it's defined though.
For now I just add "#define ioport" to the file I'm working on to get rid of the errors, and comment it out before I compile... :/
Is someone working on this?