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]

Re: Undefined reference to hal_interrupt_stack_call_pending_DSRs


leslie wrote:
I submitted this post last few, but still can't solve the problem. I am
using ARME7T. While compiling the GoAhead Webserver, I got the
following error:

/root/cvs/ecos/packages/kernel/current/src/intr/intr.cxx:595: undefined
reference to `hal_interrupt_stack_call_pending_DSRs'
collect2: ld returned 1 exit status
make: *** [webs] Error 1

How do I resolve the problem of undefined reference to
hal_interrupt_stack_call_pending_DSRs. What must I make sure is
defined? Really need help on this. Thanks alot!
either it could be that you are using default linker script rather than ecos linker script available in install/lib?? so vectors.o is not available during linking.

other reason could be that though you are using correct linker script but haven't enabled CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK, as a result of which hal_interrupt_stack_call_pending_DSRs is not assembled.

packages/hal/arm/arch/current/src/vectors.s
-------------------------------------------
#ifdef CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK
// Execute pending DSRs the interrupt stack
// Note: this can only be called from code running on a thread stack
FUNC_START_ARM(hal_interrupt_stack_call_pending_DSRs, r1)
................
#endif // CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK

kernel/current/src/intr/intr.cxx
--------------------------------
void Cyg_Interrupt::call_pending_DSRs(void)
{
    CYG_ASSERT( Cyg_Scheduler::get_sched_lock() == 1,
                "DSRs being called with sched_lock not equal to 1");
    HAL_INTERRUPT_STACK_CALL_PENDING_DSRS();
}

packages/hal/arm/arch/current/include/hal_intr.h
------------------------------------------------
#ifdef  CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK
externC void hal_interrupt_stack_call_pending_DSRs(void);
#define HAL_INTERRUPT_STACK_CALL_PENDING_DSRS() \
    hal_interrupt_stack_call_pending_DSRs()

// these are offered solely for stack usage testing
// if they are not defined, then there is no interrupt stack.
#define HAL_INTERRUPT_STACK_BASE cyg_interrupt_stack_base
#define HAL_INTERRUPT_STACK_TOP  cyg_interrupt_stack
// use them to declare these extern however you want:
//       extern char HAL_INTERRUPT_STACK_BASE[];
//       extern char HAL_INTERRUPT_STACK_TOP[];
// is recommended
#endif

--
regards
sandeep
--------------------------------------------------------------------------
Put no trust in cryptic comments.
--------------------------------------------------------------------------


-- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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