Hi , I have this error message (activ22.axf: Error: L6218E: Undefined symbol main (referred from rtentry2.o).)when I build target . this is the code
#include <LPC17xx.H> /* Definiciones para el LPC17xx */
#define N 10000
static int8_t contador; static int32_t leds=0x10;
void delay(int32_t milisegundos) { int32_t i,j; for(j=0;j<milisegundos;j++) { for(i=0;i<N;i++); // retardo de X milisegundos } }
int main (void) { LPC_GPIO1->FIODIR = 0x000000F0; /* P1[7..4] como salidas */ LPC_GPIO1->FIOCLR = 0x000000F0; /* apaga todos los LEDs */ while(1) { contador++; LPC_GPIO1->FIOPIN = leds; delay (100*contador); // retardo variable leds<<=1; if(leds==0x100) { leds=0x010; contador=0; } } }
please help me because I don't know how to do . thanks