This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ERROR: PREMATURE END OF FILE ON 'ex1.hex'

ek51v705.exe
very simple test program, why get
ERROR: PREMATURE END OF FILE ON 'ex1.hex'
anyone can help me.
Thank you

#include <AT89x51.h>
#define uint unsigned int
#define uchar unsigned char
sbit P07=P0^7;
void Delay(uint i)
{ uint j;
	for(;i>0;i--)
		for(j=0;j<125;j++)
		{;}
}
void main()
{
	for(;;)
	{
	P07=1; //close lamp
	Delay(500);// delay 0.5S
	P07=0; //open lamp
	Delay(500); //delay 0.5S
	}
}
=================================
Build target 'Target 1'
compiling ex1.c...
linking...
Program Size: data=9.0 xdata=0 code=64
creating hex file from "ex1.hex"...
OBJECT TO HEX FILE CONVERTER OH51 V2.6
COPYRIGHT KEIL ELEKTRONIK GmbH 1991 - 2001
GENERATING INTEL HEX FILE: ex1.hex
*** ERROR: PREMATURE END OF FILE ON 'ex1.hex'
*** OH51 ABORTED.
"ex1.hex" - 0 Error(s), 0 Warning(s).

Parents Reply Children
No data