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

Why does my debugger act strange?

Hi,

I'm using the MCBSTM32E board with a STM32F103ZE uC with the ULINK-ME interface.

The debugger can be set to run to main and then it nicely stops at the first code to be execute by the main() function and with each next step nicely steps through the main function.

However, if the run to main option is switched off then the debugger nicely stops at the first instruction in the Reset_Handler. It their loads the address of main() and then branches to main(). But after executing the branch instruction the debugger STOP button is highlighted and nothing happens. I expect the debugger to step through the main() function.

What am I doing wrong or what do I misunderstand here?

Henk

  • Hi,

    Some additional information:

    A few times during debugging the disassembler realy jumps from the Reset_Handler branch instruction to the main() function but 99 out of 100 times it does not.

    During debugging the disassembled code and the original source code commands are both show in the disassembler window. But the location of the disassembled code is moved 3 or 4 lines so the disassembled code is positioned between the wrong source code lines.

    When the debug option Load Application at Startup is disabled then the dissasembler nicely steps from the Reset_Handler to the init code executed prior to accessing the main() function code. Only once it dit not.

    When starting to debug, many times the breakpoints do disappear and the debugger does not stop at those locations. It seems to reduce this problem by first killing all breakpoints and then set the breakpoints.

    So my (hopefully wrong) conclusion is that there probably is some bug in the debugger.

    Just let me know...

    Henk