OpenOCD
xtensa_fileio.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 /***************************************************************************
4  * Xtensa Target File-I/O Support for OpenOCD *
5  * Copyright (C) 2020-2023 Cadence Design Systems, Inc. *
6  ***************************************************************************/
7 
8 #ifndef OPENOCD_TARGET_XTENSA_FILEIO_H
9 #define OPENOCD_TARGET_XTENSA_FILEIO_H
10 
11 #include <target/target.h>
12 #include <helper/command.h>
13 #include "xtensa.h"
14 
15 #define XTENSA_SYSCALL_OP_REG XT_REG_IDX_A2
16 #define XTENSA_SYSCALL_RETVAL_REG XT_REG_IDX_A2
17 #define XTENSA_SYSCALL_ERRNO_REG XT_REG_IDX_A3
18 
19 #define XTENSA_SYSCALL_OPEN (-2)
20 #define XTENSA_SYSCALL_CLOSE (-3)
21 #define XTENSA_SYSCALL_READ (-4)
22 #define XTENSA_SYSCALL_WRITE (-5)
23 #define XTENSA_SYSCALL_LSEEK (-6)
24 #define XTENSA_SYSCALL_RENAME (-7)
25 #define XTENSA_SYSCALL_UNLINK (-8)
26 #define XTENSA_SYSCALL_STAT (-9)
27 #define XTENSA_SYSCALL_FSTAT (-10)
28 #define XTENSA_SYSCALL_GETTIMEOFDAY (-11)
29 #define XTENSA_SYSCALL_ISATTY (-12)
30 #define XTENSA_SYSCALL_SYSTEM (-13)
31 
32 int xtensa_fileio_init(struct target *target);
34 int xtensa_get_gdb_fileio_info(struct target *target, struct gdb_fileio_info *fileio_info);
35 int xtensa_gdb_fileio_end(struct target *target, int retcode, int fileio_errno, bool ctrl_c);
36 
37 #endif /* OPENOCD_TARGET_XTENSA_FILEIO_H */
Definition: target.h:116
Holds the interface to Xtensa cores.
int xtensa_fileio_detect_proc(struct target *target)
Checks for and processes an Xtensa File-IO request.
Definition: xtensa_fileio.c:41
int xtensa_gdb_fileio_end(struct target *target, int retcode, int fileio_errno, bool ctrl_c)
int xtensa_get_gdb_fileio_info(struct target *target, struct gdb_fileio_info *fileio_info)
Definition: xtensa_fileio.c:69
int xtensa_fileio_init(struct target *target)
Definition: xtensa_fileio.c:21