This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Error: L6218E: Undefined symbol main (referred from rtentry2.o).

hi
i am new with keil

when i start to use ADC in lpc2138 , this error appear for me
i couldn't solve it
" Error: L6218E: Undefined symbol main (referred from rtentry2.o)."

this is my code :

#include <lpc213x.h>
#include <lcd.h>
#include <stdio.h>

unsigned int read_adc();

void mian()
{ unsigned int adc_result; char buffer[16]; PINSEL1|=0x00800000; AD0CR=0x00200301; while(1) { adc_result=read_adc(); sprintf(buffer,"result=%d",adc_result); lcd_init(); lcd_gotoxy(0,0); lcd_print(buffer); }

}
unsigned int read_adc()
{ int true; unsigned int result; AD0CR|=0x01000000; true=AD0GDR&1; while(!true) result=(AD0GDR>>5); result&=0x3FF; return result;
}

0