Hello,
if i try to compile, i get this message:
*** FATAL ERROR L210: I/O ERROR ON INPUT FILE: EXCEPTION 0021H: PATH OR FILE NOT FOUND FILE: LED.obj
The compiler should make the LED.obj or is that wrong? Whats the problem here?
Please help me
Bye!
So long as you actually asked it to, and provided it with a valid LED.c input file, and it compiled without errors, and you didn't do anything else that would change the output name, etc, etc...
Two clues:
The 'L' prefix on the error code indicates that it's a Linker error;
Also, a .obj file would be an output from the compiler.
"Also, a .obj file would be an output from the compiler."
If i try to compile, the output in KEIl says: "LED.obj"
But after that the Linker cant find the .obj because there isnt one. But why? Why does the compiler run without error, but doesnt create the LED.obj??
Thanks for help!
It could be a license issue. I have encounter something similar in the past, and returning to uv3 (rather than uv4) solved it.
Post the complete output, so that we can see exactly what it says.
(use copy-and-paste - don't manually re-type it).
Note that the Linker just says that it can't find it...
Build target 'Target 1' assembling STARTUP.A51... compiling LED.c... LED.C(1): warning C500: SERIAL NUMBER EXPIRED linking... BL51 BANKED LINKER/LOCATER V6.22 - SN: K1U9F-UA565E COPYRIGHT KEIL ELEKTRONIK GmbH 1987 - 2009 "STARTUP.obj", "LED.obj" TO "LED" RAMSIZE(256) *** FATAL ERROR L210: I/O ERROR ON INPUT FILE: EXCEPTION 0021H: PATH OR FILE NOT FOUND FILE: LED.obj Target not created
Yes there is a license issue, but a Keil FAQ says, that it should be compiler. How to fix that?
KEIL FAQ says, that the compiler should compile. The licence problem is only information that there are no updates any longer.
Another clue:
If I start a new project with 2 header files and the LEd.c and the Startup File. He create a Startup.obj, but not the LED.obj after the compiler ends.
Have you enabled the SRC directive?
Is an LED.obj being created anywhere on your hard drive?
No .obj file on hard drive!
How do I enable the SRC directive? Clue: The startup file and the LED.c are in the same directory in KEIL!
http://www.keil.com/support/man/docs/c51/c51_src.htm
"The SRC directive creates an assembler source (.SRC) file instead of an object (.OBJ) file."
But i want the .obj file.
If i uncheck "Generate Assembler SRC File" he compiles but brings up 3 warnings:
Build target 'Target 1' assembling STARTUP.A51... compiling LED.c... LED.C(1): warning C500: SERIAL NUMBER EXPIRED linking... *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: ?C_START MODULE: STARTUP.obj (?C_STARTUP) *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: ?C_START MODULE: STARTUP.obj (?C_STARTUP) ADDRESS: 000DH Program Size: data=9.0 xdata=0 code=15 creating hex file from "LED"... "LED" - 0 Error(s), 3 Warning(s).
Then, obviously, you must not check 'Generate Assembler SRC File'
Or, if you do, you must also check 'Assemble SRC file'.
"i uncheck 'Generate Assembler SRC File' he compiles..."
So you did have it checked, then?!
"...but brings up 3 warnings"
Does your LED.c file contain a valid main() ?
Yes there is a valid main()!
I have to uncheck Assemble SRC File and check Generate Assembler SRC File -> result: 3 warningsbut it compiles
If I try anything other -> the error I mentioned in the beginning!
No - that's wrong!
I think you need to just throw that project away, and start again from scratch with a good, clean project; eg,
http://www.keil.com/support/man/docs/uv4/uv4_ex_hello.htm
result:
Build target 'Simulator' compiling HELLO.C... HELLO.C(1): warning C500: SERIAL NUMBER EXPIRED linking... BL51 BANKED LINKER/LOCATER V6.22 - SN: K1U9F-UA565E COPYRIGHT KEIL ELEKTRONIK GmbH 1987 - 2009 "HELLO.obj" TO "HELLO" RAMSIZE(256) *** FATAL ERROR L210: I/O ERROR ON INPUT FILE: EXCEPTION 0021H: PATH OR FILE NOT FOUND FILE: HELLO.obj Target not created