OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [hal/] [arm/] [aeb/] [v2_0/] [src/] [gdb_module.c] - Blame information for rev 27

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 unneback
//==========================================================================
2
//
3
//        gdb_module.c
4
//
5
//        ARM AEB-1 eval board GDB stubs (module wrapper)
6
//
7
//==========================================================================
8
//####ECOSGPLCOPYRIGHTBEGIN####
9
// -------------------------------------------
10
// This file is part of eCos, the Embedded Configurable Operating System.
11
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
12
//
13
// eCos is free software; you can redistribute it and/or modify it under
14
// the terms of the GNU General Public License as published by the Free
15
// Software Foundation; either version 2 or (at your option) any later version.
16
//
17
// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
18
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
19
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
20
// for more details.
21
//
22
// You should have received a copy of the GNU General Public License along
23
// with eCos; if not, write to the Free Software Foundation, Inc.,
24
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
25
//
26
// As a special exception, if other files instantiate templates or use macros
27
// or inline functions from this file, or you compile this file and link it
28
// with other works to produce a work based on this file, this file does not
29
// by itself cause the resulting work to be covered by the GNU General Public
30
// License. However the source code for this file must still be made available
31
// in accordance with section (3) of the GNU General Public License.
32
//
33
// This exception does not invalidate any other reasons why a work based on
34
// this file might be covered by the GNU General Public License.
35
//
36
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
37
// at http://sources.redhat.com/ecos/ecos-license/
38
// -------------------------------------------
39
//####ECOSGPLCOPYRIGHTEND####
40
//==========================================================================
41
//#####DESCRIPTIONBEGIN####
42
//
43
// Author(s):     gthomas
44
// Contributors:  gthomas
45
// Date:          1998-12-18
46
// Description:   AEB-1 FLASH module for eCos GDB stubs
47
//####DESCRIPTIONEND####
48
 
49
//
50
// This is the module 'wrapper' for the GDB stubs
51
//
52
 
53
#include <pkgconf/hal.h>
54
#include <cyg/infra/cyg_type.h>
55
#include <cyg/hal/hal_stub.h>
56
 
57
// ARM AEB-1 module stuff
58
 
59
#ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
60
 
61
#ifndef CHECKSUM
62
#define CHECKSUM 0x0
63
#endif
64
 
65
extern char __exception_handlers, __rom_data_end;
66
 
67
const char __title[] = "eCos";
68
const char __help[] = "eCos            1.3   (" __DATE__ ") GDB stubs";
69
 
70
struct ModuleHeader {
71
    cyg_uint32    magic;
72
    cyg_uint16    flags;
73
    cyg_uint8     major;
74
    cyg_uint8     minor;
75
    cyg_uint32    checksum;
76
    cyg_uint32    ro_base;
77
    cyg_uint32    ro_limit;
78
    cyg_uint32    rw_base;
79
    cyg_uint32    zi_base;
80
    cyg_uint32    zi_limit;
81
    cyg_uint32    self;
82
    cyg_uint32    start;
83
    cyg_uint32    init;
84
    cyg_uint32    final;
85
    cyg_uint32    service;
86
    cyg_uint32    title;
87
    cyg_uint32    help;
88
    cyg_uint32    cmdtbl;
89
    cyg_uint32    swi_base;
90
    cyg_uint32    swi_handler;
91
};
92
 
93
const static struct ModuleHeader __hdr = {
94
    0x4D484944,                     // MHID
95
    2,                              // flags = auto start
96
    1,                              // major
97
    0,                              // minor
98
    CHECKSUM,                       // checksum
99
    (cyg_uint32) &__exception_handlers,         // start of module (read-only) image
100
    (cyg_uint32) &__rom_data_end,    // end of image
101
    0,                              // r/w base - unused
102
    0,                              // bss base - unused
103
    0,                              // bss limit - unused
104
    (cyg_uint32) &__hdr,            // self (for module identification)
105
    (cyg_uint32) &__exception_handlers,         // startup 
106
    0,                              // init - unused
107
    0,                              // final - unused
108
    0,                              // service - unused
109
    (cyg_uint32) &__title,          // title
110
    (cyg_uint32) &__help,           // help string
111
    0,                              // command table - unused
112
    0,                              // SWI table - unused
113
 
114
};
115
 
116
static void
117
__dummy(void *p)
118
{
119
}
120
 
121
void cyg_start (void)
122
{
123
    __dummy((void *)&__hdr);  // Just to keep it in!
124
    for(;;) breakpoint();
125
}
126
#else
127
 
128
#include <cyg/infra/testcase.h>
129
 
130
void cyg_start (void)
131
{
132
    CYG_TEST_INIT();
133
    CYG_TEST_PASS_FINISH("N/A: Stand-alone GDB stubs only");
134
}
135
#endif
136
 
137
 
138
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.