ARM Technical Support Knowledge Articles


Applies to: uVision Debugger


Information in this article applies to:


On occasion the uVision debugger does not show executable code for my source code. What can be the reason for that?


The Keil compiler is an optimizing compiler that is tuned to reduce program size and increase execution speed. To accomplish that, sometimes the optimizer merges identical code sequences to save code space. When it does, it is not always possible to synchronize the source code with the assembly code while debugging (since there may be more than one source line that corresponds to the assembly code).

If your focus is source code synchronization, then you should reduce the optimization level to 3 or below. However, this causes program size to grow and execution speed to slow down. Typically, in embedded systems it is more important to debug the actual production code and accept the shortcomings in source code display.

Source line synchronization problems typically occur because of the following optimizations:

The ARM RealView Compiler contains several optimizations the affect the source code synchronization. When you are using Optimize Level 2 or 3 the compiler:

You may therefore see effects such as missing debug information for certain source lines. You may reduce the optimize level to improve the debug illusion or view the generated code in the µVision Disassembly Window.


Article last edited on: 2006-07-10 08:30:24

Rate this article

Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential