shomikc
Member level 4
Hello,
I have made a project using Coocox for Single LED blink for lpc1343. I am new to ARM microcontroller programming.
My Project files in Coocox
The circuit I have built in Proteus is
I am using the latest gnu toolchain. The ELF file is created but the hex file is 0 KB. I have tried with both files. With the ELF file the error in proteus is [ELF] Unrecognized attribute form code 17 [U1_CM3CORE] [ELF] ELF file corrupt or loader error at location 131101 [U1_CM3CORE] and with hex file the error is error reading the file and that there is no colon at the first of line.
Can anyone please help me? What am I doing wrong? Thanks and Regards, Shomik Chakraborty.
I have made a project using Coocox for Single LED blink for lpc1343. I am new to ARM microcontroller programming.
Code:
#include <lpc13xx.h>
void delay(void);
int main(void)
{
LPC_GPIO0->DIR = (1<<7); //Config PIO0_7 as Output
while(1)
{
LPC_GPIO0->DATA = (1<<7); //Drive output HIGH to turn LED ON
// Better way would be LPC_GPIO0->DATA |= (1<<7);
delay();
LPC_GPIO0->DATA = 0x0; //Drive output LOW to turn LED OFF
// Better way would be LPC_GPIO0->DATA &= ~(1<<7);
delay();
}
//return 0; //normally this wont execute
}
void delay(void) //Hard-coded delay function
{
int count,i=0;
for(count=0; count < 4500000; count++) //You can edit this as per your needs
{
i++; //something needs to be here else compiler will remove the for loop!
}
}
My Project files in Coocox
The circuit I have built in Proteus is
I am using the latest gnu toolchain. The ELF file is created but the hex file is 0 KB. I have tried with both files. With the ELF file the error in proteus is [ELF] Unrecognized attribute form code 17 [U1_CM3CORE] [ELF] ELF file corrupt or loader error at location 131101 [U1_CM3CORE] and with hex file the error is error reading the file and that there is no colon at the first of line.
Can anyone please help me? What am I doing wrong? Thanks and Regards, Shomik Chakraborty.