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.

error: Proteus VSM & keil for ARM 7 with global variable

Status
Not open for further replies.

suryakant

Member level 5
Member level 5
Joined
Mar 10, 2005
Messages
90
Helped
6
Reputation
12
Reaction score
0
Trophy points
1,286
Location
India
Activity points
2,171
proteus for lpc2138

Hi,

When i am writing any simple code just to set & clear any particular pin in keil for lpc2138 it works fine but as soon as i assigned any variable as global variable then proteus doesn't work only.....

I tried both options:

1. Directly specified hex file path in Proteus VSM.
2. From keil VSM debugging --Remote degugging


I dont know what exactly the problem is ...

Please help me for this

I am attaching details of my error
1. Directly assigned hex file.
Please see code

Code:
#include <LPC21xx.H> /* LPC21xx definitions */ 

void wait (void); 
int main (void) 
{ 
unsigned int k; 
IODIR1 = 0xFF0000; /* P1.16..23 defined as outputs */ 

while (1) 
{ /* Loop forever */ 
IOPIN1 = ~(IOPIN1 & 0XFFFF0000); ; 
for (k=0;k<=65530;k++); /* Turn off LED */ 
} 

}

Please see the diagram NO- 1.direct_hex_file in attached files

2. In this code, i am just making variable "K" as global variable


Code:
#include <LPC21xx.H> /* LPC21xx definitions */ 
void wait (void); 

unsigned int k; 

int main (void) 
{ 
IODIR1 = 0xFF0000; /* P1.16..23 defined as outputs */ 

while (1) 
{ /* Loop forever */ 
IOPIN1 = ~(IOPIN1 & 0XFFFF0000); ; 
for (k=0;k<=65530;k++); /* Turn off LED */ 
} 

}

see the attachement 2.remote-degug_global_variable

please ..........let me know where i am going wrong or what is the problem in setting
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top