2 # Configure ARM/EBSA285 eCos to create GDB stubs
3 # Ensure that PATH include the directory where the ARM tools reside.
5 # Run from an empty temporary directory with one argument: the path to
6 # the packages directory (i.e., where pkgconf.tcl lives).
8 # Output will be ./stubrom.bin which is suitable for programming into flash.
10 if ( echo | tclsh ) 2>/dev/null ; then
12 elif ( echo | cygtclsh80 ) 2>/dev/null ; then
15 echo Could not find TCL interpreter
20 --target=arm --platform=ebsa285 --startup=rom \
21 --disable CYGPKG_KERNEL --disable CYGPKG_UITRON \
22 --disable CYGPKG_LIBC --disable CYGPKG_LIBM \
23 --disable CYGPKG_ERROR --disable CYGPKG_IO \
24 --disable CYGPKG_IO_SERIAL --disable CYGPKG_DEVICES_WALLCLOCK \
25 --disable CYGPKG_DEVICES_WATCHDOG
27 patch <<END_OF_PATCH -p0
28 --- pkgconf/hal.h.orig Thu Feb 10 09:05:07 2000
29 +++ pkgconf/hal.h Thu Feb 10 09:04:56 2000
34 -#define CYGFUN_HAL_COMMON_KERNEL_SUPPORT
35 +#undef CYGFUN_HAL_COMMON_KERNEL_SUPPORT
36 #undef CYGDBG_HAL_DIAG_DISABLE_GDB_PROTOCOL
38 #ifdef CYGDBG_HAL_DIAG_DISABLE_GDB_PROTOCOL
40 #define CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK
41 #define CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE 4096
42 #undef CYGSEM_HAL_COMMON_INTERRUPTS_ALLOW_NESTING
43 -#define CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
44 +#undef CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
45 #undef CYGIMP_HAL_COMMON_INTERRUPTS_CHAIN
46 #undef CYGIMP_HAL_COMMON_INTERRUPTS_IGNORE_SPURIOUS
52 -#define CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
53 +#undef CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
61 -#undef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
62 +#define CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
63 #undef CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
64 -#define CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT
65 -#define CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
66 +#undef CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT
67 +#undef CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
74 /* Enable this when configuring as a ROM monitor (i.e., stub) */
75 -#undef CYGSEM_HAL_ROM_MONITOR
76 +#define CYGSEM_HAL_ROM_MONITOR
78 #include CYGBLD_HAL_TARGET_H
79 #include CYGBLD_HAL_PLATFORM_H
83 make -C hal/common/current/src/stubrom
84 arm-elf-objcopy -O binary hal/common/current/src/stubrom/stubrom stubrom.bin