1 #ifndef __CYGMON_MIPS_BOARD_H__
2 #define __CYGMON_MIPS_BOARD_H__
3 //==========================================================================
7 // Cygmon board/platform configuration file
9 //==========================================================================
10 //####ECOSGPLCOPYRIGHTBEGIN####
11 // -------------------------------------------
12 // This file is part of eCos, the Embedded Configurable Operating System.
13 // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
15 // eCos is free software; you can redistribute it and/or modify it under
16 // the terms of the GNU General Public License as published by the Free
17 // Software Foundation; either version 2 or (at your option) any later version.
19 // eCos is distributed in the hope that it will be useful, but WITHOUT ANY
20 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24 // You should have received a copy of the GNU General Public License along
25 // with eCos; if not, write to the Free Software Foundation, Inc.,
26 // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
28 // As a special exception, if other files instantiate templates or use macros
29 // or inline functions from this file, or you compile this file and link it
30 // with other works to produce a work based on this file, this file does not
31 // by itself cause the resulting work to be covered by the GNU General Public
32 // License. However the source code for this file must still be made available
33 // in accordance with section (3) of the GNU General Public License.
35 // This exception does not invalidate any other reasons why a work based on
36 // this file might be covered by the GNU General Public License.
38 // Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
39 // at http://sources.redhat.com/ecos/ecos-license/
40 // -------------------------------------------
41 //####ECOSGPLCOPYRIGHTEND####
42 //==========================================================================
43 //#####DESCRIPTIONBEGIN####
45 // Author(s): dmoseley
46 // Contributors: dmoseley
52 //####DESCRIPTIONEND####
54 //=========================================================================
55 // Hardware/platform/configuration specifics
57 // These defines are only necessary for using target_reg union in monitor.h
58 // It should be possible to remove that once the HAL integration is complete.
59 #define HAVE_FLOAT_REGS 0
60 #define HAVE_DOUBLE_REGS 0
64 #define USE_CYGMON_PROTOTYPES 1
66 #define CYGMON_SYSTEM_SERVICES 0 // Not used, fall back to BSP/HAL support
68 #ifdef CYGDAT_CYGMON_USE_HELP
72 #define USE_ECOS_HAL_EXCEPTIONS
73 #define USE_ECOS_HAL_BREAKPOINTS
74 #define USE_ECOS_HAL_SINGLESTEP
77 extern void bp_print (target_register_t bp_val);
78 extern int __set_breakpoint (target_register_t addr);
79 extern int __remove_breakpoint (target_register_t addr);
80 extern void __install_breakpoint_list (void);
81 extern void __clear_breakpoint_list (void);
82 extern int __display_breakpoint_list (void (*print_func)(target_register_t));
84 #define bsp_skip_instruction(regs) __skipinst()
85 #define install_breakpoints() __install_breakpoints()
86 #define add_mon_breakpoint(bpt) __set_breakpoint((bpt).addr)
87 #define clear_mon_breakpoint(bpt) __remove_breakpoint((bpt).addr)
88 #define show_breakpoints() __display_breakpoint_list(bp_print)
89 #define clear_breakpoints() __clear_breakpoint_list()
91 #define bsp_get_signal(exc_nr, regs) __computeSignal(exc_nr)
92 #define bsp_get_pc(regs) get_register(PC)
94 #define CYGARC_HAL_COMMON_EXPORT_CPU_MACROS
95 #include <cyg/hal/mips-regs.h>
99 #define bsp_set_pc(pc, regs) \
100 put_register(PC, pc); \
101 if (regs->_sr & SR_ERL) \
102 put_register(EPC, pc); \
104 put_register(EEPC, pc);
106 #define bsp_set_pc(pc, regs) \
107 put_register(PC, pc);
110 #endif // __CYGMON_MIPS_BOARD_H__