This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RedBoot, GDB_STUB and serial interrupts


Hello,
I am currently in the process of porting RedBoot to a new
architecture and facing a problem that when I enable the GDB
stubs this also enables interrupts for the serial port and
effectively disables debugging in RedBoot.

I saw a similar problem mentioned before on this list (around
Januar 2001) but there was no solution

The problem:

Apparently, CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS must be enabled
to enable the GDB stubs in Redboot. This option is only enabled
if CYGINT_HAL_DEBUG_GDB_STUBS is also enabled:

packages/hal/common/current/cdl/debugging.cdl:

cdl_option CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS {
     display       "Include GDB stubs in HAL"
     active_if     CYGINT_HAL_DEBUG_GDB_STUBS 

     ...

In one of the mails mentione above Gary Thomas wrote:

   You should _not_ have the options required to include this
   code set. The options CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
   and CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT should only be enabled
   for "normal" eCos applications.

However, RedBoot even seems to require that 
CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT is enabled because of
the constraint in packages/redboot/current/cdl/redboot.cdl:

cdl_component CYGBLD_BUILD_REDBOOT {
         ...
         requires { !CYGINT_HAL_DEBUG_GDB_STUBS || 
CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT }


But because BREAK_SUPPORT is now enabled hal_ctrlc_isr_init()
is also compiled and enables the interrupt for the serial port:

hal_ctrlc_isr_init(void)
...

     // We can only enable interrupts on a valid debug channel.
     if (__chan)
         CYGACC_COMM_IF_CONTROL(*__chan, __COMMCTL_IRQ_ENABLE);
 


This effecively disables debugging in RedBoot because the
interrupt routine only checks for a ctrl-c character and
dismisses all other characters.

Thanks,
Chris


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]