Hello, Did you try this?
PORTB = 0; If you get similar error message, then you should try to compile with --use-non-free option. Zsolt 2012/7/13 Drew Keller <d...@drewkeller.com>: > All arguments are deniable, right? ;) > I went back to SDCC 2.6 and the bits keyword *seemed* to compile ok, so > I would think it's at least partially implemented. > > OK, back to SDCC 3.2 and the modern world... > > I must be doing something wrong because this is not working. > PORTBbits.RB0 = 0; > > I get an error for that second line: > error 26: '_PORTBbits' is not a structure/union member > > I cannot figure out where the compiler thinks _PORTBbits is coming from. > The header file (pic14/pic16f627a.h in non-free) has __PORTBbits_t and > PORTBbits, but no _PORTBbits. If I try to use it (_PORTBbits = 0;) I get > an error 20: Undefined identifier '_PORTBbits'. > > On the other hand, if I do (basically the same thing as the header > file), everything compiles fine. > typedef union { > struct { > unsigned char T1: 1; > unsigned char : 7; > }; > } __test_t; > volatile __test_t __at(128) test; > #define b_T1 test.T1 > b_T1 = 0; > > Thanks > -drew > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Sdcc-user mailing list > Sdcc-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/sdcc-user -- ~~~~~~~~~~~~~~~~ http://galzsolt.zzl.org ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user