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

Set "Use Simulator" and "Run to main()" in Debug but does not stop at main()

I am using uVision V5.15.0 and built an generic M4 based project with "Hello World" program. Set "Use Simulator" and "Run to main()" in Debug tab, built code and started Debug Session, but debugger does not stop at main() rather stopped at the following line.

LDR R0, =SystemInit

My question is why the tool does run to main() as the Options promised? What else it needs to be done to make the debugger runs to main()?

Parents
  • If I put break point at main and F5 run, debugger can run to break point. That proofs the "Run to main" seems not working in simulator with no additional setting. I even added debug script with one line "g main" or "g, main" and neither works although the IDE showed the following messages in command window.
    Load "C:\\projects\\Keil\\run2Main\\Objects\\run2Main.axf"
    Include "C:\\projects\\Keil\\run2Main\\debug.ini"
    /*-------------------------------------------*/
    /* Run the Program (stop at main) */
    /*-------------------------------------------*/
    g main

Reply
  • If I put break point at main and F5 run, debugger can run to break point. That proofs the "Run to main" seems not working in simulator with no additional setting. I even added debug script with one line "g main" or "g, main" and neither works although the IDE showed the following messages in command window.
    Load "C:\\projects\\Keil\\run2Main\\Objects\\run2Main.axf"
    Include "C:\\projects\\Keil\\run2Main\\debug.ini"
    /*-------------------------------------------*/
    /* Run the Program (stop at main) */
    /*-------------------------------------------*/
    g main

Children
No data