28#ifndef CMSIS_PLUS_ARM_SEMIHOSTING_H_
29#define CMSIS_PLUS_ARM_SEMIHOSTING_H_
71#define AngelSWI_ARM 0x123456
75#define AngelSWI AngelSWI_ARM
78#if defined(__ARM_ARCH_7M__) \
79 || defined(__ARM_ARCH_7EM__) \
80 || defined(__ARM_ARCH_6M__)
81#define AngelSWIInsn "bkpt"
82#define AngelSWIAsm bkpt
84#define AngelSWIInsn "swi"
85#define AngelSWIAsm swi
88#if defined(OS_DEBUG_SEMIHOSTING_FAULTS)
93#define AngelSWITestFault "setend be"
94#define AngelSWITestFaultOpCode (0xB658)
98__attribute__ ((always_inline))
106#if defined(OS_DEBUG_SEMIHOSTING_FAULTS)
107 " " AngelSWITestFault
" \n"
114 : [rsn]
"r" (reason), [arg]
"r" (arg), [swi]
"i" (
AngelSWI)
115 :
"r0",
"r1",
"r2",
"r3",
"ip",
"lr",
"memory",
"cc"
131__attribute__ ((always_inline,noreturn))
static void report_exception(int reason)
@ SEMIHOSTING_SYS_TICKFREQ
@ ADP_Stopped_RunTimeError
@ SEMIHOSTING_ReportException
@ SEMIHOSTING_SYS_ISERROR
@ SEMIHOSTING_SYS_GET_CMDLINE
@ ADP_Stopped_ApplicationExit
@ SEMIHOSTING_SYS_HEAPINFO
@ SEMIHOSTING_SYS_ELAPSED
static int call_host(int reason, void *arg)