# [SOLVED]Not able to run Proteus Simulation after building project in CooCox

Status
Not open for further replies.

#### shomikc

##### Member level 3
Hello,

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.

#### FvM

##### Super Moderator
Staff member
Getting empty hex file (and probably meaningless elf file as well) makes pretty clear that there's something wrong with your project settings, unlikely a Proteus problem.

As a first step, I'd inspect the compiler and linker reports.

- - - Updated - - -

By the way, I presume it's much more fun to run your exercises on a cheap prototype board with hardware debug features.

shomikc

### shomikc

Points: 2

#### shomikc

##### Member level 3
Thankyou Mr. FvM,

I think you are absolutely right. There seems to be some problem with my project settings. I made the same project in Keil uvision and I got a hex file and ran it on Proteus.

Now I am getting an error Internal exception: out of memory. I agree with your advice and I will try to get a board as soon as possible. Thanks and Regards, Shomik Chakraborty.

- - - Updated - - -

Hello, Can anyone please tell me how to solve the problem of error Internal exception: out of memory. What settings will I have to change in uvision to get the simulation in Proteus to work? Thanks and Regards, Shomik Chakraborty.

Status
Not open for further replies.