OpenOCD
esp_semihosting.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 /***************************************************************************
4  * Semihosting API for Espressif chips *
5  * Copyright (C) 2022 Espressif Systems Ltd. *
6  ***************************************************************************/
7 
8 #ifndef OPENOCD_TARGET_ESP_SEMIHOSTING_H
9 #define OPENOCD_TARGET_ESP_SEMIHOSTING_H
10 
11 /* Legacy syscalls */
12 #define ESP_SYS_DRV_INFO_LEGACY 0xE0
13 
14 /* syscalls compatible to ARM standard */
15 #define ESP_SEMIHOSTING_SYS_DRV_INFO 0x100
16 #define ESP_SEMIHOSTING_SYS_APPTRACE_INIT 0x101
17 #define ESP_SEMIHOSTING_SYS_DEBUG_STUBS_INIT 0x102
18 #define ESP_SEMIHOSTING_SYS_BREAKPOINT_SET 0x103
19 #define ESP_SEMIHOSTING_SYS_WATCHPOINT_SET 0x104
20 #define ESP_SEMIHOSTING_SYS_SEEK 0x105 /* custom lseek with whence */
21 /* not implemented yet */
22 #define ESP_SEMIHOSTING_SYS_MKDIR 0x106
23 #define ESP_SEMIHOSTING_SYS_OPENDIR 0x107
24 #define ESP_SEMIHOSTING_SYS_READDIR 0x108
25 #define ESP_SEMIHOSTING_SYS_READDIR_R 0x109
26 #define ESP_SEMIHOSTING_SYS_SEEKDIR 0x10A
27 #define ESP_SEMIHOSTING_SYS_TELLDIR 0x10B
28 #define ESP_SEMIHOSTING_SYS_CLOSEDIR 0x10C
29 #define ESP_SEMIHOSTING_SYS_RMDIR 0x10D
30 #define ESP_SEMIHOSTING_SYS_ACCESS 0x10E
31 #define ESP_SEMIHOSTING_SYS_TRUNCATE 0x10F
32 #define ESP_SEMIHOSTING_SYS_UTIME 0x110
33 #define ESP_SEMIHOSTING_SYS_FSTAT 0x111
34 #define ESP_SEMIHOSTING_SYS_STAT 0x112
35 #define ESP_SEMIHOSTING_SYS_FSYNC 0x113
36 #define ESP_SEMIHOSTING_SYS_LINK 0x114
37 #define ESP_SEMIHOSTING_SYS_UNLINK 0x115
38 
44  int (*prepare)(struct target *target);
45 };
46 
50 };
51 
54 
55 #endif /* OPENOCD_TARGET_ESP_SEMIHOSTING_H */
int esp_semihosting_basedir_command(struct command_invocation *cmd)
int esp_semihosting_common(struct target *target)
struct target * target
Definition: rtt/rtt.c:26
When run_command is called, a new instance will be created on the stack, filled with the proper value...
Definition: command.h:76
struct esp_semihost_ops * ops
Semihost calls handling operations.
int(* prepare)(struct target *target)
Callback called before handling semihost call.
Definition: target.h:120
uint8_t cmd
Definition: vdebug.c:1