When I execute Build target, "FATAL ERROR L210:I/O ERROR ON INPUT FILE...." is shown.
Why I can't Build?
Build target 'Target 1' compiling main.c... MAIN.C(1): warning C500: SERIAL NUMBER EXPIRED linking... BL51 BANKED LINKER/LOCATER V6.11 - SN: D1M9C-0392H5 COPYRIGHT KEIL ELEKTRONIK GmbH 1987 - 2007 "main.obj" TO "BitIO" RAMSIZE(256) *** FATAL ERROR L210: I/O ERROR ON INPUT FILE: EXCEPTION 0021H: PATH OR FILE NOT FOUND FILE: main.obj Target not created
(my code)
#include "c8051f320.h" // SFR declarations
/*----------------------------------------------------------------------------- Definitions -----------------------------------------------------------------------------*/
typedef unsigned char u8; typedef unsigned short u16;
sbit LED1 = P2^2; // LED1 ='1' means ON sbit LED2 = P2^3; // LED2 ='1' means ON
/*----------------------------------------------------------------------------- MAIN C function -----------------------------------------------------------------------------*/ void OSCILLATOR_Init(void) { OSCICN |= 0x03; // Configure internal oscillator for // its maximum frequency (24.5 Mhz) }
void PORT_Init(void) { P2MDIN |= 0x0F; // Lower four pins on P2 are digital
P2MDOUT = 0x0C; // Enable LEDs as push-pull outputs // Enable Switches as open-drain
P2 |= 0x03; // Set port latches for P2.0 // and P2.1 to '1'
XBR1 = 0x40; // Enable crossbar and enable // weak pull-ups }
void main(void) { //P1_0 = 1; /* Configure P1.0 as an input */ OSCILLATOR_Init(); PORT_Init();
while (1) {
LED1 = 1; // Turn on LED
LED1 = 0; // Else, turn it off
LED2 = 1; // Turn on LED
LED2 = 0; // Else, turn it off
} }
compiling main.c... MAIN.C(1): warning C500: SERIAL NUMBER EXPIRED
This is clearly telling you that your serial number has expired - isn't it?
linking... BL51 BANKED LINKER/LOCATER V6.11 - SN: D1M9C-0392H5 COPYRIGHT KEIL ELEKTRONIK GmbH 1987 - 2007 "main.obj" TO "BitIO" RAMSIZE(256) *** FATAL ERROR L210: I/O ERROR ON INPUT FILE: EXCEPTION 0021H: PATH OR FILE NOT FOUND FILE: main.obj
The Linker is clearly telling you that it can't find main.obj - isn't it?
Now, main.obj would be the compiler's output from compiling main.c - wouldn't it?
But the compiler has already told you that you don't have a valid serial number any more - so it should come as no surprise to find that it hasn't generated an output file!
And, if the compiler hasn't generated main.obj, then the Linker is obviously not going to be able to find it!
QED
Thank you for your reply.
when I confirm "main.obj" in my project directory,I can't find it. Why is not there "main.obj"?
And,
What is the meaning "MAIN.C(1): warning C500: SERIAL NUMBER EXPIRED "?
kenji
"What is the meaning 'MAIN.C(1): warning C500: SERIAL NUMBER EXPIRED'?"
"Expired" means that something has passed the end of its life or validity:
dictionary.cambridge.org/.../expire_1
When you purchased your licence to use the Keil software, you got a Serial Number to "unlock" the software. The Serial Number is the "key" to your licence.
A licence is valid just for a finite length of time - usually 1 year.
So, when it says that you serial number has expired, it means that your licence is no longer valid.
If you want to continue using the software, you need to purchase a new licence.
You need to speak directly to Keil (or your local agaent) about that:
http://www.keil.com/company/contact.asp