18.2.15 Call Main

The last thing that the start-up code performs is a call to the main routine. If the user returns from main, the start-up code goes into an infinite loop. When you are compiling for use with a debugger in MPLAB X IDE with the -mdebugger option, this loop contains a software breakpoint.