I am using the STM32-Discovery board(ST-Link debugger chip
connected via SWD interface (no JTAG) to STM32F100VB 32 bit CortexM3
processor) with uVision4(evaluation version, though code is way under
the 32k limit).
I can look at memory & registers, and debug & set
breakpoints in the disassembly window, but can't debug or set
breakpoints in the regular source code windows.
I also can't program with uVision but this is not a problem. Just
using the ST-Link utility program instead.
Does anyone know what would be causing this?
"can't debug or set breakpoints in the regular source code
You need to be more specific about what problem(s), exactly, you
Have you checked the introductory information to ensure that your
are following the correct procedures?
I've used the ulink pro and a couple of other on-chip debuggers on
Usually in uVision, if you want to set a breakpoint, you double
click on the place you want to insert it in the source code (or press
the red insert/remove breakpoint button). A red dot appears on the
left of the window and the program stops if or when it reaches this
point. When using a new chip or debugger I usually place one on the
first line of main() to make sure it is loading correctly.
This is working in the disassembly window but not in any of the
source code windows.
Usually when I have the disassembly window open and have stopped
at a particular line of c source code, the equivalent line of
assembly code is also highlighted. The disassembly window also has
comments inserted that let you know where it is in the c program.
Neither of these features are working(the disassembly code is
un-commented and the regular source code is ignored when in debug
The uVision "Peripherals" menu for this chip seems to be working
fine (I turned on the clock for GPIOA, toggled a couple of the I/O
pins, and verified with meter).
It is as if uVision is unaware that the c code has anything to do
with what is on the microprocessor.
typo: meant "on-development-board debuggers"
Have you included debug information?
I found a solution for this problem. I disable the option
"Download to Flash" in the debug section. And when I need to debug, I
first download the code, and then press debug button. I think this is
a bug of the IDE.
Try this, it works for me.
I am writing this for the ones who may encounter same problem.
You could forget to connect BOOT0 to GND. When it is left floating, MCU does not boot from flash.
View all questions in Keil forum