GENERAL: Code Size Errors
Information in this article applies to:
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
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
CAUSE AND RESOLUTION
There are several reasons for this error message.
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
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.
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
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
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.
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
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:
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.
If you have just upgraded to Version 8.00 or later, you must
license your kit to activate its full capabilities.
Installing a LIC section in the Licensing User's
Guide for information regarding this.
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.
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.
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.
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 EVAL
VERSION USING SILABS IDE.
For C251 Users
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
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.
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...).
Last Reviewed: Wednesday, April 17, 2019