Loading...
Searching...
No Matches
Go to the documentation of this file.
10#ifndef SEMIHOST_PRIVATE_H_
11#define SEMIHOST_PRIVATE_H_
45 UINTN NewFileNameLength;
55 #if defined (__thumb__)
61#define SEMIHOST_SUPPORTED TRUE
128_Semihost_SYS_TMPNAME (
135_Semihost_SYS_REMOVE (
142_Semihost_SYS_RENAME (
149_Semihost_SYS_SYSTEM (
154#define SEMIHOST_SYS_OPEN(OpenBlock) _Semihost_SYS_OPEN(0x01, OpenBlock)
155#define SEMIHOST_SYS_CLOSE(Handle) _Semihost_SYS_CLOSE(0x02, Handle)
156#define SEMIHOST_SYS_WRITE0(String) _Semihost_SYS_WRITE0(0x04, String)
157#define SEMIHOST_SYS_WRITEC(Character) _Semihost_SYS_WRITEC(0x03, Character)
158#define SEMIHOST_SYS_WRITE(WriteBlock) _Semihost_SYS_WRITE(0x05, WriteBlock)
159#define SEMIHOST_SYS_READ(ReadBlock) _Semihost_SYS_READ(0x06, ReadBlock)
160#define SEMIHOST_SYS_READC() _Semihost_SYS_READC(0x07, 0)
161#define SEMIHOST_SYS_SEEK(SeekBlock) _Semihost_SYS_SEEK(0x0A, SeekBlock)
162#define SEMIHOST_SYS_FLEN(Handle) _Semihost_SYS_FLEN(0x0C, Handle)
163#define SEMIHOST_SYS_TMPNAME(TmpNameBlock) _Semihost_SYS_TMPNAME(0x0D, TmpNameBlock)
164#define SEMIHOST_SYS_REMOVE(RemoveBlock) _Semihost_SYS_REMOVE(0x0E, RemoveBlock)
165#define SEMIHOST_SYS_RENAME(RenameBlock) _Semihost_SYS_RENAME(0x0F, RenameBlock)
166#define SEMIHOST_SYS_SYSTEM(SystemBlock) _Semihost_SYS_SYSTEM(0x12, SystemBlock)
168#elif defined (__GNUC__)
170#define SEMIHOST_SUPPORTED TRUE
178#define SEMIHOST_SYS_OPEN(OpenBlock) GccSemihostCall(0x01, (UINTN)(OpenBlock))
179#define SEMIHOST_SYS_CLOSE(Handle) GccSemihostCall(0x02, (UINTN)(Handle))
180#define SEMIHOST_SYS_WRITE0(String) GccSemihostCall(0x04, (UINTN)(String))
181#define SEMIHOST_SYS_WRITEC(Character) GccSemihostCall(0x03, (UINTN)(Character))
182#define SEMIHOST_SYS_WRITE(WriteBlock) GccSemihostCall(0x05, (UINTN)(WriteBlock))
183#define SEMIHOST_SYS_READ(ReadBlock) GccSemihostCall(0x06, (UINTN)(ReadBlock))
184#define SEMIHOST_SYS_READC() GccSemihostCall(0x07, (UINTN)(0))
185#define SEMIHOST_SYS_SEEK(SeekBlock) GccSemihostCall(0x0A, (UINTN)(SeekBlock))
186#define SEMIHOST_SYS_FLEN(Handle) GccSemihostCall(0x0C, (UINTN)(Handle))
187#define SEMIHOST_SYS_TMPNAME(TmpNameBlock) GccSemihostCall(0x0D, (UINTN)(TmpNameBlock))
188#define SEMIHOST_SYS_REMOVE(RemoveBlock) GccSemihostCall(0x0E, (UINTN)(RemoveBlock))
189#define SEMIHOST_SYS_RENAME(RenameBlock) GccSemihostCall(0x0F, (UINTN)(RenameBlock))
190#define SEMIHOST_SYS_SYSTEM(SystemBlock) GccSemihostCall(0x12, (UINTN)(SystemBlock))
194#define SEMIHOST_SUPPORTED FALSE
196#define SEMIHOST_SYS_OPEN(OpenBlock) (-1)
197#define SEMIHOST_SYS_CLOSE(Handle) (-1)
198#define SEMIHOST_SYS_WRITE0(String)
199#define SEMIHOST_SYS_WRITEC(Character)
200#define SEMIHOST_SYS_WRITE(WriteBlock) (0)
201#define SEMIHOST_SYS_READ(ReadBlock) ((ReadBlock)->Length)
202#define SEMIHOST_SYS_READC() ('x')
203#define SEMIHOST_SYS_SEEK(SeekBlock) (-1)
204#define SEMIHOST_SYS_FLEN(Handle) (-1)
205#define SEMIHOST_SYS_TMPNAME(TmpNameBlock) (-1)
206#define SEMIHOST_SYS_REMOVE(RemoveBlock) (-1)
207#define SEMIHOST_SYS_RENAME(RenameBlock) (-1)
208#define SEMIHOST_SYS_SYSTEM(SystemBlock) (-1)