Ozone - Debug Snapshots
Save and restore your system's state.
With Ozone's Debug Snapshot feature the entire state of an embedded system can be saved at any point while debugging. A snapshot can include the Flash and RAM contents of the device, the CPU register values, instruction trace and log output, as well as the current target hardware state, such as peripheral register values. Debug Snapshots enable two key features for efficient debugging and analysis.
- Use a snapshot with instruction trace to store trace and profiling information for later analysis and documentation.
- Use a snapshot with the hardware state to restore the system without having to have it running to that point.
Snapshots for Analysis
With Ozone's Debug Snapshots the results of tests running on the target system can be saved. Simple tests of an embedded application require to only save whether the test passed or not, in some cases the output from the target. More advanced tests might need to store the code coverage or profiling information. With a Debug Snapshot all this can be saved in one place and reviewed exactly the way as in a debug session.
A test application can be run and halted when all tests are done. Now a snapshot can be taken. The instruction trace, log output, memory contents and register values are stored in the snapshot. It can be saved for later analysis or with the documentation. The Debug Snapshot can be loaded in Ozone, even when the hardware is not available. After loading a snapshot, Ozone will look exactly like in the debug session when the snapshot has been saved. It is shown where the target has been halted, its call stack, the values of variables and registers, or the instruction trace and log output.
Snapshots to Restore the System
With Ozone's Debug Snapshots the state of the target can not only be saved but also restored. This can be useful for efficient debugging of issues that happen only after a certain amount of time or for tests that require some setup in the target system.
Usually, to debug an issue that happens after two hours running the system, one would have to wait for two hours for each test run. With Ozone the system can run shortly before the issue happens and a snapshot is taken. Now the debug session is restarted and the snapshot loaded. The system will continue running from that point and quickly runs into the issue. This saves minutes to hours of waiting.
In a Debug Snapshot the Flash and RAM contents of the device and the CPU register values are stored. Additionally the whole system state, such as peripheral register values, can be saved. That enables a full restore of the system sate, including clock configuration, interrupts, GPIOs, and peripherals. For more information on how to save and restore the system state, refer to https://wiki.segger.com/Using_snapshots#Snapshot_Programming