Module cortex_m_semihosting::debug
source · [−]Expand description
Interacting with debugging agent
Example
This example will show how to terminate the QEMU session. The program
should be running under QEMU with semihosting enabled
(use -semihosting
flag).
Target program:
use cortex_m_semihosting::debug::{self, EXIT_SUCCESS, EXIT_FAILURE};
fn main() {
if 2 == 2 {
// report success
debug::exit(EXIT_SUCCESS);
} else {
// report failure
debug::exit(EXIT_FAILURE);
}
}
Enums
This values are taken from section 5.5.2 of ADS Debug Target Guide (DUI0058).
Constants
Unsuccessful execution of a program.
Successful execution of a program.
Functions
Reports to the debugger that the execution has completed.
Report an exception to the debugger directly.
Type Definitions
Status enum for exit
syscall.