This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: Small change to hal_if.c:hal_ctrlc_check fixed my eth
- To: Alex Brown <agb at cea dot com dot au>
- Subject: RE: [ECOS] Small change to hal_if.c:hal_ctrlc_check fixed my eth
- From: Gary Thomas <gthomas at cambridge dot redhat dot com>
- Date: Tue, 13 Feb 2001 17:01:54 -0700 (MST)
- Cc: ecos-discuss at sourceware dot cygnus dot com
- Organization: Red Hat, Inc.
Can you send a patch (to make it easier to see what you changed)?
Just do 'cvs diff -u hal/common/current/src/hal_if.c'
On 13-Feb-2001 Alex Brown wrote:
> Hi
>
> I had to make the following change the
> hal\common\current\src\hal_if.c:hal_ctrlc_check() in order to get ethernet
> debugging on my custom MPC860 based board.
>
> Before this change, the hal_ctrlc_check would steal all ethernet interrupts
> and the TCP/IP stack would not get any data is the application was started
> via GDB. (I am using redboot and my RAM image uses the stubs in redboot)
>
> Now ethernet debugging works perfectly.
>
> I am doing something wrong with my configuration to require this ?
>
> Modified code follows:
>
> cyg_bool
> hal_ctrlc_check(CYG_ADDRWORD vector, CYG_ADDRWORD data)
> {
> hal_virtual_comm_table_t* chan = CYGACC_CALL_IF_DEBUG_PROCS();
> int gdb_vector = -1;
> int isr_ret, ctrlc = 0;
>
> // This check only to avoid crash on older stubs in case of unhandled
> // interrupts. It is a bit messy, but required in a transition period.
> if (CYGNUM_CALL_IF_TABLE_VERSION+1 == CYGACC_CALL_IF_VERSION()) {
> gdb_vector = CYGACC_COMM_IF_CONTROL(*chan,
> __COMMCTL_DBG_ISR_VECTOR);
> }
> if (vector == gdb_vector) {
> isr_ret = CYGACC_COMM_IF_DBG_ISR(*chan, &ctrlc, vector, data);
> if (ctrlc)
> cyg_hal_user_break( (CYG_ADDRWORD *)hal_saved_interrupt_state );
> return ctrlc; // <- CHANGE HERE!! this used to be "return true;"
> }
> return false;
> }
>
> Alex Brown
> agb@cea.com.au