36#ifndef _BSPS_ARM_FVP_SEMIHOSTING_H
37#define _BSPS_ARM_FVP_SEMIHOSTING_H
53#define SYS_ELAPSED 0x30
56#define SYS_EXIT_EXTENDED 0x20
58#define SYS_GET_CMDLINE 0x15
59#define SYS_HEAPINFO 0x16
60#define SYS_ISERROR 0x08
65#define SYS_REMOVE 0x0e
66#define SYS_RENAME 0x0f
68#define SYS_SYSTEM 0x12
69#define SYS_TICKFREQ 0x31
71#define SYS_TMPNAM 0x0d
73#define SYS_WRITEC 0x03
74#define SYS_WRITE0 0x04
76#define ADP_Stopped_BranchThroughZero 0x20000
77#define ADP_Stopped_UndefinedInstr 0x20001
78#define ADP_Stopped_SoftwareInterrupt 0x20002
79#define ADP_Stopped_PrefetchAbort 0x20003
80#define ADP_Stopped_DataAbort 0x20004
81#define ADP_Stopped_AddressException 0x20005
82#define ADP_Stopped_IRQ 0x20006
83#define ADP_Stopped_FIQ 0x20007
84#define ADP_Stopped_BreakPoint 0x20020
85#define ADP_Stopped_WatchPoint 0x20021
86#define ADP_Stopped_StepComplete 0x20022
87#define ADP_Stopped_RunTimeErrorUnknown 0x20023
88#define ADP_Stopped_InternalError 0x20024
89#define ADP_Stopped_UserInterruption 0x20025
90#define ADP_Stopped_ApplicationExit 0x20026
91#define ADP_Stopped_StackOverflow 0x20027
92#define ADP_Stopped_DivisionByZero 0x20028
93#define ADP_Stopped_OSSpecific 0x20029
95static inline uintptr_t arm_fvp_semihosting_call(
100 register uintptr_t op_and_return_reg __asm__(
"r0");
101 register uintptr_t params_reg __asm__(
"r1");
103 op_and_return_reg = op;
112 :
"=r" (op_and_return_reg)
113 :
"0" (op_and_return_reg),
"r" (params_reg)
117 return op_and_return_reg;
120void arm_fvp_console_output(
char c );
122int arm_fvp_console_input(
void );