Keil Logo

µVISION: Linker Control File Causes Linker Errors


Information in this article applies to:

  • C166 Version 4.03
  • C51 Version 6.00

SYMPTOMS

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 #

or

*** FATAL ERROR 204: INVALID KEYWORD
    POS: 31
    C:\KEIL\C51\BIN\BL51.EXE main.obj to test MAIN.OBJ #

BACKGROUND

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.

CAUSE

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.

RESOLUTION

Remove the unneeded parts from the linker control file and the linker will link your program correctly, e.g.:

RAMSIZE(256)

SEE ALSO

MORE INFORMATION

Last Reviewed: Friday, December 18, 2020


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.