Mercurial > flash_v2
annotate packages/hal/arm/aeb/current/misc/gdb_module.c @ 10:d3fbcdfa1b2f ecos-sw-1999-05-29
Merge from eCos master repository on 1999-05-29-00:13:11-BST
| author | jlarmour |
|---|---|
| date | Fri, 28 May 1999 16:43:09 +0000 |
| parents | 443894e2e912 |
| children | c38311975d4f |
| rev | line source |
|---|---|
| 2 | 1 //========================================================================== |
| 2 // | |
| 3 // gdb_module.c | |
| 4 // | |
| 5 // ARM AEB-1 eval board GDB stubs (module wrapper) | |
| 6 // | |
| 7 //========================================================================== | |
| 8 //####COPYRIGHTBEGIN#### | |
| 9 // | |
| 10 // ------------------------------------------- | |
| 11 // The contents of this file are subject to the Cygnus eCos Public License | |
| 12 // Version 1.0 (the "License"); you may not use this file except in | |
| 13 // compliance with the License. You may obtain a copy of the License at | |
| 14 // http://sourceware.cygnus.com/ecos | |
| 15 // | |
| 16 // Software distributed under the License is distributed on an "AS IS" | |
| 17 // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | |
| 18 // License for the specific language governing rights and limitations under | |
| 19 // the License. | |
| 20 // | |
| 21 // The Original Code is eCos - Embedded Cygnus Operating System, released | |
| 22 // September 30, 1998. | |
| 23 // | |
| 24 // The Initial Developer of the Original Code is Cygnus. Portions created | |
| 25 // by Cygnus are Copyright (C) 1998,1999 Cygnus Solutions. All Rights Reserved. | |
| 26 // ------------------------------------------- | |
| 27 // | |
| 28 //####COPYRIGHTEND#### | |
| 29 //========================================================================== | |
| 30 //#####DESCRIPTIONBEGIN#### | |
| 31 // | |
| 32 // Author(s): gthomas | |
| 33 // Contributors: gthomas | |
| 34 // Date: 1998-12-18 | |
| 35 // Description: AEB-1 FLASH module for eCos GDB stubs | |
| 36 //####DESCRIPTIONEND#### | |
| 37 | |
| 38 // | |
| 39 // This is the module 'wrapper' for the GDB stubs | |
| 40 // | |
| 41 | |
| 42 #include <pkgconf/hal.h> | |
| 43 #include <cyg/infra/cyg_type.h> | |
| 44 #include <cyg/hal/hal_stub.h> | |
| 45 | |
| 46 // ARM AEB-1 module stuff | |
| 47 | |
| 48 #ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS | |
| 49 | |
| 50 #ifndef CHECKSUM | |
| 51 #define CHECKSUM 0x0 | |
| 52 #endif | |
| 53 | |
|
10
d3fbcdfa1b2f
Merge from eCos master repository on 1999-05-29-00:13:11-BST
jlarmour
parents:
2
diff
changeset
|
54 extern char __exception_handlers, __rom_data_end; |
| 2 | 55 |
| 56 const char __title[] = "eCos"; | |
|
10
d3fbcdfa1b2f
Merge from eCos master repository on 1999-05-29-00:13:11-BST
jlarmour
parents:
2
diff
changeset
|
57 const char __help[] = "eCos 1.2.2 (25 May 1999) GDB stubs"; |
| 2 | 58 |
| 59 struct ModuleHeader { | |
| 60 cyg_uint32 magic; | |
| 61 cyg_uint16 flags; | |
| 62 cyg_uint8 major; | |
| 63 cyg_uint8 minor; | |
| 64 cyg_uint32 checksum; | |
| 65 cyg_uint32 ro_base; | |
| 66 cyg_uint32 ro_limit; | |
| 67 cyg_uint32 rw_base; | |
| 68 cyg_uint32 zi_base; | |
| 69 cyg_uint32 zi_limit; | |
| 70 cyg_uint32 self; | |
| 71 cyg_uint32 start; | |
| 72 cyg_uint32 init; | |
| 73 cyg_uint32 final; | |
| 74 cyg_uint32 service; | |
| 75 cyg_uint32 title; | |
| 76 cyg_uint32 help; | |
| 77 cyg_uint32 cmdtbl; | |
| 78 cyg_uint32 swi_base; | |
| 79 cyg_uint32 swi_handler; | |
| 80 }; | |
| 81 | |
| 82 const static struct ModuleHeader __hdr = { | |
| 83 0x4D484944, // MHID | |
| 84 2, // flags = auto start | |
| 85 1, // major | |
| 86 0, // minor | |
| 87 CHECKSUM, // checksum | |
|
10
d3fbcdfa1b2f
Merge from eCos master repository on 1999-05-29-00:13:11-BST
jlarmour
parents:
2
diff
changeset
|
88 (cyg_uint32) &__exception_handlers, // start of module (read-only) image |
|
d3fbcdfa1b2f
Merge from eCos master repository on 1999-05-29-00:13:11-BST
jlarmour
parents:
2
diff
changeset
|
89 (cyg_uint32) &__rom_data_end, // end of image |
| 2 | 90 0, // r/w base - unused |
| 91 0, // bss base - unused | |
| 92 0, // bss limit - unused | |
| 93 (cyg_uint32) &__hdr, // self (for module identification) | |
|
10
d3fbcdfa1b2f
Merge from eCos master repository on 1999-05-29-00:13:11-BST
jlarmour
parents:
2
diff
changeset
|
94 (cyg_uint32) &__exception_handlers, // startup |
| 2 | 95 0, // init - unused |
| 96 0, // final - unused | |
| 97 0, // service - unused | |
| 98 (cyg_uint32) &__title, // title | |
| 99 (cyg_uint32) &__help, // help string | |
| 100 0, // command table - unused | |
| 101 0, // SWI table - unused | |
| 102 0 // SWI handler - unused | |
| 103 }; | |
| 104 | |
| 105 static void | |
| 106 __dummy(void *p) | |
| 107 { | |
| 108 } | |
| 109 | |
| 110 void cyg_start (void) | |
| 111 { | |
| 112 __dummy((void *)&__hdr); // Just to keep it in! | |
| 113 for(;;) breakpoint(); | |
| 114 } | |
| 115 #else | |
| 116 | |
| 117 #include <cyg/infra/testcase.h> | |
| 118 | |
| 119 void cyg_start (void) | |
| 120 { | |
| 121 CYG_TEST_INIT(); | |
| 122 CYG_TEST_PASS_FINISH("N/A: Stand-alone GDB stubs only"); | |
| 123 } | |
| 124 #endif | |
| 125 | |
| 126 | |
| 127 |
