Err:identifier is undefined

Discussion in 'Embedded Systems and Microcontrollers' started by embed_v, Oct 20, 2010.

  1. embed_v

    Thread Starter New Member

    Aug 30, 2010
    24
    0
    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
     
  2. Papabravo

    Expert

    Feb 24, 2006
    10,144
    1,790
    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:
    Code ( (Unknown Language)):
    1.  
    2. #define UART0_BUFFER_LENGTH  128
    3.  
    would solve the immediate problem. Of course I have no idea if 128 is or is not an appropriate value for your situation.
     
Loading...