hi, i am using Keil 4 evaluation version for programming LPC2148. i wrote code for simple led blinking.when i creating new project and creating hex then this hex doesn't work on board. but when i compile same code on previously created project then it work fine. so what are the possible issue and what i have to do....my source code is as follows.....pls give me suggestions....
#include <lpc214x.h> void delay(unsigned int n); void main(void) { PINSEL0 = 0X00000000; IODIR1 = 0xFFFFFFFF; IODIR0 = 0xFFFFFFFF; while(1) { IOSET0 =0xFFFFFFFF; delay(1000); IOCLR0 =0xFFFFFFFF; delay(1000); } } void delay(unsigned int n) { unsigned int i,j; for(i=0;i<n;i++) for(j=0;j<1275;j++); }
Have you checked the project settings?
You should worry about that delay function. Optimization could reduce it to nothing. Even the call to it could be optimized away.
you must change the project configuration.
choose "use memory layout from target dialog" from: project\options for target...\linker.
thanks!!!!!! problem solve...
I changed that options for target linker settings.. but when i build it shows error... hex does not created
THANK U ITS WORKING...