µVISION: LINKER CONTROL FILE CAUSES LINKER ERRORS
Information in this article applies to:
When using µVision with linker control files, some customers have reported the following linker error messages:
*** FATAL ERROR 204: INVALID KEYWORD POS: 31 C:\KEIL\C166\BIN\L166.EXE main.obj to test MAIN.OBJ #
*** FATAL ERROR 204: INVALID KEYWORD POS: 31 C:\KEIL\C51\BIN\BL51.EXE main.obj to test MAIN.OBJ #
Here is an example of a linker file:
"Main.obj" TO "BLINKY" RAMSIZE(256)
This was auto generated along with a project batch file. To reproduce this, on Project -> Options For Target -> Output tab, Check the Create Batch File checkbox. See µVision: CREATING A PROJECT BATCH FILE.
This error is caused when the object files for the project are included in the linker command file. The object file list is automatically generated by µVision. You should not add these files to the linker command file, as well as the line that starts with "TO..".. The command file is intended only for the linker commands and controls.
Remove the uneeded parts from the linker control file and the linker will link your program correctly, e.g.:
Last Reviewed: Tuesday, January 29, 2019
of your data.