This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problems single stepping in Keil uVision

I've been trying to debug mbed (2) 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 I use is either Windows 7 (64) and Windows 10 (64).

- I export an mbed project fro mbed.org 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?

Parents Reply Children