Syntax error sometimes with IO port pin assignments

Hi,

Not sure if this question should be under RX forums or here. I'm seeing errors in the e2 studio IDE regarding assignment of some IO port pins, but not all. For example:

If i write:

PORT6.PDR.BIT.B2 = 1;

this is deemed OK by the editor / builder, but if i write:

PORT6.PDR.BIT.B4 = 1;

i get a syntax error. I am only "allowed", in this case, to use something like:

PORT6.PDR.BYTE |= 0x10;

ie: address it as a whole byte, not a bit field.

Funny thing is, the processor i'm using (RX630 - R5F5630A) does have these pins. I've looked at the iodefine.h for the project and it also has B4 defined, same as B2:

...

struct st_port6 {
        union {
                  unsigned char BYTE;
                  struct {
                            unsigned char B7:1;
                            unsigned char B6:1;
                            unsigned char B5:1;
                            unsigned char B4:1;
                            unsigned char B3:1;
                            unsigned char B2:1;
                            unsigned char B1:1;
                            unsigned char B0:1;
                           } BIT;
                   } PDR;

...

It seems to happen randomly, for other ports as well or other bit fields sometimes. 

Does anyone have any idea of what might be causing this?

Thanks for any input.

Parents
  • In e2studio, if you hover your mouse on an identifier, the IDE will pop up the definition of it, even if it is a macro. This could help. The IDE does this relying on an internal "index", which sometimes can get out of sync... you can force the IDE to rebuild the index using the menu item Project/C++ Index/Rebuild (or something similar). The normal symptom of an out-of-sync index is that the compiler does not output warnings or errors, but the IDE shows them anyway.

    Another thing you can try is to search the whole project (menu Search: try C/C++ search and/or File... search): may be that the correct definition for PORT6 is absent or overriden somewhere.

    You can also right-click on an identifier and ask for its definition: you will be transported to the file where the definition or declaration are. Again, the IDE does this via it's internal index, which could be wrong.
  • I have put syntaxes at the end of the code but still getting the syntax errors in my code whenever I compile it e2studio IDE.

    Please help in me for this issue.

    Upsers

  • Hello, Lee.

    How did you described with which iodefine.h file for which device with which compiler??

Reply Children
No Data