Debugging Issue: Keil real-board debugger used to work, now it quits immediately


Problem: When trying to enter real-board debugging mode on Keil uVision for the Tiva LM4F120 Launchpad or Tiva TM4C123 Launchpad, the debugger immediately exits upon entering. Keil can still download object code, but will not run the debugger. Typically, we have seen this problem occur after months of the Keil debugger working properly. So, if your Keil real-board debugger never worked, it is probably a board driver or a Keil debug configuration problem.

Solution: It appears there may be an entry to the registry that is getting set that is preventing debug.

Four Steps to fixing the error:

1) Open windows registry:

    Press Windows key on your keyboard to access Start screen

    On this screen type Regedit to initiate a new Start search

    Click Regedit in search results and confirm the UAC message to openRegistry Editor


The contents should look similar to the image below:



2) In the Windows registry, search for the directory:

HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers


3) If there is an entry similar to the following (C:Keil will depend on where you installed Keil),

C:\Keil\UV4\UV4.exe           REG_SZ               $ IgnoreFreeLibrary<lmidk-agdi.dll>


Remove the entry. 



4) Reboot and retry the debug session.