I am using keil uv5 but hex file created is only of 4kb even though i have written enough program and i am using lpc2138 and it happens for every program I write so I am unable to load my program in my microcontroller
Yes I am using Lite version
This is the basic Led blinking program i am using
The hex file created for this program in Uv4 is running fine and I am getting the output
While the hex file for same program in Uv5 is not running properly I am not getting anything as output the Leds are not blinking
#include <LPC214X.H>
void delay_ms(unsigned int); int main() {
VPBDIV = 0X00; //PERIPHERAL CLOCK FREQ = 15MHZ IO0DIR = 0X00FF0000; // SET PORT DIRECTION I/O PINSEL1 = 0X00000000; // PORT PIN CONFIGURATION AS A GPIO (P0.16 TO P0.31)
while(1) {
IO0SET = 0X00FF0000; delay_ms(2000); IO0CLR = 0X00FF0000; delay_ms(2000); }
} void delay_ms(unsigned int value ) { unsigned int i; value = value * 15000; for(i=0;i<value;i++); }
1) That's a tiny program, so why expect a large hex file?
2) Your source file is uart.c. But the source code doesn't seem to relate to any UART.
3) Are you sure you have any LED on the specific pins?
4) How have you verified that the program gets downloaded correctly?
5) How have you verified what happens on the relevant port pins?
6) How do you know if the processor leaves the reset state?
7) How do you know the processor doesn't stays in the boot loader?
8) Have you verified all project settings?
9) Any other observations you have made, that is actually relevant to your problem and not related to your assumptions about size of produced hex file?