* libgloss/m68k/Makefile.in (BDM_BSP, BDM_OBJS, BDM_ISRS): New.
(CF_SCRIPTS): Rename dbug scripts. Add bdm scripts. Add m5485
scripts.
(all): Add new targets.
(BDM_BSP): New target.
(bdm-isv.o, bdm-exit.o, bdm-outbyte.o, bdm-semihost.o): New
targets.
(BDM_ISRS): New targets.
(m5208evb.ld, m5213evb.ld, m5235evb.ld, m5272c3.ld, m5282evb.ld):
Rename and adjust.
(m5485evb-dbug): New.
(m5208evb-bdm.ld, m5213evb-bdm.ld, m5235evb-bdm.ld,
m5272c3-bdm.ld, m5282evb-bdm.ld, m5485evb-bdm.ld): New.
(install): Add BDM_BSP.
* libgloss/m68k/bdm-exit.c: New
* libgloss/m68k/bdm-inbyte.c: New
* libgloss/m68k/bdm-outbyte.c: New
* libgloss/m68k/bdm-semihost.c: New
* libgloss/m68k/bdm-semihost.h: New
* libgloss/m68k/bdm-isrs.c: New.
* libgloss/m68k/bdm-isv.c: New.
* cf-dbug.sc: Renamed to ...
* cf.sc: ... here. Add bdm flexibility. Remove GROUP
2006-03-29 07:03:19 +00:00
|
|
|
/*
|
|
|
|
* bdm semihosting support.
|
|
|
|
*
|
2006-03-29 07:29:11 +00:00
|
|
|
* Copyright (c) 2006 CodeSourcery Inc
|
* libgloss/m68k/Makefile.in (BDM_BSP, BDM_OBJS, BDM_ISRS): New.
(CF_SCRIPTS): Rename dbug scripts. Add bdm scripts. Add m5485
scripts.
(all): Add new targets.
(BDM_BSP): New target.
(bdm-isv.o, bdm-exit.o, bdm-outbyte.o, bdm-semihost.o): New
targets.
(BDM_ISRS): New targets.
(m5208evb.ld, m5213evb.ld, m5235evb.ld, m5272c3.ld, m5282evb.ld):
Rename and adjust.
(m5485evb-dbug): New.
(m5208evb-bdm.ld, m5213evb-bdm.ld, m5235evb-bdm.ld,
m5272c3-bdm.ld, m5282evb-bdm.ld, m5485evb-bdm.ld): New.
(install): Add BDM_BSP.
* libgloss/m68k/bdm-exit.c: New
* libgloss/m68k/bdm-inbyte.c: New
* libgloss/m68k/bdm-outbyte.c: New
* libgloss/m68k/bdm-semihost.c: New
* libgloss/m68k/bdm-semihost.h: New
* libgloss/m68k/bdm-isrs.c: New.
* libgloss/m68k/bdm-isv.c: New.
* cf-dbug.sc: Renamed to ...
* cf.sc: ... here. Add bdm flexibility. Remove GROUP
2006-03-29 07:03:19 +00:00
|
|
|
*
|
|
|
|
* The authors hereby grant permission to use, copy, modify, distribute,
|
|
|
|
* and license this software and its documentation for any purpose, provided
|
|
|
|
* that existing copyright notices are retained in all copies and that this
|
|
|
|
* notice is included verbatim in any distributions. No written agreement,
|
|
|
|
* license, or royalty fee is required for any of the authorized uses.
|
|
|
|
* Modifications to this software may be copyrighted by their authors
|
|
|
|
* and need not follow the licensing terms described here, provided that
|
|
|
|
* the new terms are clearly indicated on the first page of each file where
|
|
|
|
* they apply.
|
|
|
|
*/
|
|
|
|
|
2006-05-22 22:26:10 +00:00
|
|
|
/* Codes for BDM_FUNC_REG. */
|
|
|
|
|
* libgloss/m68k/Makefile.in (BDM_BSP, BDM_OBJS, BDM_ISRS): New.
(CF_SCRIPTS): Rename dbug scripts. Add bdm scripts. Add m5485
scripts.
(all): Add new targets.
(BDM_BSP): New target.
(bdm-isv.o, bdm-exit.o, bdm-outbyte.o, bdm-semihost.o): New
targets.
(BDM_ISRS): New targets.
(m5208evb.ld, m5213evb.ld, m5235evb.ld, m5272c3.ld, m5282evb.ld):
Rename and adjust.
(m5485evb-dbug): New.
(m5208evb-bdm.ld, m5213evb-bdm.ld, m5235evb-bdm.ld,
m5272c3-bdm.ld, m5282evb-bdm.ld, m5485evb-bdm.ld): New.
(install): Add BDM_BSP.
* libgloss/m68k/bdm-exit.c: New
* libgloss/m68k/bdm-inbyte.c: New
* libgloss/m68k/bdm-outbyte.c: New
* libgloss/m68k/bdm-semihost.c: New
* libgloss/m68k/bdm-semihost.h: New
* libgloss/m68k/bdm-isrs.c: New.
* libgloss/m68k/bdm-isv.c: New.
* cf-dbug.sc: Renamed to ...
* cf.sc: ... here. Add bdm flexibility. Remove GROUP
2006-03-29 07:03:19 +00:00
|
|
|
#define BDM_EXIT 0
|
2006-05-24 07:54:51 +00:00
|
|
|
#define BDM_PUTCHAR 1 /* Obsolete */
|
2006-05-22 22:26:10 +00:00
|
|
|
#define BDM_OPEN 2
|
|
|
|
#define BDM_CLOSE 3
|
|
|
|
#define BDM_READ 4
|
|
|
|
#define BDM_WRITE 5
|
|
|
|
#define BDM_LSEEK 6
|
|
|
|
#define BDM_RENAME 7
|
|
|
|
#define BDM_UNLINK 8
|
|
|
|
#define BDM_STAT 9
|
|
|
|
#define BDM_FSTAT 10
|
|
|
|
#define BDM_GETTIMEOFDAY 11
|
|
|
|
#define BDM_ISATTY 12
|
|
|
|
#define BDM_SYSTEM 13
|
|
|
|
|
libgloss/
* m68k/Makefile.in (bdm-semihost.o): Build from bdm-semihost.S.
* m68k/bdm-semihost.c: Remove.
* m68k/bdm-semihost.S: New.
* m68k/bdm-crt0.S: Don't install semihosting trap handler.
* m68k/bdm-close.c, bdm-exit.c, bdm-fstat.c, bdm-gettimeofday.c,
bdm-isatty.c, bdm-lseek.c, bdm-open.c, bdm-read.c, bdm-rename.c,
bdm-stat.c, bdm-system.c, bdm-unlink.c, bdm-write.c): Update.
* m68k/bdm-isrs.c: Update comment.
* m68k/bdm-semihost.h (BDM_TRAPNUM, BDM_FUNC_REG, BDM_ARG_REG,
BDM_TRAP): Remove.
(__bdm_semihost): Declare.
2006-09-18 07:41:02 +00:00
|
|
|
extern int __bdm_semihost (int func, void *args);
|