Syntax error sometimes with IO port pin assignments


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:


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


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 Reply
  • I noticed that when i changed from the default iodefine.h file obtained from one of the code examples for an RX630 starter kit, and replaced it with one generated by the PDG2 generated iodefine, targeted to my board specifically, that some of the IO port syntax errors that used to  occur went away. But even with the new iodefine, i am still getting the same behavior.

    There appears to be something wrong with the way the IDE / builder / tools interprets them or with the iodefine itself. At least, that's my guess.

    Is there an iodefine file which is guaranteed to work with my RX630? If so, where can i download it from? I would like to rebuild my project with a known good iodefine and see if that changes anything.