* Makefile.in ($(INSTALL_X11_MODULES)): Depend upon installdirs.
[deliverable/binutils-gdb.git] / gdb / ocd.h
CommitLineData
35ce4f08
GN
1/* Definitions for the Macraigor Systems BDM Wiggler
2 Copyright 1996, 1997 Free Software Foundation, Inc.
3
4This file is part of GDB.
5
6This program is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2 of the License, or
9(at your option) any later version.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with this program; if not, write to the Free Software
18Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
19
20#ifndef WIGGLER_H
21#define WIGGLER_H
22
23/* Wiggler serial protocol definitions */
24
25#define DLE 020 /* Quote char */
26#define SYN 026 /* Start of packet */
27#define RAW_SYN ((026 << 8) | 026) /* get_quoted_char found a naked SYN */
28
29/* Status flags */
30
31#define WIGGLER_FLAG_RESET 0x01 /* Target is being reset */
32#define WIGGLER_FLAG_STOPPED 0x02 /* Target is halted */
33#define WIGGLER_FLAG_BDM 0x04 /* Target is in BDM */
34#define WIGGLER_FLAG_PWF 0x08 /* Power failed */
35#define WIGGLER_FLAG_CABLE_DISC 0x10 /* BDM cable disconnected */
36
37/* Commands */
38
39#define WIGGLER_AYT 0x0 /* Are you there? */
40#define WIGGLER_GET_VERSION 0x1 /* Get Version */
41#define WIGGLER_SET_BAUD_RATE 0x2 /* Set Baud Rate */
42#define WIGGLER_INIT 0x10 /* Initialize Wiggler */
43#define WIGGLER_SET_SPEED 0x11 /* Set Speed */
44#define WIGGLER_GET_STATUS_MASK 0x12 /* Get Status Mask */
45#define WIGGLER_GET_CTRS 0x13 /* Get Error Counters */
46#define WIGGLER_SET_FUNC_CODE 0x14 /* Set Function Code */
47#define WIGGLER_SET_CTL_FLAGS 0x15 /* Set Control Flags */
48#define WIGGLER_SET_BUF_ADDR 0x16 /* Set Register Buffer Address */
49#define WIGGLER_RUN 0x20 /* Run Target from PC */
50#define WIGGLER_RUN_ADDR 0x21 /* Run Target from Specified Address */
51#define WIGGLER_STOP 0x22 /* Stop Target */
52#define WIGGLER_RESET_RUN 0x23 /* Reset Target and Run */
53#define WIGGLER_RESET 0x24 /* Reset Target and Halt */
54#define WIGGLER_STEP 0x25 /* Single step */
55#define WIGGLER_READ_REGS 0x30 /* Read Registers */
56#define WIGGLER_WRITE_REGS 0x31 /* Write Registers */
57#define WIGGLER_READ_MEM 0x32 /* Read Memory */
58#define WIGGLER_WRITE_MEM 0x33 /* Write Memory */
59#define WIGGLER_FILL_MEM 0x34 /* Fill Memory */
60#define WIGGLER_MOVE_MEM 0x35 /* Move Memory */
61
62#define WIGGLER_READ_INT_MEM 0x80 /* Read Internal Memory */
63#define WIGGLER_WRITE_INT_MEM 0x81 /* Write Internal Memory */
64#define WIGGLER_JUMP 0x82 /* Jump to Subroutine */
65
66#define WIGGLER_ERASE_FLASH 0x90 /* Erase flash memory */
67#define WIGGLER_PROGRAM_FLASH 0x91 /* Write flash memory */
68#define WIGGLER_EXIT_MON 0x93 /* Exit the flash programming monitor */
69#define WIGGLER_ENTER_MON 0x94 /* Enter the flash programming monitor */
70
71#define WIGGLER_SET_STATUS 0x0a /* Set status */
72#define WIGGLER_FLAG_STOP 0x0 /* Stop the target, enter BDM */
73#define WIGGLER_FLAG_START 0x01 /* Start the target at PC */
74#define WIGGLER_FLAG_RETURN_STATUS 0x04 /* Return async status */
75
76/* Target type (for WIGGLER_INIT command) */
77
78enum wiggler_target_type {
79 WIGGLER_TARGET_CPU32=0x0, /* Moto cpu32 family */
80 WIGGLER_TARGET_CPU16=0x1,
81 WIGGLER_TARGET_MOTO_PPC=0x2, /* Motorola PPC 5xx/8xx */
82 WIGGLER_TARGET_IBM_PPC=0x3}; /* IBM PPC 4xx */
83
84void wiggler_open PARAMS ((char *name, int from_tty, enum wiggler_target_type,
85 struct target_ops *ops));
86
87void wiggler_close PARAMS ((int quitting));
88
89void wiggler_detach PARAMS ((char *args, int from_tty));
90
91void wiggler_resume PARAMS ((int pid, int step, enum target_signal siggnal));
92
93void wiggler_prepare_to_store PARAMS ((void));
94
95void wiggler_stop PARAMS ((void));
96
97void wiggler_files_info PARAMS ((struct target_ops *ignore));
98
99
100int wiggler_xfer_memory PARAMS ((CORE_ADDR memaddr, char *myaddr,
101 int len, int should_write,
102 struct target_ops *target));
103
104void wiggler_mourn PARAMS ((void));
105
106void wiggler_create_inferior PARAMS ((char *exec_file,
107 char *args,
108 char **env));
109
110int wiggler_thread_alive PARAMS ((int th));
111
112void wiggler_error PARAMS ((char *s, int error_code));
113
114void wiggler_kill PARAMS ((void));
115
116void wiggler_load PARAMS((char *args, int from_tty));
117
118unsigned char * wiggler_read_bdm_registers PARAMS ((int first_bdm_regno,
119 int last_bdm_regno,
120 int *reglen));
121
122CORE_ADDR wiggler_read_bdm_register PARAMS ((int bdm_regno));
123
124void wiggler_write_bdm_registers PARAMS ((int first_bdm_regno,
125 unsigned char *regptr,
126 int reglen));
127
128void wiggler_write_bdm_register PARAMS ((int bdm_regno, CORE_ADDR reg));
129
130int wiggler_wait PARAMS ((void));
131
132#endif /* WIGGLER_H */
This page took 0.027424 seconds and 4 git commands to generate.