1130812Smarcel/* S-record download support for GDB, the GNU debugger.
2130812Smarcel   Copyright 1995, 1996, 2000 Free Software Foundation, Inc.
3130812Smarcel
4130812Smarcel   This file is part of GDB.
5130812Smarcel
6130812Smarcel   This program is free software; you can redistribute it and/or modify
7130812Smarcel   it under the terms of the GNU General Public License as published by
8130812Smarcel   the Free Software Foundation; either version 2 of the License, or
9130812Smarcel   (at your option) any later version.
10130812Smarcel
11130812Smarcel   This program is distributed in the hope that it will be useful,
12130812Smarcel   but WITHOUT ANY WARRANTY; without even the implied warranty of
13130812Smarcel   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14130812Smarcel   GNU General Public License for more details.
15130812Smarcel
16130812Smarcel   You should have received a copy of the GNU General Public License
17130812Smarcel   along with this program; if not, write to the Free Software
18130812Smarcel   Foundation, Inc., 59 Temple Place - Suite 330,
19130812Smarcel   Boston, MA 02111-1307, USA.  */
20130812Smarcel
21130812Smarcelstruct serial;
22130812Smarcel
23130812Smarcelvoid load_srec (struct serial *desc, const char *file, bfd_vma load_offset,
24130812Smarcel		int maxrecsize, int flags, int hashmark,
25130812Smarcel		int (*waitack) (void));
26130812Smarcel
27130812Smarcel/* S-record capability flags */
28130812Smarcel
29130812Smarcel/* Which record types are supported */
30130812Smarcel#define SREC_2_BYTE_ADDR 0x00000001
31130812Smarcel#define SREC_3_BYTE_ADDR 0x00000002
32130812Smarcel#define SREC_4_BYTE_ADDR 0x00000004
33130812Smarcel#define SREC_TERM_SHIFT 3
34130812Smarcel
35130812Smarcel#define SREC_ALL (SREC_2_BYTE_ADDR | SREC_3_BYTE_ADDR | SREC_4_BYTE_ADDR \
36130812Smarcel		  | ((SREC_2_BYTE_ADDR | SREC_3_BYTE_ADDR | SREC_4_BYTE_ADDR) \
37130812Smarcel		     << SREC_TERM_SHIFT))
38130812Smarcel
39130812Smarcel#define SREC_BINARY	0x00000040	/* Supports binary form of S-records */
40