7 years, 7 months ago.

Problems single stepping in Keil uVision

I've been trying to debug mbed code in Keil uVision, but only with limited success.

I am using the Nucleo F401 board from ST. At the time of writing, I have the latest version of Keil uVision, ST Link Drivers and Firmware - all packages are up to date. The OS is both Windows 7 (64) and Windows 10 (64).

  • I export an mbed project for Keil v5
  • Open the project
  • Set optimisation to -O0
  • Rebuild

If I build, download and run, all is well. When switch to debug mode, I can add a breakpoint and run the code - that's fine.

The problem is when trying to single step the code. Step-in seems to work, but I don't want that behaviour. I want to step a line at a time without stepping in.

(Note - I close the disassembly listing, and only view the C source)

  • Sometimes it works, other times the code seems to run away* ( as if I'd clicked the run button' ). I would understand this if optimisation was turned on, but it's off.

I've experimented with different settings with no success (I'm at the point where it's descended into a frustrated and crazy-eyed random clicking of options!).

What is odd is that it used to work. I've tried other boards with older firmware as well.

Anyone have the same / any suggestions?

Be the first to answer this question.