Err:identifier is undefined

Thread Starter

embed_v

Joined Aug 30, 2010
24
i hav some problem with my uart code
i declare rx buffer as follows.
but i get the error......
wer is the problem

U8 RXD_Buffer[UART0_BUFFER_LENGTH]; // Receive buffer

wer u8-typedef unsigned char

uart0.c(14): error: #20: identifier "UART0_BUFFER_LENGTH" is undefined
 

Papabravo

Joined Feb 24, 2006
21,225
Somewhere in your source code you need to tell the compiler what value to use for the symbol UART0_BUFFER_LENGTH. The compiler is telling you that after searching all the files that it had access to, it could not find any information on what value that symbol might have. A statement like:
Rich (BB code):
#define UART0_BUFFER_LENGTH  128
would solve the immediate problem. Of course I have no idea if 128 is or is not an appropriate value for your situation.
 
Top