-
Couldn't load subscription status.
- Fork 48
Description
It currently is not possible to execute the custom reset functionality if the CPU is running.
This is in all-stop mode where you are limited in the commands you can call.
Custom reset should silently stop the target before executing the commands for reset.
One could expect that the target is set running again after the reset, if it was running before.
However, it is hard to predict what commands are used for the custom reset. And when the target really stops based on the command sequence. Commands could include setting a breakpoint and a continue command, where the breakpoint is hit only after completion of the custom reset logic. continueIfNeeded would provoke errors if target was already/still running as part of reset.
Unfortunately, GDB/MI doesn't give us simple access to the current run state of the target. In order, to have a well-defined and predictable behavior, the custom reset does NOT proactively resume the device if it was running before pressing the reset button. It remains stopped unless the customResetCommands explicitly resume it.
Happy to get this further refined in future if someone has a good idea how to capture/restore the state after reset.