I am writing a code for lpc2148. There is no error in my code, neither is keil showing any. But when i press the debugging button, the debugging screen opens but the keil starts execution even without pressing the start button and also no output is shown on peripherals. I also tried step by step debugging but in vain. And not even proteus is simulating the code (not even direction is coming on the arm). Please help
"There is no error in my code, neither is keil showing any."
The compiler finds no syntax errors, encouraging, but not a blessing of being error free.
Debugging on real hardware, or the simulator? Have you selected "Run to main()" and "Load Application at Startup"? Do it get to main() or run somewhere else? ie if you stop it is it running somewhere? If the startup code is broken, how about not running to main()?
What board and debugger hardware are you using, LPC2148 is tad vague.
On Simulator only. And yes i've checked both the options are ticked. Even tried with unchecked 'run to main()'(here my IDE doesn't start debugging without my pressing the start button, but still no output). And i am using nxp's lpc2148 in IDE. my code: #include<lpc214x.h> void delay(int time) { int i,j; for(i=0;i<time;i++) for(j=0;j<time;j++); } int main() { IO0DIR|=0x0000000f; while(1) { IO0SET|=0x0000000f; delay(1000); IO0CLR|=0x0000000f; delay(1000); }}
even this code ain't getting debugged.