Module cortex_m_semihosting::debug
[−]
[src]
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:
#[macro_use] extern crate cortex_m_semihosting; 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
Exception |
This values are taken from section 5.5.2 of ADS Debug Target Guide (DUI0058). |
Constants
EXIT_FAILURE |
Unsuccessful execution of a program. |
EXIT_SUCCESS |
Successful execution of a program. |
Functions
exit |
Reports to the debugger that the execution has completed. |
report_exception |
Report an exception to the debugger directly. |
Type Definitions
ExitStatus |
Status enum for |