|
Two Modes of Target Execution |
Top Previous Next |
When you execute a program on the target, it can run in either of two modes (depending on the setting selected under Project Settings):
Debug Mode
In debug mode, your project runs with the assumption that you are right there, watching the monitor and trying to see what's going on. This means that the Debug menu is active. You can set up breakpoints, or step through your project, watch the variables, etc.
This also means the project might stop if there's an error, such as division by 0. And you can pause execution, stop it, etc.
Also, when uploading a project in debug mode, it does not begin to run by default. By default, it waits for you to run it.
|
Selecting Debug > Run, pressing F5 or clicking the Run button on the Debug toolbar would send an explicit command to the target, to start running the project. |
If the device reboots while a project is running in Debug Mode, the project will not start running automatically after the reboot. You would have to run it explicitly.
Release Mode
Release mode means business. This is the mode in which you compile the final files, deployed in the field. Under this mode, the working assumption is that you, or anybody else, isn't there. Your box is just supposed to run and run, despite any and all problems and errors.
This means that a release version does not respond to any debug commands. You cannot stop it. It does not stop even when critical errors occur. It also means that when you upload a release version to your target, it starts running immediately.
Even if you reboot your device, when it has a Release Mode binary in memory, it will start running.