Mercurial > flash_v2
comparison packages/redboot/current/src/main.c @ 126:518f42066aba ecos-sw-2000-09-19
Merge from eCos master repository on 2000-09-19-06:25:26-BST
| author | jlarmour |
|---|---|
| date | Tue, 19 Sep 2000 05:53:51 +0000 |
| parents | bd1a71e3e476 |
| children | 0c2b7be0d798 |
comparison
equal
deleted
inserted
replaced
| 125:b4407dc7f59d | 126:518f42066aba |
|---|---|
| 85 CYG_HAL_TABLE_END( __RedBoot_CMD_TAB_END__, RedBoot_commands ); | 85 CYG_HAL_TABLE_END( __RedBoot_CMD_TAB_END__, RedBoot_commands ); |
| 86 extern struct cmd __RedBoot_CMD_TAB__[], __RedBoot_CMD_TAB_END__; | 86 extern struct cmd __RedBoot_CMD_TAB__[], __RedBoot_CMD_TAB_END__; |
| 87 | 87 |
| 88 CYG_HAL_TABLE_BEGIN( __RedBoot_INIT_TAB__, RedBoot_inits ); | 88 CYG_HAL_TABLE_BEGIN( __RedBoot_INIT_TAB__, RedBoot_inits ); |
| 89 CYG_HAL_TABLE_END( __RedBoot_INIT_TAB_END__, RedBoot_inits ); | 89 CYG_HAL_TABLE_END( __RedBoot_INIT_TAB_END__, RedBoot_inits ); |
| 90 extern void_fun_ptr __RedBoot_INIT_TAB__[], __RedBoot_INIT_TAB_END__; | 90 extern struct init_tab_entry __RedBoot_INIT_TAB__[], __RedBoot_INIT_TAB_END__; |
| 91 | 91 |
| 92 // | 92 // |
| 93 // This is the main entry point for RedBoot | 93 // This is the main entry point for RedBoot |
| 94 // | 94 // |
| 95 void | 95 void |
| 98 int res; | 98 int res; |
| 99 bool prompt = true; | 99 bool prompt = true; |
| 100 char line[256]; | 100 char line[256]; |
| 101 struct cmd *cmd; | 101 struct cmd *cmd; |
| 102 int cur = CYGACC_CALL_IF_SET_CONSOLE_COMM(CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT); | 102 int cur = CYGACC_CALL_IF_SET_CONSOLE_COMM(CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT); |
| 103 void_fun_ptr *init_fun; | 103 struct init_tab_entry *init_entry; |
| 104 | 104 |
| 105 CYGACC_CALL_IF_SET_CONSOLE_COMM(CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL); | 105 CYGACC_CALL_IF_SET_CONSOLE_COMM(CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL); |
| 106 #ifdef CYGPKG_REDBOOT_ANY_CONSOLE | 106 #ifdef CYGPKG_REDBOOT_ANY_CONSOLE |
| 107 console_selected = false; | 107 console_selected = false; |
| 108 #endif | 108 #endif |
| 110 | 110 |
| 111 ram_start = (unsigned char *)CYGMEM_REGION_ram; | 111 ram_start = (unsigned char *)CYGMEM_REGION_ram; |
| 112 ram_end = (unsigned char *)(CYGMEM_REGION_ram+CYGMEM_REGION_ram_SIZE); | 112 ram_end = (unsigned char *)(CYGMEM_REGION_ram+CYGMEM_REGION_ram_SIZE); |
| 113 | 113 |
| 114 printf("\nRedBoot(tm) debug environment - built %s, %s\n", __TIME__, __DATE__); | 114 printf("\nRedBoot(tm) debug environment - built %s, %s\n", __TIME__, __DATE__); |
| 115 #ifdef HAL_PLATFORM_CPU | |
| 116 printf("Platform: %s (%s) %s\n", HAL_PLATFORM_BOARD, HAL_PLATFORM_CPU, HAL_PLATFORM_EXTRA); | |
| 117 #endif | |
| 115 printf("Copyright (C) 2000, Red Hat, Inc.\n\n"); | 118 printf("Copyright (C) 2000, Red Hat, Inc.\n\n"); |
| 116 printf("RAM: %p-%p\n", ram_start, ram_end); | 119 printf("RAM: %p-%p\n", ram_start, ram_end); |
| 117 | 120 |
| 118 config_ok = false; | 121 config_ok = false; |
| 119 | 122 |
| 120 for (init_fun = __RedBoot_INIT_TAB__; init_fun != &__RedBoot_INIT_TAB_END__; init_fun++) { | 123 for (init_entry = __RedBoot_INIT_TAB__; init_entry != &__RedBoot_INIT_TAB_END__; init_entry++) { |
| 121 (*init_fun)(); | 124 (*init_entry->fun)(); |
| 122 } | 125 } |
| 123 | 126 |
| 124 #ifdef CYGSEM_REDBOOT_FLASH_CONFIG | 127 #ifdef CYGSEM_REDBOOT_FLASH_CONFIG |
| 125 // Give the guy a chance to abort any boot script | 128 // Give the guy a chance to abort any boot script |
| 126 if (script) { | 129 if (script) { |
