Code::Blocks Forums
User forums => Embedded development => Topic started by: signalman on May 07, 2012, 08:27:04 pm
-
I am writing a signalling application which I intend to use with Texas Ins CC1110 TxRx. The CC1110 has an in-built 8051 chip. I have found the header file for a CC1110 but when I build it, I am getting error messages when it gets to the SFRBIT and SFR lines of the header. The relevant lines are:
#define SFR(sfr name,addr) name = addr;
#define SFRBIT(sfr name, addr, bit7, bit6, bit5, bit4, bit3, bit2, bit1, bit0) name = addr;
(error reads : macro parameters must be comma separated)
and then later when it tries to read the sfr's
SFRBIT( P0 , 0x80, P0_7, P0_6, P0_5, P0_4, P0_3, P0_2, P0_1, P0_0 )
SFR( SP , 0x81 ) /* Stack Pointer */
SFR( DPL0 , 0x82 ) /* Data Pointer 0 Low Byte */
SFR( DPH0 , 0x83 ) /* Data Pointer 0 High Byte */
(error reads : sfr does not declare a type)
I have programmed in several languages, including machine code, but I am very much a newboy when it comes to C++.
Can anybody point me in the right direction, or can I get a syntax of the code::blocks version of C++ since each version appears to have slight differences.
Jim.
-
Well why don't you start with reading the FAQ:
http://wiki.codeblocks.org/index.php?title=FAQ
Compiler errors are no Code::Blocks errors, so you better ask in the right forum:
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29
-
Thanks - I am looking
-
A C++ compiler for 8051 architecture. :o I didn't really know it existed apart from the fact that your problem doesn't anyway related to CB.