Sleep States Debugging

The sleep states do not interfere with a debugging session, but depending on the target state it might not always be possible to halt the target interactively (i.e. pushing the "Suspend" button in Eclipse* or issuing a "CTRL+C" in GDB* or a "halt" command in OpenOCD*) in a correct way.

There is currently no protection to prevent the user to interactively stop the target in sleep states, which potentially leads the debugging session to an invalid state (i.e. run state/location and variables/memory values shown in Eclipse might not reflect the actual state of the target anymore).

The best way to proceed with the debugging - if stubbing sleep calls are not desirable - is to set breakpoints at the locations executed when the cores wake up from a sleep state and wait for the trigger condition to happen.

For more complete information about compiler optimizations, see our Optimization Notice.