Keil’s C51 compiler does a silly thing. Normally in Keil you can compile code under 6k in size without needing a license. Adding a floating license removes this restriction. Unfortunately adding this license also means you cannot compile any code, even if it it under 6k without checking out a license. Installing a second version of Keil did not solve this problem as I though it would. So I found another solution (despite their tech support saying it is not possible 😉 )
Keil keeps a TOOLS.INI file in the /Keil/ directory. This file also keeps track of licensing. For example my last two lines under the C51 section are:
FLF0=”\\****\SCC\Third Party Tools\Keil PK51 Floating License\KeilC51.FLF”
Removing these lines from the .ini files returns the C51 compiler to evaluation mode with limited code size functionality. Replace them to use the floating license.
Keil checks this file at every compilation so no need to restart or anything…