Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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

Status
Not open for further replies.

shomikc

Member level 4
Member level 4
Joined
Apr 19, 2013
Messages
71
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,953
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

project files.jpg

The circuit I have built in Proteus is

proteus.jpg

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.
 

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.
 
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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top