Keil Logo

GENERAL: Code Size Errors


Information in this article applies to:

  • C51
  • MDK
  • C166

SYMPTOMS

I receive the following error when I link my project:

Code Size Limit in Restricted Version Exceeded

This may be labelled as L250, L52, or E120, depending on your toolset.

I have the real (not the evaluation) tools and I've checked all the settings and everything seems OK. Why am I receiving this error message?

CAUSE AND RESOLUTION

There are several reasons for this error message.

  1. You are using the evaluation tools. Click on Help - About in the µVision IDE and look for your serial number. Note that you must have a project open when you do this. If the IDE reports that your serial number is EVAL VERSION (or something similar) then you need to purchase the tools or install full version of the tools you purchased).
  2. You may have an OBJ file that was compiled or assembled with the evaluation software. This may be accompanied by error 252. Rebuild (re-compile and re-assemble) all of the files in your project. This will solve the problem in many cases.
  3. With a license, you see C500 warning(s) preceding the L250 error. This means the support period of the product ended before the release date of the installed version of the toolchain. Either renew support, to access the latest upgrades, or downgrade to a supported version. Earlier releases are available for download, from the following section: Maintenance Status and Previous Versions.
  4. You have selected a device from an architecture different than supported by your fully-licensed product. For example, if you have only a PK51 kit licensed, but you select an NXP LPC2148 device as a target. µVision knows that the LPC2148 is an ARM device and tries to build the project using the ARM tools. If you have no ARM license, the ARM tools run in evaluation mode.
  5. You have a vendor-specific license and you have selected a device from a different vendor than supported by your licensed product. Vendor-specific licenses run in evaluation mode for products made by other vendors of the same device architecture.
  6. If using diskettes, try installing the tools on a different PC. If your target PC is on a network, find another PC with a access to a network drive common to both PCs. Use the new PC to copy the contents of the Add-On Disk to a folder on the network drive using the MS-DOS XCOPY command. Start the installation from the CDROM drive on the original PC and when prompted for the Add-On Disk, point it to the folder on your network drive containing the files of the Add-On Disk.

For 8051 Users:

  1. You installed V7 using an Add-on Diskette ZIP download file, but the Use Folder Names option was not checked when you extracted the Add-on Diskette files.

  2. If you have just upgraded to Version 8.00 or later, you must license your kit to activate its full capabilities. See the Installing a LIC section in the Licensing User's Guide for information regarding this.

  3. If you have another version of µVision installed on your PC, check Components, Environments and Books in the Folders/Extensions tab. If the BIN: text box is not blank, make sure it points to the /BIN folder that contains the latest version of µVision.

  4. You have a CA51 or DK51 kit and are trying to use the Extended Assembler and Linker checkbox options in your project. These options are only available in the PK51 toolkit.

  5. You have DK51 and are using LX51. Under Options for Target - Device, uncheck Use LX51 Linker. The version of LX51 supplied with the DK51 package is a demo only with the same restrictions as Keil's other evaluation tools.

  6. If using SiLabs IDE, you must configure the SiLabs tools to use them. To configure the Silicon Labs IDE: Open the Project - Tool Chain Integration window. Change the Assembler, Compiler and Linker executable paths to point to the folder where you installed the Keil tools. see: C51: Getting Evaluation Version When Using the Silicon Labs IDE.

For C251 Users

  1. If you purchased the complete C251 package, you may receive this error if you attempt to install the full kit over the top of the evaluation kit. Reinstall the C251 tools into a new directory (or uninstall and reinstall into the same directory) and this problem will go away. You may receive this error if the path settings in your environment (AUTOEXEC.BAT) include the evaluation tools directory before the full tools directory. If this is the case, remove the evaluation tools directory from the PATH statement and everything should work fine

For C166 Users

  1. You may have run the installer without entering your serial number. To correct this problem, re-run the SETUP program and make sure you enter your serial number.
  2. The C166 v4 installer had problems that may lead to an installation of a restricted toolset. Download the latest updates from http://www.keil.com/update/ and completely remove all tools and Keil folders from you computer. Run the install from the download, selecting Install Software and entering your serial number. For more details, see: L166: Fatal Error 250 (Code Size Limit...).

MORE INFORMATION

SEE ALSO


Last Reviewed: Thursday, February 25, 2021


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.