Fixing Simplicity's Studio KEIL C51 Licensing Issues

Fixing code size errors and licensing issues in Simplicity Studio

Fixing Simplicity's Studio KEIL C51 Licensing Issues

I recently ran into an issue where my code stopped compiling after I added a few new features. After some digging, I realized that KEIL was complaining that the evaluation license that I was using was not valid because the CID code no longer matched, and the code was too big for the evaluation license.

After some digging around I found that if some of your parameters have changed since you applied for the license (like if you updated your computer), then it is possible that the error could occur.

Licensing User’s Guide: Licensing Errors

Removing the old license

Simplicity Studio doesn't allow you to remove the old KEIL license easily from Simplicity Studio. There is no dialog to remove it.

You have to go to: C:\SiliconLabs\SimplicityStudio\v5\developer\toolchains\keil_8051\9.60\BIN\TOOLS.INI and delete the existing license code, so the file just contains:

[C51]
LIC0=

The next time you open Simplicity Studio you will be greeted with the dialog to add a license.

Obtaining a new license

You can apply for a new licence here. Or use the dialog in Simplicity Studio to apply for a new licence

Single-User License Management

Fixing code size

Still, KEIL complained about my code size and ADDRESS SPACE OVERFLOW. It turns out that in the memory model, DATA is fast, but stores only 128 bytes for variables. But if you use XDATA, it is slightly slower but you can store up to 64KB.

It is easy to change the memory model for your project:

  1. Right click on the Project and select properties
  2. C/C++ Build > Settings > Tool Settings > General Settings
  3. Choose the memory model from the dropdown list

Reference

Migrated to a new SSD this weekend and am now getting license error R201. this error when I build my previously working project: LICENSE ERROR (R201(2): INVALID LICENSE ID CODE (LIC))
This was a previously working project. The full message is:
Community - Silicon Labs
The Silicon Labs Community is ideal for development support through Q&A forums, articles, discussions, projects and resources.