Keil Logo


Information in this article applies to:

  • C51 Version 5.50


I have a large number of directives that I wish to specify when invoking the linker. The list of directives is greater than 128 characters, which is the maximum length allowed for a command line. How do I invoke the linker with a long command line?


You can either split your command line over several lines or use a linker Command File.

To split the command line over several lines enter as many complete directives as possible followed by an ampersand. The linker will then prompt you to enter more directives with a '>>' sign.

To use a linker Command File create a text file ending in .lin with all the directives specified in it. You can use multiple lines as long as each split line ends with an ampersand. When invoking the linker specify the path to the Command File after an '@' sign. Eg:


Linker Command Files may be created automatically in µVision by performing the following steps (assuming you have a project loaded in):

  1. Choose BL51 Code Banking Linker from the Options menu.
  2. Click on the Files tab.
  3. Check the 'Use Command File' option.
  4. Click on the Create button and save the newly created Command File. The command line options for the linker change to use the new Command File.
  5. Click on the Edit button to edit the Command File.


Last Reviewed: Friday, July 15, 2005

Did this article provide the answer you needed?
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.