| MINI55_BSP V3.03.000 The Board Support Package for Mini55 Series MCU

Macros | Enumerations | Functions | Variables
semihosting.h File Reference

Go to the source code of this file.

## Macros
#define | AngelSWI_ARM 0x123456
#define | AngelSWI AngelSWI_ARM
#define | AngelSWIInsn "swi"
#define | AngelSWIAsm swi

## Enumerations
enum | OperationNumber { SEMIHOSTING_EnterSVC = 0x17 , SEMIHOSTING_ReportException = 0x18 , SEMIHOSTING_SYS_CLOSE = 0x02 , SEMIHOSTING_SYS_CLOCK = 0x10 , SEMIHOSTING_SYS_ELAPSED = 0x30 , SEMIHOSTING_SYS_ERRNO = 0x13 , SEMIHOSTING_SYS_FLEN = 0x0C , SEMIHOSTING_SYS_GET_CMDLINE = 0x15 , SEMIHOSTING_SYS_HEAPINFO = 0x16 , SEMIHOSTING_SYS_ISERROR = 0x08 , SEMIHOSTING_SYS_ISTTY = 0x09 , SEMIHOSTING_SYS_OPEN = 0x01 , SEMIHOSTING_SYS_READ = 0x06 , SEMIHOSTING_SYS_READC = 0x07 , SEMIHOSTING_SYS_REMOVE = 0x0E , SEMIHOSTING_SYS_RENAME = 0x0F , SEMIHOSTING_SYS_SEEK = 0x0A , SEMIHOSTING_SYS_SYSTEM = 0x12 , SEMIHOSTING_SYS_TICKFREQ = 0x31 , SEMIHOSTING_SYS_TIME = 0x11 , SEMIHOSTING_SYS_TMPNAM = 0x0D , SEMIHOSTING_SYS_WRITE = 0x05 , SEMIHOSTING_SYS_WRITEC = 0x03 , SEMIHOSTING_SYS_WRITE0 = 0x04 , ADP_Stopped_ApplicationExit = ((2 << 16) + 38) , ADP_Stopped_RunTimeError = ((2 << 16) + 35) }

## Functions
static int | __attribute__ ((always_inline)) call_host(int reason
asm | volatile (" mov r0, %[rsn] \n" " mov r1, %[arg] \n" " " AngelSWIInsn " %[swi] \n" " mov %[val], r0" :[val] "=r"(value) :[rsn] "r"(reason), [arg] "r"(arg), [swi] "i"(AngelSWI) :"r0", "r1", "r2", "r3", "ip", "lr", "memory", "cc")
static void | __attribute__ ((always_inline, noreturn)) report_exception(int reason)

## Variables
static int void * | arg
return | value

## Macro Definition Documentation

## ◆ AngelSWI

#define AngelSWI AngelSWI_ARM

Definition at line 49 of file semihosting.h.

## ◆ AngelSWI_ARM

#define AngelSWI_ARM 0x123456

Definition at line 45 of file semihosting.h.

## ◆ AngelSWIAsm

#define AngelSWIAsm swi

Definition at line 59 of file semihosting.h.

## ◆ AngelSWIInsn

#define AngelSWIInsn "swi"

Definition at line 58 of file semihosting.h.

## Enumeration Type Documentation

## ◆ OperationNumber

enum OperationNumber

Enumerator
SEMIHOSTING_EnterSVC |
SEMIHOSTING_ReportException |
SEMIHOSTING_SYS_CLOSE |
SEMIHOSTING_SYS_CLOCK |
SEMIHOSTING_SYS_ELAPSED |
SEMIHOSTING_SYS_ERRNO |
SEMIHOSTING_SYS_FLEN |
SEMIHOSTING_SYS_GET_CMDLINE |
SEMIHOSTING_SYS_HEAPINFO |
SEMIHOSTING_SYS_ISERROR |
SEMIHOSTING_SYS_ISTTY |
SEMIHOSTING_SYS_OPEN |
SEMIHOSTING_SYS_READ |
SEMIHOSTING_SYS_READC |
SEMIHOSTING_SYS_REMOVE |
SEMIHOSTING_SYS_RENAME |
SEMIHOSTING_SYS_SEEK |
SEMIHOSTING_SYS_SYSTEM |
SEMIHOSTING_SYS_TICKFREQ |
SEMIHOSTING_SYS_TIME |
SEMIHOSTING_SYS_TMPNAM |
SEMIHOSTING_SYS_WRITE |
SEMIHOSTING_SYS_WRITEC |
SEMIHOSTING_SYS_WRITE0 |
ADP_Stopped_ApplicationExit |
ADP_Stopped_RunTimeError |

Definition at line 8 of file semihosting.h.

## Function Documentation

## ◆ __attribute__() [1/2]

static int __attribute__ | ( | (always_inline) |  | ) |
| inline static

## ◆ __attribute__() [2/2]

static void __attribute__ | ( | (always_inline, noreturn) |  | ) |
| inline static

Definition at line 105 of file semihosting.h.

## ◆ volatile()

asm volatile | ( | " mov | r0,
|  | % \n" " mov | r1[rsn],
|  | % \n" " " AngelSWIInsn " % \n" " mov % | [arg][swi][val]
| ) |  |

## Variable Documentation

## ◆ arg

int void* arg

Initial value:
{
int value
value
return value
Definition: semihosting.h:98

Definition at line 73 of file semihosting.h.

## ◆ value

return value

Definition at line 98 of file semihosting.h.