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

How to configure application properly?

I am using Keil uVision version 5.40. I load the application in my target board using
Keil ULINK2 Debugger. I can jump to my startup code. When I get to the following instruction:

bx __main()

I cannot single step into Keil's __main(). When I try stepping into it, code starts running.
When I hit stop execution, I end up in the following filename (RT_Agent.c):

void _sys_exit (int return_code) {
  /* Endless loop. */
  while (1);
}

My guess is I'm not configuring my application properly.

Please advise!

Parents
  • __main is *not* main.

    __main is created by the compiler. It's where ram is initialized. It eventually calls main().

    But... I couldn't step into either, the application just started running. It probably doesn't have debugging info, so the debugger doesn't know what to do. If you open the disassembly window and put a break point at the address of __main, it'll stop, though.

Reply
  • __main is *not* main.

    __main is created by the compiler. It's where ram is initialized. It eventually calls main().

    But... I couldn't step into either, the application just started running. It probably doesn't have debugging info, so the debugger doesn't know what to do. If you open the disassembly window and put a break point at the address of __main, it'll stop, though.

Children