Mercurial > ecos
comparison packages/hal/arm/aeb/current/src/gdb_module.c @ 76:435cced73e2f ecos-v1_3_1-release
eCos v1.3.1 merged from eCos master repository on 2000-03-27-23:22:51-BST
| author | jlarmour |
|---|---|
| date | Tue, 28 Mar 2000 14:10:45 +0000 |
| parents | |
| children | e0c0827131d1 |
comparison
equal
deleted
inserted
replaced
| 75:41bf073c0c32 | 76:435cced73e2f |
|---|---|
| 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 Red Hat eCos Public License | |
| 12 // Version 1.1 (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://www.redhat.com/ | |
| 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 Configurable Operating System, | |
| 22 // released September 30, 1998. | |
| 23 // | |
| 24 // The Initial Developer of the Original Code is Red Hat. | |
| 25 // Portions created by Red Hat are | |
| 26 // Copyright (C) 1998, 1999, 2000 Red Hat, Inc. | |
| 27 // All Rights Reserved. | |
| 28 // ------------------------------------------- | |
| 29 // | |
| 30 //####COPYRIGHTEND#### | |
| 31 //========================================================================== | |
| 32 //#####DESCRIPTIONBEGIN#### | |
| 33 // | |
| 34 // Author(s): gthomas | |
| 35 // Contributors: gthomas | |
| 36 // Date: 1998-12-18 | |
| 37 // Description: AEB-1 FLASH module for eCos GDB stubs | |
| 38 //####DESCRIPTIONEND#### | |
| 39 | |
| 40 // | |
| 41 // This is the module 'wrapper' for the GDB stubs | |
| 42 // | |
| 43 | |
| 44 #include <pkgconf/hal.h> | |
| 45 #include <cyg/infra/cyg_type.h> | |
| 46 #include <cyg/hal/hal_stub.h> | |
| 47 | |
| 48 // ARM AEB-1 module stuff | |
| 49 | |
| 50 #ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS | |
| 51 | |
| 52 #ifndef CHECKSUM | |
| 53 #define CHECKSUM 0x0 | |
| 54 #endif | |
| 55 | |
| 56 extern char __exception_handlers, __rom_data_end; | |
| 57 | |
| 58 const char __title[] = "eCos"; | |
| 59 const char __help[] = "eCos 1.3 (" __DATE__ ") GDB stubs"; | |
| 60 | |
| 61 struct ModuleHeader { | |
| 62 cyg_uint32 magic; | |
| 63 cyg_uint16 flags; | |
| 64 cyg_uint8 major; | |
| 65 cyg_uint8 minor; | |
| 66 cyg_uint32 checksum; | |
| 67 cyg_uint32 ro_base; | |
| 68 cyg_uint32 ro_limit; | |
| 69 cyg_uint32 rw_base; | |
| 70 cyg_uint32 zi_base; | |
| 71 cyg_uint32 zi_limit; | |
| 72 cyg_uint32 self; | |
| 73 cyg_uint32 start; | |
| 74 cyg_uint32 init; | |
| 75 cyg_uint32 final; | |
| 76 cyg_uint32 service; | |
| 77 cyg_uint32 title; | |
| 78 cyg_uint32 help; | |
| 79 cyg_uint32 cmdtbl; | |
| 80 cyg_uint32 swi_base; | |
| 81 cyg_uint32 swi_handler; | |
| 82 }; | |
| 83 | |
| 84 const static struct ModuleHeader __hdr = { | |
| 85 0x4D484944, // MHID | |
| 86 2, // flags = auto start | |
| 87 1, // major | |
| 88 0, // minor | |
| 89 CHECKSUM, // checksum | |
| 90 (cyg_uint32) &__exception_handlers, // start of module (read-only) image | |
| 91 (cyg_uint32) &__rom_data_end, // end of image | |
| 92 0, // r/w base - unused | |
| 93 0, // bss base - unused | |
| 94 0, // bss limit - unused | |
| 95 (cyg_uint32) &__hdr, // self (for module identification) | |
| 96 (cyg_uint32) &__exception_handlers, // startup | |
| 97 0, // init - unused | |
| 98 0, // final - unused | |
| 99 0, // service - unused | |
| 100 (cyg_uint32) &__title, // title | |
| 101 (cyg_uint32) &__help, // help string | |
| 102 0, // command table - unused | |
| 103 0, // SWI table - unused | |
| 104 0 // SWI handler - unused | |
| 105 }; | |
| 106 | |
| 107 static void | |
| 108 __dummy(void *p) | |
| 109 { | |
| 110 } | |
| 111 | |
| 112 void cyg_start (void) | |
| 113 { | |
| 114 __dummy((void *)&__hdr); // Just to keep it in! | |
| 115 for(;;) breakpoint(); | |
| 116 } | |
| 117 #else | |
| 118 | |
| 119 #include <cyg/infra/testcase.h> | |
| 120 | |
| 121 void cyg_start (void) | |
| 122 { | |
| 123 CYG_TEST_INIT(); | |
| 124 CYG_TEST_PASS_FINISH("N/A: Stand-alone GDB stubs only"); | |
| 125 } | |
| 126 #endif | |
| 127 | |
| 128 | |
| 129 |
