comparison packages/hal/arm/aeb/current/src/hal_diag.c @ 50:a0774359f013 ecos-sw-1999-11-02

Merge from eCos master repository on 1999-11-02-17:02:15-GMT
author jlarmour
date Tue, 02 Nov 1999 20:57:07 +0000
parents d3fbcdfa1b2f
children f10165814f1e
comparison
equal deleted inserted replaced
49:698ff3191b93 50:a0774359f013
47 47
48 #include <cyg/hal/hal_arch.h> // basic machine info 48 #include <cyg/hal/hal_arch.h> // basic machine info
49 #include <cyg/hal/hal_intr.h> // interrupt macros 49 #include <cyg/hal/hal_intr.h> // interrupt macros
50 #include <cyg/hal/hal_io.h> // IO macros 50 #include <cyg/hal/hal_io.h> // IO macros
51 #include <cyg/hal/hal_diag.h> 51 #include <cyg/hal/hal_diag.h>
52 #ifdef CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT 52 #ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
53 #include <cyg/hal/drv_api.h> 53 #include <cyg/hal/drv_api.h>
54 #include <cyg/hal/hal_stub.h> // cyg_hal_gdb_interrupt
54 #endif 55 #endif
55 56
56 // Assumption: all diagnostic output must be GDB packetized unless this is a ROM (i.e. 57 // Assumption: all diagnostic output must be GDB packetized unless this is a ROM (i.e.
57 // totally stand-alone) system. 58 // totally stand-alone) system.
58 59
267 // Disable interrupts. This prevents GDB trying to interrupt us 268 // Disable interrupts. This prevents GDB trying to interrupt us
268 // while we are in the middle of sending a packet. The serial 269 // while we are in the middle of sending a packet. The serial
269 // receive interrupt will be seen when we re-enable interrupts 270 // receive interrupt will be seen when we re-enable interrupts
270 // later. 271 // later.
271 272
273 #ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
274 CYG_HAL_GDB_ENTER_CRITICAL_IO_REGION(old);
275 #else
272 HAL_DISABLE_INTERRUPTS(old); 276 HAL_DISABLE_INTERRUPTS(old);
277 #endif
273 278
274 while(1) 279 while(1)
275 { 280 {
276 static char hex[] = "0123456789ABCDEF"; 281 static char hex[] = "0123456789ABCDEF";
277 cyg_uint8 csum = 0; 282 cyg_uint8 csum = 0;
317 322
318 pos = 0; 323 pos = 0;
319 324
320 325
321 // And re-enable interrupts 326 // And re-enable interrupts
327 #ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
328 CYG_HAL_GDB_LEAVE_CRITICAL_IO_REGION(old);
329 #else
322 HAL_RESTORE_INTERRUPTS(old); 330 HAL_RESTORE_INTERRUPTS(old);
331 #endif
323 332
324 } 333 }
325 } 334 }
326 #endif 335 #endif
327 336