Hi,
I am struggling to use Keil's debugger because of its strange behaviour:
I have experienced similar things with Keil before, where the debugger just stops, or jumps around the code, despite it not being compiled with optimisation.
Have other people experienced these things? How did you stop it happening?
What version of Keil MDK do you have installed? It is recommended to upgrade to the latest release.
Besides, see i.e.:
"UVISION DEBUGGER: Cannot Set Breakpoints or Step Through C/C++ Code"
https://developer.arm.com/documentation/ka004242/latest
"UVISION DEBUGGER: Breakpoints are not hit when debugging in RAM"
https://developer.arm.com/documentation/ka002719/latest
"Breakpoints Window"
https://www.keil.com/support/man/docs/uv4/uv4_db_dbg_breakpnts.htm